Why $\cos^2 x-\sin^2 x = \cos 2x\;?$ I was hoping someone could explain how $\cos^2 x-\sin^2 x = \cos 2x$
After using the product rule to differentiate $\sin x \cdot \cos x$ I get the answer $\cos^2 x - \sin ^2 x$ I've come across this problem twice now and each time I've gotten the same wrong so I'm hoping someone can point out what I'm missing.

Algebraic proof. $$\cos(2x)=\cos(x+x)=\cos x \cos x - \sin x \sin x = \cos^2 x - \sin^2 x$$
Using de Moivre's formula. $$\cos(2x) + i \sin(2x) = (\cos x + i \sin x)^2 = \\ \cos^2 x + i^2 \sin^2 x + 2i \cos x \sin x = \cos^2 x - \sin^2 x + 2i \cos x \sin x .$$ 
From here we get $\cos(2x) = \cos^2 x - \sin^2 x.$
You can find more hints at ProofWiki.
