Question: Given $q$ and $\cos(q\pi)$ to be rational, find all possible values of $\cos(q\pi)$
After some trial and error I think the possible values are $\{0,\pm 1,\pm 1/2 \}$. I could show that $\cos(q\pi)$ rational implies $\cos(2q\pi)$ is rational. But after that I couldn't find anything else.
Any help is appreciated.
You are on the right track: $\cos(2q\pi) = 2\cos^2(q\pi) - 1$. Suppose there is some value $\cos q\pi$ satisfying the requirements but is not in $\{0,\pm1,\pm1/2\}$, then repeatedly doubling the angle, we obtain a sequence of angles whose cosine is rational: $q\pi, 2q\pi, 2^2q\pi,\dots$. Let's say $q=m/n$ where $\gcd(m,n)=1$, and since after enough iterations we can obtain an angle $2^{k+1}m\pi/n$ where all the factors of $2$ in $n$ has been cancelled out by $2^k$, so we can further suppose that $n$ is odd and $m$ is even, to simplify matters.
Now with a little bit of modular arithmetic we see that there will eventually be a cycle : $\cos (2^km\pi/n)=\cos(m\pi/n) = x$. And we need to somehow prove that $x$ is irrational. The appearant choice is to expand $\cos (2^km\pi/n)$ completely so that we can get an equation for $x$. You can go for the formula $\cos 2x = 2\cos^2 x -1$, so what we actually get are the Chebyshev polynomials (don't be scared, I'm just giving them a name, we will investigate these polynomials ourselves): $$T_{2^k}(x) -x = 0.$$
We want to know whether this equation has a rational root, there is a quick way for this once you know the leading and constant coefficient of the LHS: Note that for $k>0$ the polynomial has the leading term $2^{2^k-1}x^{2^k}$ and constand term $\pm1$ (try to write out the first few cases, and think of a way to prove this with straightforward induction). So by the Rational root theorem the only possible rational roots are $\pm\frac1{2^j}, j=0,\dots,2^{2^k-1}$.
Not bad! We now know that the only possible rational values for $\cos q\pi$ are just $0$ and $\pm2^{-j}$ for some $j$ ($0$ was left out in the previous paragraph since we were considering $k>0$), so let's go ahead and verify that they do not satisfy the requirements unless $j=0,1$. Luckily, there is no more work, since the key to this lies in the very first sentence in this answer! If $\pm2^{-j}$ were a solution ($j>1$), then $2 \times (\pm2^{-j})^2 - 1 = 2^{-2j+1}-1$ would be another solution. But then it has to be $0$ or $\pm 2^{-j'}$ for some $j'$, since we've established that every solution must be of this form. But obviously this can't happen for $j>1$.
I was a little bit inaccurate when I said "case analysis". What I actually meant is that you can gain more insight by giving the denominator a name (in my answer, the name is $n$) and playing around with it. [This is often very important in solving math problems, since without a name, you cannot say much about an object!]