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)$ Is there an easy way to prove the identity?

$$\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 )$$

While solving one question, I am stuck, which looks obvious but without any feasible way to approach. 
Few observations, not sure if it would help
$$
\begin{align}
\dfrac{\dfrac{\pi}{7}+\dfrac{3\pi}{7}}{2} &= \dfrac{2\pi}{7}\\\\
\dfrac{\pi}{7} + \dfrac{3\pi}{7} + \dfrac{2\pi}{7} &= \pi - \dfrac{\pi}{7}
\end{align}
$$
 A: 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 )$$
A: Yes, This problem in 1963 IMO.http://www.artofproblemsolving.com/Forum/viewtopic.php?p=346908&sid=8ad587e18dd5fa9dd5456496a8daadfd#p346908
A: Because $$\cos \frac{\pi}{7} - \cos\frac{2\pi}{7} + \cos\frac{3\pi}{7} = \frac{2\sin\frac{\pi}{7}\cos \frac{\pi}{7} - 2\sin\frac{\pi}{7}\cos\frac{2\pi}{7} + 2\sin\frac{\pi}{7}\cos\frac{3\pi}{7}}{2\sin\frac{\pi}{7}}=$$
$$=\frac{\sin\frac{2\pi}{7}- \sin\frac{3\pi}{7}+\sin\frac{\pi}{7} + \sin\frac{4\pi}{7}-\sin\frac{2\pi}{7}}{2\sin\frac{\pi}{7}}=\frac{\sin\frac{\pi}{7}}{2\sin\frac{\pi}{7}}=\frac{1}{2}=\cos\frac{\pi}{3}.$$
A: Hint


*

*$$ \cos A + \cos B = 2 \cos \left( \dfrac{A + B}{2} \right) \cos \left( \dfrac{A - B}{2} \right) $$

*$$ \cos A - \cos B = - 2 \sin \left( \dfrac{A + B}{2} \right) \cos \left( \dfrac{A - B}{2} \right) $$

*$$ \cos \left( \dfrac{2 \pi}{7} \right) = \cos { \left( 2 \theta \right) } \tag{ $ \theta = \dfrac{\pi}{7}$ } $$

*$$ - \cos \left( \dfrac{2 \pi}{7} \right) = \cos { \left( \pi -\dfrac{2\pi}{7} \right) } = \cos { \left( \dfrac{5\pi}{7} \right) } $$

