Find all $\alpha$ such that $\frac{\cos \alpha - a \sin \alpha}{a \cos \alpha + \sin \alpha}$ is rational (given $a$ rational) Given $a$ rational, find all $\alpha$ such that the expression
$$\frac{\cos \alpha - a \sin \alpha}{a \cos \alpha + \sin \alpha}$$
is rational
 A: Let $\beta = arctan(a)$
Then the expression becomes
$$\frac{\cos \alpha - \tan \beta \sin \alpha}{\tan \beta \cos \alpha + \sin \alpha}$$
Divide both the numerator and denominator by $\cos \alpha$ to get
$$\frac{1 - \tan \beta \tan \alpha}{\tan \beta + \tan \alpha} = \frac{1}{\tan (\alpha + \beta)}$$
So we want to find all $\alpha$ such that $\tan (\alpha + \beta)$ is rational.
So the set of all $\alpha$ is given by $arctan(Q)-\beta+\pi k=arctan(Q)-arctan(a)+\pi k$ where Q is a rational number and k is an integer.
A: If $\cos\alpha=0$ then the expression equals $-a$ and so is rational.  Suppose therefore, that $\cos\alpha\neq0$. On dividing numerator and denominator by $\cos\alpha$, the expression becomes $$\frac{1-a\tan\alpha}{a+\tan\alpha}\tag1$$ which is clearly  rational if $\tan\alpha$ is rational.
On the other hand, setting $(1)$ equal to $\frac pq$ and solving for $\tan\alpha$ gives a rational expression for $\tan\alpha$, so that we see that $(1)$ is rational if and only if $\tan\alpha$ is rational.
If you want values such that $\frac\alpha\pi$ is rational, then Niven's Theorem  says that this only occurs when $\tan\alpha\in\{-1,0,1\}$
