Ask Your Question
0

how do I expand cos(n*theta)

asked 1 year ago

Learner2023 gravatar image

updated 0 years ago

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

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
1

answered 1 year ago

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)]
...
Preview: (hide)
link

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: 1 year ago

Seen: 122 times

Last updated: Sep 13 '23