Find all pairs of $(m, n)$ where $m, n \in \mathbb Z$ for which $m/n + n/m$ is an integer. Find all pairs of $(m, n)$ where $m, n \in \mathbb Z$ for which $m/n + n/m$ is an integer.

Clearly one can find $m, n = +1$, or $- 1$. But are there any other solutions. Any help is appreciated? 
 A: Hint:
For $m = n$ , the condition is always True.
Consider  $ m \ne n $ such that : $$\frac mn =  x \text{ and  } \frac nm = y \space \space $$
Then $$\frac1x +  x = n \space \space \text{ such that } n\in \mathbb Z$$
Can you find the values of $x$ for which $\frac1x + x $ is an integer?
A: Hint Let $d=gcd(m,n)$. Write 
$$m=dm' \\
n=d n'$$
Then, $gcd(m',n')=1$ and 
$$\frac{m'}{n'}+\frac{n'}{m'} \in \mathbb Z$$
Thus 
$$m'n'|(m')^2+(n')^2$$
Deduce from here that $m'| (n')^2$. Since $gcd(m',n')=1$, you'll get that $m'=\pm 1$.
Same way $n'|(m')^2$ will imply that $n'=\pm 1$.
A: Clearly, the expression does not change when we multiply $n,m$ by the same factor. Hence consider first the case that $\gcd(n,m)=1$. Then
$$\frac nm+\frac mn =\frac{n^2+m^2}{nm}=2+\frac{(n+m)^2}{nm}.$$
As $\gcd(n+m,n)=\gcd(n,m)=1$ and $\gcd(n+m,m)=\gcd(n,m)=1$, the fraction at the end is already in shortest terms, perhaps up to a unit, i.e., we need $|nm|=1$, so $|n|=|m|=1$.
Allowing $\gcd>1$ again, this amounts to $n=\pm n$ and on the other had, the expression is indeed the integer $\pm2$ if $m=\pm n$.
