Ask Your Question
0

how do I expand cos(n*theta)

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

Learner2023 gravatar image

updated 2024-07-09 08:25:11 +0100

FrédéricC 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
1

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

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)]
...
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

Stats

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

Seen: 100 times

Last updated: Sep 13 '23