# how do I expand cos(n*theta)

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

how do I expand cos(n*theta)

add a comment

1

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

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

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

Seen: **93 times**

Last updated: **Sep 13 '23**

expression has trig component or not?

No simplification is done to invert trigonometric functions ?

How to integrate sqrt(P(sinx)), where P(x) is a polynom

Solving trigonometric functions

Trigonometric simplification for distance on a sphere

Solve equation 1/3*x + sin(2*x)==1

Simplify trigonometric expression

Sage does not simplify trigonometric expresion

I don't know why Sage return 0 for integrate(sin(2*x).abs(),(x,0,pi)) when its value is 2

Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.