First time here? Check out the FAQ!
answered 2023-09-13 19:50:10 +0100
You could use the simplify_trig method:
simplify_trig
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)] ...