Here my attempt to make a procedure to automatize the simplification of this kind of trigonometric equation :

eq_liaison:=sin(gamma0(t))*cos(beta0(t)) = -(sin(gamma[1](t))*sin(psi[1](t))*sin(theta[1](t))-sin(gamma[1](t))*cos(theta[1](t))*cos(psi[1](t))+cos(gamma[1](t))*sin(psi[1](t))*cos(theta[1](t))+cos(gamma[1](t))*cos(psi[1](t))*sin(theta[1](t)))*cos(beta[1](t));

**Initialisation**

**restart:**

**with(LinearAlgebra):**

**with(Student[MultivariateCalculus]):**

**with(plots):**

**with(MathML):**

**with(ListTools):**

**constants:= ({constants} minus {gamma})[]:**

**`evalf/gamma`:= proc() end proc:**

**`evalf/constant/gamma`:= proc() end proc:**

**unprotect(gamma);**

**Angular Constraint equations**

**eq_liaison:=sin(gamma0(t))*cos(beta0(t)) = -(sin(gamma[1](t))*sin(psi[1](t))*sin(theta[1](t))-sin(gamma[1](t))*cos(theta[1](t))*cos(psi[1](t))+cos(gamma[1](t))*sin(psi[1](t))*cos(theta[1](t))+cos(gamma[1](t))*cos(psi[1](t))*sin(theta[1](t)))*cos(beta[1](t)); **

**Traitement**

**TrigoTransform2:= proc(Eq)**

** local S,S1,tt,pp,Eq2,ListVariables,ListVariablesMod,Subs,size,rhsEq2,lhsEq2;**

** #Construit une liste à plat#**

** ListVariables:=indets(Eq, function(identical(t)));**

** ListVariables:=[op(ListVariables)];**

** ListVariablesMod:=map(f->cat(op(0,f),_),ListVariables);**

** Subs:=ListVariables=~ListVariablesMod;**

** ****#**Variables Changement**#**

** Eq2:=Eq:**

** print("Equation traitée=",Eq2): **

** Eq2:=subs(Subs, Eq2);**

** print("Equation après subs=",Eq2): **

** #Trigonometric transformations#**

** lhsEq2:=applyrule([**

** cos(u::anything)*cos(v::anything)-sin(u::anything)*sin(v::anything)=cos(u+v), **

** cos(u::anything)*sin (v::anything)+sin(u::anything)*cos(v::anything)=sin(u+v), **

** sin(u::anything)*sin(v::anything)-cos(u::anything)*cos(v::anything)=-cos(u+v), **

** -sin(v::anything)*cos(u::anything)-sin(u::anything)*cos(v::anything)=-sin(u+v)], simplify(lhs(Eq2), size));**

** print("Equation lhsEq2 première analyse=",lhsEq2):**

** rhsEq2:=applyrule([**

** cos(u::anything)*cos(v::anything)-sin(u::anything)*sin(v::anything)=cos(u+v), **

** cos(u::anything)*sin (v::anything)+sin(u::anything)*cos(v::anything)=sin(u+v), **

** sin(u::anything)*sin(v::anything)-cos(u::anything)*cos(v::anything)=-cos(u+v), **

** -sin(v::anything)*cos(u::anything)-sin(u::anything)*cos(v::anything)=-sin(u+v)], simplify(rhs(Eq2), size));**

** print("Equation rhsEq2 première analyse=",rhsEq2):**

** try**

** lhsEq2:=(trigsubs(2*combine(lhsEq2))[])/2;**

** print("Equation lhsEq2=",lhsEq2):**

** catch:**

** lhsEq2:=lhs(Eq2);**

** end try;**

** try**

** rhsEq2:=(trigsubs(-2*combine(rhsEq2))[])/2;**

** print("Equation rhsEq2=",rhsEq2):**

** catch:**

** rhsEq2:=rhs(Eq2);**

** end try;**

** Eq2:= lhsEq2=rhsEq2;**

**#**Variables Changement**#**

** Eq2:=subs(map(t->rhs(t)=lhs(t),Subs),Eq2) **

**end proc:**

**TrigoTransform2(eq_liaison);**

Strangely, I noticed that the simplification is done only if there is a minus before the combine function. The simplification works but the result is wrong because i didn't obtain the good sign.

Can you help me to correct this point ? and to make the code more general so as to make this simplification in a automatic way ?

Thanks a lot for your help.