Suppose you want cos(nx) and sin(nx) in terms of sin(x). You'll need cos(x) as well which can be found using

First note that

Raising both sides to the nth power:

And note that

Therefore, by the transitive property

So

and

Expanding using the binomial theorem yields:

Splitting it into real and imaginary parts:

And

First note that

Raising both sides to the nth power:

And note that

Therefore, by the transitive property

So

and

Expanding using the binomial theorem yields:

Splitting it into real and imaginary parts:

And