<s>[INST] Trigonometric polynom Prove that $$\cos\frac{\pi}{7},\cos\frac{3\pi}{7},\cos\frac{5\pi}{7}$$ roots of polynomial $8x^3-4x^2-4x+1=0$
I'm confused, what can i do with $\frac{\pi}{7}$
 [/INST] Let $z=e^{\frac{i\pi}{7}}$. Then $\cos (\frac{\pi}{7})=\frac{z+z^{-1}}{2}$, $\cos (\frac{2\pi}{7})=\frac{z^2+z^{-2}}{2}$, $\cos (\frac{3\pi}{7})=\frac{z^3+z^{-3}}{2}$. Also $0=\frac{z^7-1}{z-1}=1+z+z^2+z^3+z^4+z^5+z^6$. As $z\ne0,$ divide both sides by $z^3$ to get $$z^3+\frac1{z^3}+z^2+\frac1{z^2}+z+\frac1z+1=0.$$
Now use $$\displaystyle z^2+\frac1{z^2}=\left(z+\frac1z\right)^2-2,\quad z^3+\frac1{z^3}=\left(z+\frac1z\right)^3-3\left(z+\frac1z\right)$$
to obtain a cubic polynomial with the above roots.
</s>