Ask Your Question

how do I expand cos(n*theta)

asked 2023-09-13 18:29:34 +0200

Learner2023 gravatar image

how do I expand cos(n*theta) into a polynomial in sin(theta) and cos(theta) for a range of integers n

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2023-09-13 19:50:10 +0200

You could use the simplify_trig method:

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

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2023-09-13 18:29:34 +0200

Seen: 32 times

Last updated: Sep 13