Ask Your Question

Revision history [back]

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)