How to prove $\cos\left(\pi\over7\right)-\cos\left({2\pi}\over7\right)+\cos\left({3\pi}\over7\right)=\cos\left({\pi}\over3 \right)$
Solution 1:
Let $w = \cos \left ( \frac{2\pi}{7} \right ) + i\sin \left ( \frac{2\pi}{7} \right )$ so that $w^7 = 1$. Thus
$$\begin{align*} w^7 - 1 &= 0\\ (w-1)(w^6 + w^5 + w^4 + w^3 + w^2 + w + 1) &= 0\\ w^6 + w^5 + w^4 + w^3 + w^2 + w + 1 &= 0 &&\text{since } w \ne 1\\ \left ( w^3 + w^{-3} \right ) + \left ( w^2 + w^{-2} \right ) + \left ( w + w^{-1} \right ) &= -1 &&\text{since } w \ne 0\\ \end{align*}$$
Since $w + w^{-1} = \cos \left ( \frac{2\pi}{7} \right ) + i\sin \left ( \frac{2\pi}{7} \right ) + \cos \left ( - \frac{2\pi}{7} \right ) + i\sin \left ( - \frac{2\pi}{7} \right ) = 2\cos \left ( \frac{2\pi}{7} \right )$, using de Moivre's theroem:
$$\begin{align*} 2\cos \left ( 3\times \frac{2\pi}{7} \right ) + 2\cos \left ( 2\times \frac{2\pi}{7} \right ) + 2\cos \left ( \frac{2\pi}{7} \right ) &= -1\\ \cos \left ( \frac{6\pi}{7} \right ) + \cos \left ( \frac{4\pi}{7} \right ) + \cos \left ( \frac{2\pi}{7} \right ) &= -\frac{1}{2}= -\cos \left (\frac{\pi}{3} \right ) \end{align*}$$
Using $\cos(\theta) = -\cos \left (\pi - \theta \right )$:
$$-\cos \left ( \frac{\pi}{7} \right ) - \cos \left ( \frac{3\pi}{7} \right ) + \cos \left ( \frac{2\pi}{7} \right ) = -\cos \left (\frac{\pi}{3} \right )$$
And hence
$$\cos \left ( \frac{\pi}{7} \right ) - \cos \left ( \frac{2\pi}{7} \right ) + \cos \left ( \frac{3\pi}{7} \right ) = \cos \left (\frac{\pi}{3} \right )$$
Solution 2:
Yes, This problem in 1963 IMO.http://www.artofproblemsolving.com/Forum/viewtopic.php?p=346908&sid=8ad587e18dd5fa9dd5456496a8daadfd#p346908