TITLE: Rational solutions for $\tan(\pi x)=y$
QUESTION [7 upvotes]: 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.

REPLY [2 votes]: 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$).