# Question:Simplification of trigonometric expression. II

## Question:Simplification of trigonometric expression. II

Maple

Hello,

In the post :

http://www.mapleprimes.com/questions/209721-Simplification-Of-Trigonometric-Expressions

you have help me to build a procedure so as to simplify trigonometric expressions of the following form, that is to say where each trigonometric expression is in factor with a term :

x0(t)+sin(alpha0(t))*sin(gamma0(t))*sin(beta0(t))*xb-sin(alpha0(t))*sin(beta0(t))*cos(gamma0(t))*zb-sin(alpha0(t))*cos(beta0(t))*yb+cos(alpha0(t))*sin(gamma0(t))*zb+cos(alpha0(t))*cos(gamma0(t))*xb-l2*(sin(psi(t))*sin(alpha0(t))*sin(gamma0(t))*sin(beta0(t))-cos(psi(t))*sin(alpha0(t))*sin(beta0(t))*cos(gamma0(t))+sin(psi(t))*cos(alpha0(t))*cos(gamma0(t))+cos(psi(t))*cos(alpha0(t))*sin(gamma0(t)))-l3*(sin(theta(t))*sin(psi(t))*sin(alpha0(t))*sin(beta0(t))*cos(gamma0(t))+sin(theta(t))*cos(psi(t))*sin(alpha0(t))*sin(gamma0(t))*sin(beta0(t))+cos(theta(t))*sin(psi(t))*sin(alpha0(t))*sin(gamma0(t))*sin(beta0(t))-cos(theta(t))*cos(psi(t))*sin(alpha0(t))*sin(beta0(t))*cos(gamma0(t))-sin(theta(t))*sin(psi(t))*cos(alpha0(t))*sin(gamma0(t))+sin(theta(t))*cos(psi(t))*cos(alpha0(t))*cos(gamma0(t))+cos(theta(t))*sin(psi(t))*cos(alpha0(t))*cos(gamma0(t))+cos(theta(t))*cos(psi(t))*cos(alpha0(t))*sin(gamma0(t)))-xp(t) = 0

From a mechanical point of view, this form of equations comes from the constraint equations obtained with a vectorial closure.

Now I would like to silmplify the constraint equations which come form angular closure.

The equations are in the form :

sin(gamma0(t))*cos(beta0(t)) = -(sin(psi(t))*cos(theta(t))*cos(gamma(t))+sin(psi(t))*sin(theta(t))*sin(gamma(t))-cos(theta(t))*cos(psi(t))*sin(gamma(t))+cos(psi(t))*sin(theta(t))*cos(gamma(t)))*cos(beta(t))

i try to treat the right side with the following code :

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(-(sin(psi(t))*cos(theta(t))*cos(gamma(t))+sin(psi(t))*sin(theta(t))*sin(gamma(t))-cos(theta(t))*cos(psi(t))*sin(gamma(t))+cos(psi(t))*sin(theta(t))*cos(gamma(t)))*cos(beta(t)), size))

The result is :

(-sin(theta(t)+psi(t))*cos(gamma(t))+sin(gamma(t))*cos(theta(t)+psi(t)))*cos(beta(t))

It seems that the result is not simplified enough. I would like to obtain this expression :

cos(beta(t))*sin(gamma(t)-theta(t)-psi(t))

Have you a idea why the simplification is not conducted once more ? Do you have ideas so as to simplify the equation so as to obtain the result mentioned ?

Thanks a lot for your help ﻿