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.
 A: Let $v_2$ denote the $2$-adic valuation on $\Bbb Q$.
Let $$A=\{\,x\in\Bbb Q\mid \tan \pi x\in\Bbb Q\setminus\{-1,0,1\}\,\},$$
Suppose $x\in A$ with $\tan \pi x=\frac ab$. Then $a\ne \pm b$ and by the addition theorem, $$\tag 1\tan(2\pi x)=\frac {2ab}{a^2-b^2}\in\Bbb Q.$$ 
From $a,b\ne 0$, we see $\tan(2\pi x)\ne 0$; from $a^2-b^2\pm2ab=(a\pm b)^2-2\cdot b^2\ne 0$ (because $\sqrt 2$ is irrational), we see $\tan(2\pi x)\ne \pm1$. We conclude that  $$\tag2x\in A\implies 2x\in A.$$
More specifically:


*

*If $v_2(\tan\pi x)=0$, then $a,b$ are odd, hence $a^2\equiv b^2\pmod 8$ and so $v_2(\tan2\pi x)\le -2$.

*If $v_2(\tan\pi x)<0$, then $b$ is even and $a$ odd and so $v_2(\tan2\pi x)=v_2(b)+1\ge2$.

*If $v_2(\tan\pi x)>0$, then $a$ is even and $b$ odd and so $v_2(\tan2\pi x)=v_2(\tan\pi x)+1$. 


We conclude that the map $$\begin{align}f\colon \Bbb N_0&\to\Bbb Z,\\k\;&\mapsto v_2(\tan 2^k\pi x)\end{align}$$ (which is defined for all $k$ by induction using $(2)$) is injective.
Assume $x=\frac cd\in A$ and write $d=2^nm$ with $m$ odd.
From Euler-Fermat, we know that $2^{\phi(m)}\equiv 1\pmod m$.
Then $2^{n+\phi(m)} x\pi-2^n x\pi=\frac{2^{\phi(m)}-1}{m}\cdot c\pi$ is an integer multiple of $\pi$, hence $f(n+\phi(m))=f(n)$, contradicting the injectivity of $f$.
It follows that $$A=\emptyset.$$
A: 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\}$.
A: Here is a short elementary argument.  Suppose $\tan(\pi x) = y$ with $x$ and $y$ rational.  Write $x =p/q$ with $\gcd(p,q)=1$.  Then $iy = i \tan(\pi x) = (1-z)/(1+z)$ with z = exp(2$\pi$ i p/q) a primitive qth root of unity.  This implies that $z$ lies in $Q(i)$,
which in turn implies q = 1, 2 or 4 (using e.g. the fact that $\deg(z/Q) = \phi(q)$), which gives $y=0,1,-1$ (or $\infty$).      
