I've been thinking a bit about finding the minimal polynomials of side lengths of regular $n$-gons inscribed in the unit circle. For example, I recently wanted to find the minimal polynomial of the side length of an inscribed regular nonagon. Using the law of cosines, I was able to find that the side length is $a=\sqrt{2-2\cos(\frac{2\pi}{9})}$.
So $\displaystyle \frac{2-a^2}{2}=\cos \left(\frac{2\pi}{9} \right)$, but since I can't express $\displaystyle\cos \left(\frac{2\pi}{9} \right)$ in terms of rational numbers or their square roots, I'm unsure of how to proceed exactly. Is there a usual method to attack values like this? Possibly for say $\displaystyle \cos \left(\frac{m\pi}{n} \right)$?
Thanks.