# Finding a polynomial equation with rational coefficients [closed]

How do I find a degree 3 polynomial equation with rational coefficients having x = cos((2*pi)/7) as a root?

If $z=e^{2\pi k i/7}, z^7=1$

So, the roots of $0=\dfrac{z^7-1}{z-1}=z^6+z^5+z^4+z^3+z^2+z+1$ are $e^{2\pi k i/7},1\le k\le6$

Divide both sides by $z^3$ to find $$z^3+\dfrac1{z^3}+z^2+\dfrac1{z^2}+z+\dfrac1z+1=0$$

Now $z+\dfrac1z=2\cos\dfrac{2k\pi}7$

and use $a^3+b^3=(a+b)^3-3ab(a+b)$ and $a^2+b^2=(a+b)^2-2ab$

The $7$-th roots of unity are the roots of $x^7-1=0$, so the interesting ones are solutions of $$x^6+x^5+x^4+x^3+x^2+x+1=0.\tag{1}$$ This equation can be rewritten as $$(x^3+x^{-3})+(x^2+x^{-2})+(x+x^{-1})+1=0.\tag{2}$$ (We divided through by $x^3$.) Let $t=(x+x^{-1})/2$. Express $x^2+x^{-2}$ and $x^{3}+x^{-3}$ in terms of $t$.

We get $x^2+x^{-2}=(2t)^2-2$ and $x^3+x^{-3}=(2t)^3-6t$. So the equation (2) can be expressed as a cubic in $t$. Specifically, $$(2t)^3-6t+(2t)^2-2+2t+1=0.\tag{3}$$

Since $e^{2\pi i/7}$ is a root of (1), it follows that our cosine, which is $\frac{e^{2\pi i/7}+e^{-2\pi i/7}}{2}$, is a root of (3).