2. It is known that $\operatorname{tg} \alpha$ and $\operatorname{tg} 3 \alpha$ are integers. Find all possible values of $\operatorname{tg} \alpha$.

Answer: $-1 ; 0$ or 1.
Solution. Let $\operatorname{tg} \alpha=n$, and $\operatorname{tg} 3 \alpha=k$. Using the formula for the tangent of a triple angle (or deriving it), we get: $k=\frac{3 n-n^{3}}{1-3 n^{2}}$.

Transform the equation: $k\left(3 n^{2}-1\right)=n\left(n^{2}-3\right)$.

Let $|n|>1$.

Thus, $\left(3 n^{2}-1\right)$ and $n$ are coprime, and therefore, $k=p n$. Then the equation will take the form: $p\left(3 n^{2}-1\right)=\left(n^{2}-3\right)$. Since both brackets are positive numbers, $p$ is also a positive number.

Transform the equation to a new form: $(3 p-1) n^{2}=p-3$.

Since $(3 p-1)$ is also a positive number, we get the following inequality: $4(3 p-1) \leq p-3 \Leftrightarrow 11 p \leq 1 \Leftrightarrow p \leq \frac{1}{11}$. Contradiction. It remains to consider the values $n=-1 ; 0$ or 1 and verify that they fit for the corresponding angles $\alpha=-\frac{\pi}{4} ; 0 ; \frac{\pi}{4}$.

Criteria. If the solution is incorrect - 0 points.

Only the correct answer - 1 point.

If the reasoning is correct and there is a computational error - 3 points. If the solution is correct - 7 points.