reduce a complete vector
- Subject: reduce a complete vector
- From: Dan Stanger
- Date: Mon, 19 Nov 2001 11:48:11 -0700
Have you tried
fullmapl(lambda([u],trigreduce(factorout(ratexpand(trigexpand(u)),sin,cos))),a)?
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) ]
Dan Stanger
dan.stanger@ieee.org
alexandre@emc.ufsc.br wrote:
> I've
> A:matrix([cos(tB)*(cos(tC)*SIN(tD)+sin(tC)*cos(tD))],
> [r*sin(tB)*cos(tC)*(cos(tC)*cos(tD)-sin(tC)*sin(tD))
> +sin(tB)*(-r*sin(tC)-dA)*(cos(tC)*sin(tD)+sin(tC)*COS(tD
>
> and I need get
>
> B:matrix([cos(tB)*sin(tD + tC)],[r*sin(tB)*cos(tD+2*tC) -
> dA*sin(tB)*sin(tD+tC)]);
>
> I try:
>
> fixup(x) :=trigreduce(factorout(ratexpand(trigexpand(x)),sin,cos));
> then
> map(fixup,A);
>
> but the result is not so simple...it's:
>
> SIN(tD + tC + tB) SIN(tD + tC - tB)
> (D8) MATRIX([----------------- + -----------------],
> 2 2
>
> r SIN(tD + 2 tC + tB) r SIN(tD - 2 tC + tB)
> --------------------- + ---------------------
> 2 2 r SIN(tD + 2 tC + tB)
> [--------------------------------------------- + ---------------------
> 2 4
>
> r SIN(tD + 2 tC - tB) r SIN(tD - 2 tC - tB)
> --------------------- + ---------------------
> 2 2 r SIN(tD + 2 tC - tB)
> - --------------------------------------------- - ---------------------
> 2 4
>
> dA COS(tD + tC + tB) dA COS(tD + tC - tB) r SIN(tD - 2 tC + tB)
> + -------------------- - -------------------- - ---------------------
> 2 2 4
>
> r SIN(tD - 2 tC - tB)
> + ---------------------])
> 4
>
> is not so simple...
>
> _______________________________________________
> Maxima mailing list
> Maxima@www.math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima