<s>[INST] Rational solutions for $\tan(\pi x)=y$ Is there a rational solution for the following equation?
$$\tan (\pi x)=y\\y\neq-1,0,1$$
I guess there is none, but I have no idea how to solve/prove it.
EDIT: I think also that if $y$ is rational, then $x$ is not even algebraic, but this must be much harder to prove.
 [/INST] Step 1: Define Chebyshev polynomials as $T_0(x) = 1$, $T_1(x) = x$, $T_{n + 1}(x) = 2x T_n(x) - T_{n - 1}(x)\ (n \geqslant 1)$. It is well-known that (See Wiki)$$
T_n(\cos θ) = \cos(nθ). \quad \forall θ \in \mathbb{R}
$$
Now define $S_n(x) = 2T_n\left( \dfrac{x}{2} \right)$, then $S_0(x) = 1$, $S_1(x) = x$, $S_{n + 1}(x) = x S_n(x) - S_{n - 1}(x)\ (n \geqslant 1)$. It is easy to prove by induction that $S_n \in \mathbb{Z}[x]$, $\deg S_n = n$ and $S_n(x)$ is monic, i.e. the leading coefficient of $S_n(x)$ is $1$.

Step 2: If $a, b \in \mathbb{Q}$ satisfy $\cos(πa) = b$, then $b \in \left\{ 0, \pm\dfrac{1}{2}, \pm1 \right\}$.

Proof: Suppose $a = \dfrac{c_1}{d_1}$, $2b = \dfrac{c_2}{d_2}$, where $c_1, c_2 \in \mathbb{Z}$, $d_1, d_2 \in \mathbb{N}_+$, and $(c_1, d_1) = (c_2, d_2) = 1$. On the one hand,$$
S_{2d_1}(2b) = 2T_{2d_1}(b) = 2T_{2d_1}\left( \cos\left( \frac{πc_1}{d_1} \right) \right) = 2\cos(2πc_1) = 1.
$$
On the other hand, suppose that $S_{2d_1}(x) = x^{2d_1} + \sum\limits_{k = 0}^{2d_1 - 1} a_k x^k$, where $a_k \in \mathbb{Z}$, then$$
d_2^{2d_1 - 1} = d_2^{2d_1 - 1} S_{2d_1}(2b) = \frac{c_2^{2d_1}}{d_2} + \sum_{k = 0}^{2d_1 - 1} a_k c_2^k d_2^{2d_1 - k - 1} \in \mathbb{Z} \Longrightarrow d_2 \mid c_2^{2d_1} \Longrightarrow d_2 = 1,
$$
i.e. $2b \in \mathbb{Z}$. Note that $|b| \leqslant 1$, thus $b \in \left\{ 0, \pm\dfrac{1}{2}, \pm1 \right\}$.

Step 3: If $x, y \in \mathbb{Q}$ satisfy $\tan(πx) = y$, then $y \in \{0, \pm1\}$.

Proof: Note that $2x \in \mathbb{Q}$ and$$
y^2 = \tan^2(πx) = \frac{1}{\cos^2(πx)} - 1 \Longrightarrow \cos(π·2x) = 2\cos^2(πx) - 1 = \frac{1 - y^2}{1 + y^2} \in \mathbb{Q},
$$
thus $\dfrac{1 - y^2}{1 + y^2} \in \left\{ 0, \pm\dfrac{1}{2}, \pm1 \right\}$.
If $\dfrac{1 - y^2}{1 + y^2} = 0$, then $y = \pm1$ and $x$ can be taken as $\pm\dfrac{1}{4}$. If $\dfrac{1 - y^2}{1 + y^2} = 1$, then $y = 0$ and $x$ can be taken as $0$. If $\dfrac{1 - y^2}{1 + y^2} = -1$, then $1 - y^2 = -1 - y^2 \Rightarrow 1 = -1$, a contradiction. If $\dfrac{1 - y^2}{1 + y^2} = \dfrac{1}{2}$, then $y^2 = \dfrac{1}{3}$, a contradiction. If $\dfrac{1 - y^2}{1 + y^2} = -\dfrac{1}{2}$, then $y^2 = 3$, a contradiction. Therefore, $y \in \{0, \pm1\}$.
</s>