# Replacement of a group of variables in trigonometric expression

I would like to make simplification of trigonometric expressions by using a replacement a group of variables.

Here the equation I have to simplify :

   -Cos[γ[t] - θ[t] - ψ[t]] l[f] +
m[f] Sin[γ[t]] +
c[f] Sin[γ[t] - θ[t]] -
h[f] Sin[γ[t] - θ[t] - ψ[t]] +
x[P1][
t] == -Cos[γ[t] - θ[t] - ψ[t]] l[f] +
m[f] Sin[γ[t]] +
c[f] Sin[γ[t] - θ[t]] -
h[f] Sin[γ[t] - θ[t] - ψ[t]] +
x[P2][t]


For the simplification I also this equation

γ[t] - θ[t] - ψ[t] == γ[t] - θ[t] - ψ[t]


Consequently, I would like to replace only in the right hand side the group of variables γ[t] - θ[t] - ψ[t] by γ[t] - θ[t] - ψ[t]

After simplifications, I would like to obtain this equation :

m[f] Sin[γ[t]] + c[f] Sin[γ[t] - θ[t]] + x[P1][t] ==
m[f] Sin[γ[t]] + c[f] Sin[γ[t] - θ[t]] + x[P2][t]


Have you some ideas so to do this replacement γ[t] - θ[t] - ψ[t] == γ[t] - θ[t] - ψ[t] in the right hand side of my equation ?

try this:

FullSimplify[
-Cos[γ[t] - θ[t] - ψ[t]] l[f] + m[f] Sin[γ[t]] +
c[f] Sin[γ[t] - θ[t]] - h[f] Sin[γ[t] - θ[t] - ψ[t]] +
x[P1][t] == (-Cos[γ[t] - θ[t] - ψ[t]] l[f] + m[f] Sin[γ[t]] +
c[f] Sin[γ[t] - θ[t]] - h[f] Sin[γ[t] - θ[t] - ψ[t]] +
x[P2][t]) /. (γ[t] - θ[t] - ψ[t]) -> (γ[t] - θ[t] - ψ[t])
]

• is it the "{", "}" which enable to make the replacement of a group of variables ? – Bendesarts Mar 13 '16 at 8:20
• it is /. symbol in the answer that allows you to make the replacement. – Ali Hashmi Mar 13 '16 at 8:21
• i removed the "{" "}" because they were not necessary. – Ali Hashmi Mar 13 '16 at 8:25