TITLE: Find the 3rd degree of polynomial having trigonometry as a root
QUESTION [5 upvotes]: I am struggling to solve the problem that asking to find the 3rd degree of polynomial having all coefficients as integers, which satisfying 
$f(\cos \frac{\pi}{7})=0$. 
I know that I should use the euler's equation, but I don't know how to apply it to this problem. 
In detail, I know I should use the fact that $e^{(\frac{\pi i}{7})}$ is the root for $\frac{(x^7+1)}{x+1}$ = $x^6-x^5+x^4-x^3+x^2-x+1 = 0 $, but it is really hard for me to find how to use that fact to solve the problem.
Thank you.

REPLY [5 votes]: MORE DETAILS
You want a relation involving only $\;c:=\cos\left(\frac{\pi}7\right)\,$ the real part of $\,x=e^{i\pi/7}\,$ such that :
$$x^6-x^5+x^4-x^3+x^2-x+1 = 0$$
Divide by $x^3$ to get :
\begin{align}
\tag{1}&\bigl(x^3+x^{-3}\bigr)-\bigl(x^2+x^{-2}\bigr)+\bigl(x^1+x^{-1}\bigr)=1\\
\end{align}
But 
\begin{align}
\tag{2}(2\;c)=\left(x+\frac 1x\right)^1&=\bigl(x^1+x^{-1}\bigr)\\
\tag{3}(2\;c)^2=\left(x+\frac 1x\right)^2&=\bigl(x^2+x^{-2}\bigr)+2\\
\tag{4}(2\;c)^3=\left(x+\frac 1x\right)^3&=\bigl(x^3+x^{-3}\bigr)+3\,\bigl(x^1+x^{-1}\bigr)\\
\end{align}
so that everything may be written in function of $\,c\,$ only :

from $(2)$ and $(4)$ deduce $\,\bigl(x^3+x^{-3}\bigr)=(2\;c)^3-3\,(2\;c)\,$,  
from $(3)$ deduce $\,\bigl(x^2+x^{-2}\bigr)$
from $(2)\ \cdots$  

Conclude !