common factor reduction



ratsimp(trigreduce(...))

On Tue, Jan 24, 2012 at 05:00, Marco Frigerio <marco.frigerio at iit.it> wrote:

> Hi all,
>
> consider this
>
> (%i..) trigreduce( -A*cos(q1)*sin(q2)  +  A*sin(q1)*cos(q2) );
> (%o..)                         - sin(q2 - q1) A
>
> Why I cannot do the same thing if instead of a variable like 'A' I have a
> numerical constant?
>
> (%i..) trigreduce( -4*cos(q1)*sin(q2)  +  4*sin(q1)*cos(q2) );
>
>          sin(q2 + q1)   sin(q2 - q1)       sin(q2 + q1)   sin(q2 - q1)
> (%o..) 4 (------------ - ------------) - 4 (------------ + ------------)
>               2              2                  2              2
>
> I would really like to see
>   - sin(q2 - q1) 4
>
> How can I achieve this?
>
> Thanks a lot
> Regards,
>  MF
> ______________________________**_________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/**mailman/listinfo/maxima<http://www.math.utexas.edu/mailman/listinfo/maxima>;
>