# Generate a polynomial w/ integer coefficients whose roots are rational values of sine/cosine?

I'm a high school calculus/precalculus teacher, so forgive me if the question is a little basic. One of my (very gifted) students recently came up with a construction yielding a quartic, one of whose roots was sin(80º) -- which led me to the startling discovery that this (and, indeed, all rational values of sine/cosine (in degrees; that is, rational multiples of π)) are algebraic.

I've come across a number of proofs that the numbers are algebraic since, which, as I understand it, goes back to complex roots of unity. What I -haven't- seen, and would very much like to see/understand, is some general method for generating/constructing polynomials (w/ integer coefficients) whose roots are sine/cosine of rational values (in degrees). (My student's method only works for 80º/10º, 70º/20º, and 75º/15º, unfortunately). Would much appreciate...

-
Isn't there a simpler method, though? I'm not talking about primitive polynomials -- just generating a polynomial w/ integer coefficients (something accessible to a high-school student). Obviously for 72º, for example, I can put cis(72º) to the 5th power and equate real/imaginary parts (then relate cos/sin) to generate for those values... Wait, maybe I just answered my own question -- I guess I could do that for any of them, right? I would just wind up with enormous polynomials for 80º=2π/18 -- and not my student's nice quartic... – Ben Oct 22 '12 at 2:43
And, again, there is the underlying point that $\sin x={1\over 2i}(e^{ix}-e^{-ix})$ with $i=\sqrt{-1}$, so, more algebraically, $\sin(\pi/n)$ is half the sum of a primitive nth root of unity and its complex conjugate. Primitive nth roots of unity satisfy $x^n-1=0$ and no smaller exponent equation of this type. There is a substantial literature on the "cyclotomic polynomials" which have roots which are primitive roots of unity of various orders, and this may be more conceptual than the common treatment of (T)Chebyshev polynomials... though one would surely want to look at both/all. – paul garrett Oct 22 '12 at 2:44
@Ben: Chebyshev polynomials are as simple as it gets. The polynomials you get in this way aren't irreducible in general. – Qiaochu Yuan Oct 22 '12 at 2:55
@Ben: It may help to note that the Tchebyshev polynomials are essentially the multiple-angle formulas for the trig functions. – Hurkyl Oct 22 '12 at 4:36

If you like composing polynomials and Fermat's little theorem (and don't care about getting huge polynomials), you can use the facts that $\cos(2x) = 2\cos(x)^2 - 1$ and that if $x$ is a rational multiple of $\pi$, there will always be exponents $n$ and $m$ such that $\cos(2^n x) = \cos(2^m x)$.
Let $P(X) = 2X^2-1$.
If $x = \frac {2a \pi}b$ with odd $b$, then $2^{\phi(b)} = 1 \pmod {b}$, so that $2^{\phi(b)}x = x \pmod {2\pi}$, which means that $P^{(\phi(b))}(X) - X = P \circ P \circ \ldots \circ P (X) - X$ has $\cos(x)$ as a root.
And if $x = \frac {2a \pi}{b2^c}$ with odd $b$, you only have to pre-compose the above polynomial by $P$ $c$ times, so you get that $P^{(\phi(b)+c)}(X) - P^{(c)}(X)$ has $\cos(x)$ as a root.
And all the roots of those polynomials are some cosines of rational multiples of $\pi$ too.