Is there a usual method for finding the minimal polynomial of trigonometric values? 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.
 A: Usually it's a pain to do so, for instance for $\displaystyle \cos(\frac {2\pi}9)$, you use the triple angle cosine formula :
$$
\cos 3\theta = 4\cos^3(\theta) - 3 \cos (\theta).
$$
since substituting $\displaystyle \theta = \frac{2\pi}9$, you can evaluate $\displaystyle \cos \left( \frac{2\pi}3 \right) = -1/2$, which gives you rational coefficients in $\displaystyle \cos \left(\frac{2\pi}9\right)$. I wouldn't say there is a "general method" because I would never do that in general, but a trick to compute the minimal polynomial of $\displaystyle \cos \left(\frac{m\pi}n \right)$ would be to use trigonometric identities to express $\cos n\theta$ in a polynomial that is in terms of $\cos \theta$, or at least $\cos k\theta$ where $k$ divides $n$ so that when you substitute $\theta = $ your angle, you obtain a remarquable angle (like in the $\displaystyle \frac{2\pi}9$ case, we chose $3$ instead of $9$) . Such a polynomial exists, and they are detailed in the following link :
http://en.wikipedia.org/wiki/List_of_trigonometric_identities#Multiple-angle_formulae
Look for the multiple angle formulas, Tchebyshev and spread polynomials. They give you formulas for the sine and cosine. 
For instance, would you be computing the minimal polynomial of $\displaystyle \cos \left(\frac{7\pi}{16} \right)$ for any reason, since the quarters are remarquable angles, I'd go for the $4^{\text{th}}$ Tchebyshev polynomial : $T_4(x) = 8x^4 - 8x^2 + 1$, so that 
$$
\cos(4 \theta) = 8\cos^4 \theta - 8 \cos^2 \theta + 1,
$$
hence $\displaystyle \cos \left(\frac{7\pi}4 \right) = 1/\sqrt{2}$, so that
$$
(8x^4 - 8x^2 + 1)^2 - 1/2 = 0
$$
would be a polynomial of which $\displaystyle \cos \left(\frac{7\pi}{16} \right)$ is a root. Expanding it and multiplying by $2$ to get rid of fractions will give you
$$
128x^8 - 256x^6 + 160x^4 - 32x^2 + 1 = 0
$$
A: EDIT : Following Marty Green's approach, I managed to actually find the minimal polynomial explicitly. I think both of you (Marty and Dom) will appreciate. Write 
$$
2 \cos \left( \frac{2\pi}9 \right) = \zeta_2 + \zeta_7
$$
where $\zeta_2$ and $\zeta_7$ are the second and seventh rooth of unity, respectively. Now we try to find the minimal polynomial for $\zeta_2 + \zeta_7$ (if we found it then substituting $\zeta_2 + \zeta_7 = x = 2y$ in the polynomial gives us our wished polynomial). Notice that
$$
x^9 -1 = \prod_{d \mid n} \Phi_d(x) = (x-1)(x^2+x+1)(x^6 + x^3 + 1)
$$
where $\Phi_d(x)$ is the cyclotomic polynomial of the $d^{\text{th}}$ roots of unity. Now since 
$$
\phi_9(x) = x^6 + x^3 + 1 = \prod_{(i,9)=1}(x-\zeta_i) 
$$
and developping this product to obtain the symmetric polynomials in the $\zeta_i$ as coefficients of $\phi_9(x)$, we obtain the two useful identities :
$$
\sum_{(i,9)=1} \zeta_i = 0, \quad \underset{i \neq j}{\sum_{(i,9)=(j,9)=1}} \zeta_i \zeta_j = 0.
$$
Now we also have the identity $\zeta_6 + \zeta_3 + 1 = 0$ since $\zeta_3$ is a root of $x^2 + x + 1$. Hence we have
$$
(x-(\zeta_1 + \zeta_8))(x-(\zeta_2 + \zeta_7))(x-(\zeta_4 + \zeta_5)) = 
$$
$$
x^3 - ((\zeta_1 + \zeta_8) + (\zeta_2 + \zeta_7) + (\zeta_4 + \zeta_5))x^2 + 
$$
$$
((\zeta_1 + \zeta_8)(\zeta_2 + \zeta_7) + (\zeta_1 + \zeta_8)(\zeta_4 + \zeta_5) + (\zeta_2 + \zeta_7)(\zeta_4 + \zeta_5))x 
$$
$$
 - (\zeta_1 + \zeta_8)(\zeta_2 + \zeta_7)(\zeta_4 + \zeta_5).
