<s>[INST] A nice trignometric identity How to prove that:

$$\cos\dfrac{2\pi}{13}+\cos\dfrac{6\pi}{13}+\cos\dfrac{8\pi}{13}=\dfrac{\sqrt{13}-1}{4} $$

I have a solution but its quite lengthy, I would like to see some elegant solutions. Thanks!
 [/INST] As @Tunk-Fey said in the comment, we only need to show $4x^2 + 2x - 3 =0$ with $x = \cos\frac{2\pi}{13} + \cos\frac{6\pi}{13} + \cos\frac{8\pi}{13} $ since we know $x$ should be positive.
Take $\theta = \frac{2\pi}{13}$, $w = \exp(i\theta)$ and $$A = w + w^3 + w^4$$
$$B = w^{-1} + w^{-3} + w^{-4}$$
we have $A + B = 2x$, thus we only need to show $(A+B)^2 + A+B - 3 = 0$
We will need the following facts:
since we have $w^{13} - 1 = (w-1)\sum_{k=0}^{12}w^k=0$ thus $\sum_{k=0}^{12}w^k = 0$, dividing by $w^6$($\neq 0$) gives
$$\sum_{k=1}^6(w^k + w^{-k}) + 1 =0$$
and we have also $$w^5 + w^{-5} = w^8 + w^{-8}$$  $$w^6 + w^{-6} = w^7 + w^{-7}$$
Simple computation gives 
\begin{align}
(A+B)^2 =&w^2 + w^{-2} + w^{6} + w^{-6} + w^8 + w^{-8} + 6\\
&+2(w + w^{-1} + w^2 + w^{-2} + w^3 + w^{-3} + w^4 + w^{-4} + w^5 + w^{-5} + w^{7}+w^{-7}) \\
\end{align}
replacing $w^{7}+w^{-7}$ by $w^{6}+w^{-6}$ gives
\begin{align}
(A+B)^2 = &w^2 + w^{-2} + w^{6} + w^{-6} + w^8 + w^{-8} + 6+2(-1) \\
 =& w^2 + w^{-2} + w^5 + w^{-5} + w^6 + w^{-6} + 4
\end{align}
Now adding together $(A+B)^2$, $A+B$ and $-3$ allows to conclude.
</s>