# If $x + \frac{1}{x} \in \mathbb{Z}$ for $x \in \mathbb{R}$, then must $x=1$?

I'm trying to find integer solutions to $x + \frac{1}{x}$. Observing the graph of this function, it appears that it approaches the linear function $x=y$ as $x \rightarrow \infty$, which would suggest that no other integer solutions exist.

I don't know how to go about proving this algebraically, assuming such a proof exists. For reference, my attempts, which have not been fruitful, have extended as far as the following.

Ignoring the possible irrational solutions:

Let $x = \frac{m}{n}$ for $m, n \in \mathbb{Z}$

Then $\frac{m}{n}+ \frac{n}{m} \in \mathbb{Z}$

$\implies \frac{m^2+n^2}{nm} \in \mathbb{Z}$

$\implies \frac{(m+n)^2}{mn} -2 \in \mathbb{Z}$

$\implies \frac{(m+n)^2}{mn}\in \mathbb{Z}$ via closure of $\mathbb{Z}$ under subtraction

$\implies \frac{(m+n)^2}{mn} = k$ for some integer $k$

$(m+n)^2 = kmn$

Assuming $m \neq n$ (as otherwise $x=1$), $k = mn$

Hence all rational solutions of $x$ satisfy, $(m+n)^2=(mn)^2$ for some $m,n \in \mathbb{Z}$.

I'm not sure if the helps reduce the problem.

• So are you looking for rationals $x$ such that $$x+\frac{1}{x} \in \mathbb{Z}$$ Or are you looking for all real numbers? – S.C.B. Feb 2 '17 at 4:29
• The fact that $x+1/x$ is approximately $x$ for large $x$ implies there should be infinitely many reals $x$ for which $x+1/x$ is an integer. Just look at the graph - pick any integer on the $y$-axis, draw a horizontal line through it, and see that it intersects the curve $y=x+1/x$. To solve $x+1/x=n$, just multiply both sides by $x$ and then you have a quadratic equation. – arctic tern Feb 2 '17 at 4:29
• @S.C.B I'm looking at all real numbers, but I thought to first show that any rational solution of $x$ cannot satisfy the equation since I didn't know how to initially incorporate irrationals. – user1239334 Feb 2 '17 at 4:31
• @user1239334 To exclude rational solutions other than $\pm1$, write the equation as $x^2 - n x + 1 = 0$ then use the rational root theorem. – dxiv Feb 2 '17 at 4:31
• @user1239334 You should use quadratics. – S.C.B. Feb 2 '17 at 4:47

There are an infinite number of real numbers $x$ such that $$x+\frac{1}{x} \in \Bbb{Z}$$ This can be proved as follows. $$x+\frac{1}{x}=k \implies x^2-kx+1=0 \implies x=\frac{k \pm \sqrt{k^2-4}}{2}$$ So if $k \ge 2$, $k \le -2$, there is always a real number $x$ that satisfies $x+\frac{1}{x}=k$. This is true for integers $k$, so there are a infinite number of reals that satisfy that $x+\frac{1}{x}$ is an integer.
However, with the restriction that $x$ is a rational, we have $x= \pm 1$. This is because in order for a number of $$\frac{k \pm \sqrt{k^2-4}}{2}$$ to be a rational, we must have that $k^2-4$ is a perfect square. However, if $k \ge 3$, we have that $$(k-1)^2<k^2-4<k^2$$ so $k^2-4$ is not a square. Similarly, if $k \le -3$, we have that $k^2-4$ is not a square. So since $k$ is an integer, this restricts $k$ to the cases where $k=\pm 2$, which is when $x= \pm 1$.