$$
Since the sum of the roots of $\Phi_9$ is $0$, the quadratic term vanishes. For the linear term, notice that all pairs of roots appear as products of two roots beside the ones that are together in the sum, i.e. $\zeta_1 \zeta_8$, $\zeta_2 \zeta_7$ and $\zeta_4 \zeta_5$. Hence if we call the linear term $\alpha$, 
$$
\alpha = \left( \underset{i \neq j}{\sum_{(i,9)=(j,9)=1}} \zeta_i \zeta_j \right) - \zeta_1\zeta_8 - \zeta_2 \zeta_7 - \zeta_4 \zeta_5 = 0 - \zeta_9 - \zeta_9 - \zeta_9 = -3.
$$
Now for the constant in the end, develop it manually to have something like this :
$$
 - (\zeta_1 + \zeta_8)(\zeta_2 + \zeta_7)(\zeta_4 + \zeta_5) =
$$
$$
 - (\zeta_1 \zeta_2 \zeta_4 + \zeta_1 \zeta_2 \zeta_5 + \zeta_1 \zeta_7 \zeta_4 + \zeta_1 \zeta_7 \zeta_5 + 
$$
$$
\zeta_8 \zeta_2 \zeta_4 + \zeta_8 \zeta_2 \zeta_5 + \zeta_8 \zeta_7 \zeta_4 + \zeta_8 \zeta_7 \zeta_5) = 
$$
$$
- (\zeta_7 + \zeta_8 + \zeta_3 + \zeta_4 + \zeta_5 + \zeta_6 + \zeta_1 + \zeta_2) = -(\zeta_3 + \zeta_6) = 1
$$
The last line is because the sum of the roots is $0$. Hence a polynomial for which $\zeta_2 + \zeta_7$ is a root is $x^3 - 3x + 1$. Making the variable change to get the polynomial for $\cos(2\pi / 9)$ gives us $8x^3 - 6x + 1 = 0$, which is irreducible (there are many possible answer to this irreducibility question non-rationality of the roots, rational root theorem, etc.) which I leave up to you.
P.S. I will never do that again, it's so painful... but it was fun. XD Hope you liked it.
A: I think I can point you in the direction of a very general algebraic way to construct things like the minimal polynomial for cos(2π/9 ). Start with the equation x^9 - 1 = 0, factor out the trivial factor of (x-1) and you get
x^8 + x^7 .... + 1 = 0, which has eight roots. Then factor out x^2 + x + 1 to get rid of the cube roots of 1, and you have six roots left. Because of their relation as ninth roots of unity, they can be enumerated as a, a^2, a^4, a^8, a^16 (=a^7) and a^32 (=a^5). The next term in the series is a^64 which is just equal to a. We can call these roots r1,r2,r4,r5,r7, and r8. It is then easy to choose sums of these roots to be the cosines of 40 degrees, 80 degrees, and 160 degrees:
r1 + r8
r2 + r7 
r4 + r5
If we call these a, b, and c, then the problem becomes one of constructing the symmetric polynomial:
abc
ab + bc + ca
a + b + c
The information available is the values for the symmetric polynomials in r1,r2,r4,r5,r7 and r8. (which you get directly from the coefficient of the six-degree equation for the r's). In addition you have the known relations between the r's, that is eg. r1r2 = r3.
I don't have the strength to carry it all through right now but I've done stuff like this in the past and its actually kind of fun and somehow it works, if I'm not mistaken.
A: The Chebyshev polynomials of the second kind have the property that:
$$U_n(\cos\theta) = \frac {\sin (n+1)\theta}{\sin \theta}$$
So $U_n(x)$ has roots equal to $\displaystyle \cos\left( {\frac{\pi k}{n+1}}\right)$.
You have to eliminate the roots of $U_8(x)$ that are roots of smaller polynomials.
