I got given a problem which was:

For $\displaystyle m,n \in \mathbb{Z}$, find the possible integer values of $\displaystyle \frac{m^2+n^2}{mn}$.

My proof is as follows:

Say that $\displaystyle \frac{m^2+n^2}{mn}=z$ and $\displaystyle z=2ab$.

$\displaystyle \frac{m^2+n^2}{mn}=z$

$\displaystyle m^2+n^2=zmn$

$\displaystyle m^2-zmn+n^2=0$

$\displaystyle m^2-2abmn+n^2=0$

$\displaystyle (am-bn)^2=0$

This means that a and b are either 1 or -1. The different combinations inputted into $\displaystyle z=2ab$ then show that the only two possible values are 2 and -2.

I'm just not sure about how rigid this proof is.

Thanks for any help.