Integration by De Moivre Theorem For example , integrate $\sin ^4(x) dx$. 
I solved this question by reduction formula which is fairly easy. But my senior said that it would be easier if you expand the $\sin ^4(x) $by using De Moivre Theorem then integrate it. I've no idea of how De Moivre's Theorem would apply. Can anyone show me ? Thanks 
 A: One important application of De Moivre's theorem is to expand $\sin^n x$ and $\cos^n x$ in terms of $\sin nx$ and $\cos nx$.  Let's do a  simpler example, and integrate $\sin^2 x$.
Recall that De Moivre's theorem says $$(\cos x + i \sin x)^2 = \cos 2x + i \sin 2x.$$  Expanding the left-hand side gives $$ \cos^2 x + 2i \cos x \sin x - \sin^2 x = \cos 2x + i \sin 2x$$ and then if we equate the real and imaginary parts we get $$\begin{align}\cos^2 x - \sin^2 x & = \cos 2x \\ 2 \sin x \cos x & = \sin 2x\end{align}$$
Because $\cos^2 x = 1 - \sin^2 x$ we can rewrite the first equation as $$1 - 2\sin^2 x = \cos 2x$$ and solving for $\sin^2 x $ we obtain $$\sin^2 x = \frac12(1-\cos 2x).$$  The point of all this is: the right-hand side of the last equation is very easy to integrate: $$\int \sin^2 x \; dx = \\\int\frac12(1-\cos 2x)\;dx  = \frac x2 - \frac14\sin 2x + C$$
You can similarly use De Moivre's formula to express $\sin^4 x$ in terms of sines and cosines of various multiples of $x$ and obtain a complicated expression for $\sin^4 x$ in terms of $\sin 4x, \cos 4x$ , and so forth.  The expression you get is more complicated, but  is nevertheless easy to integrate.  The details will be more complicated that the example I worked above, but the idea is the same.
A: In order to evaluate the integral we have by De Moivre
$$(\cos x+i\sin x)^4=\cos4x+i\sin4x$$
Expanding the left hand side results in
$$\cos^4x+4i\cos^3x\sin x-6\cos^2x\sin^2x-4i\cos x\sin^3x+\sin 4x=\cos4x+i\sin4x$$
Equating the real component on both sides of the equation, we have
$$\cos^4x-6\cos^2x\sin^2x+\sin^4x=\cos4x$$
Rearranging this (and using some trig identities, including the double angle formula for $\cos$) results in
$$\begin{align}\sin^4x&=\cos4x+6\cos^2x\sin^2x-\cos^4x\\\sin^4x&=\cos4x-6(1-\sin^2x)\sin^2x-(1-\sin^2x)^2\\8\sin^4x &=\cos4x-4\color{blue}{(1-2\sin^2x)}+3\\\sin^4x &=\frac{1}{8}\cos4x-\frac{1}{2}\color{blue}{\cos2x}+\frac{3}{8}\end{align}$$
Thus the integral simplifies to
$$\int\sin^4x\ dx =\int\frac{1}{8}\cos4x-\frac{1}{2}\cos2x+\frac{3}{8}\ dx\\=\frac{1}{32}\sin4x-\frac{1}{4}\sin2x+\frac{3}{8}x+c$$
