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.
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$.