Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

You must use trig_reduce():

sage: exp1.trig_reduce()
sin(x1 + x2)

You must use trig_reduce():

sage: exp1.trig_reduce()
sin(x1 + x2)

The reverse operation is trig_expand():

sage: exp2 = sin(x1 + x2)
sage: exp2.trig_expand()
cos(x2)*sin(x1) + cos(x1)*sin(x2)