Forming a polynomial to show that $\cos\left(\frac{2\pi}{17}\right)$ is algebraic I know if $x=e^{\frac{2\pi i}{17}}$ then $x^{17}=1$ and $\Re(x)=\cos\left(\frac{2\pi}{17}\right)$.
But how do I form a polynomial which has root $\cos\left(\frac{2\pi}{17}\right)$.
I know you can consider de Moivre's theorem and expand the LHS using binomial theorem but that will take a long time.

Consider that
$$\sin{\left ( \frac{9 \pi}{17} \right )} = \sin{\left ( \frac{8 \pi}{17} \right )} $$
or, letting $y = \frac{\pi}{17}$,
$$3 \sin{3 y} - 4 \sin^3{3 y} = 2 \sin{4 y} \cos{4 y} $$
or
$$9 \sin{y} - 120 \sin^3{y} + 432 \sin^5{y} - 576 \sin^7{y} + 256 \sin^9{y} \\= 8 \sin{y} \cos{y} (2 \cos^2{y}-1) [2 (2 \cos^2{y}-1)^2-1] $$
Note that $\sin{y}$ cancels on both sides.  Using $\sin^2{y}=1-\cos^2{y}$, we get an $8$th degree polynomial in $\cos{y}$, from which $\cos{2 y} = 2 \cos^2{y}-1$ may be determined.
