# Why is $1 - 2\cos^2(\frac{\pi n} {4})$ the same as $-\cos(\frac{\pi n} {2})$?

Why is $$1 - 2\cos^2(\frac{\pi n} {4})$$ the same as $$-\cos(\frac{\pi n} {2})$$

I think the 1 in here, I can just neglect when I look at borders from $[-\infty , \infty]$.
But what's going on with the cosine in here?

-
Use $\cos(2t)=\cos(t)^2-\sin(t)^2=2\cos(t)^2-1$ –  Raymond Manzoni Sep 2 '12 at 15:36

If you know the double angle formula $$\cos 2x=2\cos^2 x-1,$$ then the result follows immediately. Just let $x=\frac{\pi n}{4}$.

The double-angle formula follows from the "cosine of a sum" formula $$\cos(x+y)=\cos x\cos y-\sin x\sin y.$$ Put $x=y$, and you get $\cos 2x=\cos^2 x-\sin^2 x$. But $\sin^2 x=1-\cos^2 x$, so $\cos^2 x -\sin^2 x=\cos^2 x-(1-\cos^2 x)=2\cos^2 x-1$.

Another way: However, you do not even need the double angle formula to deal with this particular problem. The cosine function has period $2\pi$, so all you need to do is to calculate both sides for $n=0, 1, 2, \dots, 7$. The individual calculations are not difficult. For example, if $n=1$, then $\cos(\pi n/4)=\cos(\pi/4)=1/\sqrt{2}$. So $1-2\cos^2(\pi/4)=1-2/2=0$. Note that $-\cos(\pi/2)=0$, so the result is correct for $n=1$. Seven more to go.

But not really $7$. For $\cos(2\pi-x)=\cos x$, so we don't have to check beyond $n=4$.

-

This follows by the ordinary addition formula for the cosine function $$\cos(x+y)=\cos(x)\cos(y)-\sin(x)\sin(y)$$ and by noting that $$1=\sin^2(x)+\cos^2(x)$$

i.e.

$$1-2\cos^2(x)=\sin^2(x)-\cos^2(x)=-\cos(2x)$$ Lastly plug in $x=\frac{\pi n}{4}$

-