Problem

Prove the identity

\displaystyle\cos \frac{\pi}{7}-\cos \frac{2\pi}{7}+\cos \frac{3\pi}{7} = \frac{1}{2}.

Solution

Use the identity \cos \frac{5\pi}{7} = -\cos \frac{2\pi}{7} to replace the identity at hand with

\displaystyle\cos \frac{\pi}{7}+\cos \frac{3\pi}{7}+\cos \frac{5\pi}{7} = \frac{1}{2}.

Multiply the left-hand side of the latter by 2\sin \frac{\pi}{7} and use the well known formula

\displaystyle\cos\alpha\cdot\sin\beta = \frac{1}{2}(sin(\alpha+\beta)-sin(\alpha-\beta)).

Let X be the left-hand side: \displaystyle X=\cos \frac{\pi}{7}+\cos \frac{3\pi}{7}+\cos \frac{5\pi}{7}. Then

\displaystyle2X\sin\frac{\pi}{7} = \sin\frac{2\pi}{7} + (\sin(\frac{4\pi}{7})-\sin\frac{2\pi}{7}) + (\sin\frac{6\pi}{7}-\sin\frac{4\pi}{7}) = \sin\frac{6\pi}{7} = \sin\frac{\pi}{7},

implying the required X = \frac{1}{2}.

The same idea works to prove that also, say,

\displaystyle\cos \frac{\pi}{9}+\cos \frac{3\pi}{9}+\cos \frac{5\pi}{9}+\cos \frac{7\pi}{9} = \frac{1}{2},

which - in passing - is the same as

\displaystyle\cos \frac{\pi}{9}-\cos \frac{2\pi}{9}+\cos \frac{5\pi}{9}-\cos \frac{6\pi}{9} = \frac{1}{2}.

More generally,

\displaystyle\sum_{i=1}^{n}\cos\frac{(2i-1)\pi}{2n+1}=\frac{1}{2}.

Here, too, multiplication by \displaystyle2\sin\frac{\pi}{2n+1} leads to a telescoping phenomenon wherein all the terms in a sum but one cancel each other.