# Simplify a complex trigonometric equation resulting from constraint solving

In the solving of mechanical constraints, I often meet complex trigonometric equation that I have to simplify.

Here the equation I would like to simplify :

Mathematica notebook presenting the equation

Can you help me to simplify this equation ?

I would like only cos and sin in the equation (with no more tan, Cotan or Sec functions) and gather the kinematic variables (the functions depending of time) the more possible in the cos and sin functions such as cos(gamma1(t)+psi1(t)).

Here the target that I would like to obtain (made with maple for the moment and I hope to do this with mathematica):

Thanks a lot for your help.

P.S: I put a file attached because the equation is quiet long and have subscripts in the notation which make the equation not nice to present

• I take it that a simple FullSimplify didn't meet your needs? – Feyre Jun 24 '16 at 8:29
• FullSimplify lasts a very long time and I didn't obtain any result – Bendesarts Jun 24 '16 at 8:35
• Are there any assumptions you can give, because otherwise I doubt the expression can be simplified then. – Feyre Jun 24 '16 at 8:40
• % //. {Times[a__, Cos[t_]^2] + Times[a__, Sin[t_]^2] :> Times[a] I try this to remove the cos² + sin² = 1 and after i would like to suppress sec function. I think the more interesting would be to have a simplify fraction with on cos and sin function but no more sec functionj – Bendesarts Jun 24 '16 at 8:43
• Usually when working with trig polys, arising from mechanisms or otherwise, I do the following. (1) Expand (via TrigExpand) so trigs of sums disappear. (2) For each sine or cosine of a distinct variable t, add the trig polynomial relation Sin[t]^2+Cos[t]^2-1. (3) Rename Sin and Cos so the "variables" are no longer trig functions. I typlically change e.g. Cos[t] to c[t] and similar for Sin. At this point one can use GroebnerBasis` and other functions from polynomial algebra to work on the input system. – Daniel Lichtblau Jun 24 '16 at 15:05