Ask Your Question

Revision history [back]

You could use the simplify_trig method:

sage: var('theta')
theta
sage: cos(2*theta).simplify_trig()
2*cos(x)^2 - 1
sage: [cos(n*theta).simplify_trig() for n in range(1, 10)]
...