<s>[INST] Prove that $\cos(\pi/7)$ is root of equation $8x^3-4x^2-4x+1=0$ 
Prove that $\cos\theta$ is root of equation $8x^3-4x^2-4x+1=0$, given $\theta=\frac{\pi}{7}$.

I put $\cos\theta$ in equation, but couldn't show the left-hand side to be zero.
 [/INST] We have
$$ \cos{2\theta} = 2\cos^2{\theta}-1 \\
\cos{3\theta} = \cos{\theta}(2\cos^2{\theta}-1) - 2\sin^2{\theta}\cos{\theta} = 4\cos^3{\theta}-3\cos{\theta}, $$
so
$$ \cos^2{\theta} = \frac{1}{2}(\cos{2\theta}+1) \\
\cos^3{\theta} = \frac{1}{4}(\cos{3\theta}+3\cos{\theta}) $$
Putting these into the equation gives
$$ 8\cos^{3}{\theta}-4\cos^2{\theta}-4\cos{\theta}+1 \\
= 2\cos{3\theta}+6\cos{\theta} -2\cos{2\theta}-2-4\cos{\theta}+1 \\
= -1+2(\cos{3\theta}-\cos{2\theta}+\cos{\theta}) = \frac{\cos{(7x/2)}}{\cos{(x/2)}}, $$
the last part of which comes from the formula
$$ \sum_{k=-n}^n (-1)^k \cos{kx} = (-1)^n \frac{\cos{(n+1/2)x}}{\cos{(x/2)}}, $$
which can be proven by induction. It's then clear that this is zero if $x$ is a zero of $\cos{(7x/2)}$, but not $\cos{(x/2)}$, and the first one of these is $\theta=\pi/7$.
</s>