Ask Your Question

Revision history [back]

Apparently trig_reduce is not idempotent and you have to apply it twice to get the correct result:

sage: produit.apply_map(lambda x: x.trig_reduce().trig_reduce())

Apparently trig_reduce is not idempotent and you have to apply it twice to get the correct result:

sage: produit.apply_map(lambda x: x.trig_reduce().trig_reduce())
[ cos(theta1 + theta2 + theta3) -sin(theta1 + theta2 + theta3)]
[ sin(theta1 + theta2 + theta3)  cos(theta1 + theta2 + theta3)]