reduce a complete vector



I have the same problem. It is quite common when we try to multiply
homogeneneous matrices. I sincerely tried several combinations of
trigreduce, trigsimplify, ratexpand, etc...

I cannot catch the ppoint with trigonometrical functions at all.




    Dan> Have you tried
    Dan> fullmapl(lambda([u],trigreduce(factorout(ratexpand(trigexpand(u)),sin,cos))),a)?

    Dan> It returned

            [       SIN(tD + tC + tB)   SIN(tD + tC - tB)      ]
            [       ----------------- + -----------------                ]
(D20)   [          2                       2       ]
            [ r SIN(tB) COS(tD + 2 tC) - dA SIN(tB) SIN(tD + tC) ]


This is the point : This result is not good enough as 

matrix([cos(tB)*sin(tD + tC)],
       [r*sin(tB)*cos(tD+2*tC) - dA*sin(tB)*sin(tD+tC)]);

is the desired solution. For this simple matrix this can be a matter
of taste but when we multiply in cascade a series of homogeneneous
matrices we cannot control the results in a short time.

Where is my (our?) fault


Daniel