De Moivre's Theorem states that:

#(cosx+isinx)^n=cosnx+isinnx#

This can be used (preferably with binomial expansion for higher values) to find double, triple (etc) angle rules by substituting in different values of #n# and then equating the real and imaginary parts of both sides.

Example:

Let #n=3#

Therefore, #(cosx+isinx)^3=cos3x+isin3x#

#cos^3x+3cos^2x(isinx)+3cosx(isinx)^2+(isinx)^3=cos3x+isin3x#

#cos^3x+3icos^2xsinx-3cosxsin^2x-isin^3x=cos3x+isin3x#

You can now equate the Re and Im parts of both sides, the idea here being that if you have two equal complex numbers:

#a+bi=c+di => a=c and b=d# since the two domains can't interfere. It's a similar idea to vectors in more than one dimension, how different components in different dimensions can't interfere.

Therefore, Equating Re:

#cos^3x-3cosxsin^2x=cos3x#

Equating Im:

#3cos^2xsinx-sin^3x=sin3x#

These rules, especially for #n=2#, make computing integrals like #intsin^2xdx# significantly easier.