<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 can use theory of equations (and some disguised Galois theory).
Given equation can be rewritten as $(2x)^3-(2x)^2 -2( 2x)+1=0$. So we need to show $2\cos \theta $ is a root of $x^3-x^2-2x+1=0$. We will do this by showing there is a cubic equation with integer coefficients satisfied by $2\cos\theta$, and determine the other two roots, and from that reconstruct the equation.
First let us write $\pi/7 = 2\pi/14=\theta$. Let $\alpha=e^{2\pi i/14}$, a primitive 14th root of unity. 
Clearly $-\alpha$ is a  primitive $7$th root of unity.  The latter is any solution of $x^6+x^5+x^4+x^3+x^2+x+1=0$. This tells us that $\alpha$ is a root of $x^6-x^5+x^4-x^3+x^2-x+1=0$.
Now  $\alpha+\bar\alpha = 2\cos\theta=\alpha+\alpha^{13}$. We will compute the polynomials satisfied by this number.
The Galois conjugates (the other roots) of $\alpha+\alpha^{13}$ are $\alpha^3+\alpha^{11},\alpha^5+\alpha^9$ (pair numbers less than 14 and coprime to it such that they add up to 14, and sum the corresponding powers of $\alpha$.)
It is a cubic with roots $a,b,c$ where $a=\alpha+\alpha^{13}, b=\alpha^3+\alpha^{11}, c=\alpha^5+\alpha^9$. So we need to calculate $a+b+c, ab+bc+ca$ and $abc$. So it boils down to showing $a+b+c=1, ab+bc+ca=-1, 
abc=-1$. Now this is a routine verification using the fact that $\alpha^{14}=1$,
</s>