## Problem 1

Find all solutions to $\left(m^{2}+n\right)\left(m+n^{2}\right)=(m-n)^{3}$, where $m$ and $n$ are non-zero integers.


## Solution

Answer: $(m, n)=(-1,-1),(8,-10),(9,-6),(9,-21)$.

If $m, n>0$, then lhs is certainly positive, so we must have $m>n$ to make the rhs positive. But then $m^{2}+n>$ $\mathrm{m}^{2}$ and $\mathrm{n}^{2}+\mathrm{m}>\mathrm{m}$, so $\mathrm{lh} \mathrm{p}>\mathrm{m}^{3}>$ rhs. Contradiction. So there are no solutions with $\mathrm{m}$ and $\mathrm{n}$ both positive.

Put $M=|m|, N=|n|$. Consider next $m=M, n=-N$. So we have $\left(M^{2}-N\right)\left(N^{2}+M\right)=(M+N)^{3}$. Hence $M^{2} N^{2}+$ $M^{3}-N^{3}-M N=M^{3}+3 M^{2} N+3 M N^{2}+N^{3}$. $N$ is non-zero, so we can divide to get: $2 N^{2}+N\left(3 M-M^{2}\right)+$ $3 M^{2}+M=0$. Regarding this as a quadratic in $N$ we solve, getting $N=\left(\left(M^{2}-3 M\right) \pm \sqrt{ }\left(M^{4}-6 M^{3}+9 M^{2}-\right.\right.$ $\left.\left.24 M^{2}-8 M\right)\right) / 4$. Thus $M^{4}-6 M^{3}-15 M^{2}-8 M=M(M-1)^{2}(M-8)$ must be a square. Hence $M(M-8)$ must be a square. We have $(M-4)^{2}=M(M-8)+16$ and for $M \geq 13$, we have $(M-5)^{2}=M^{2}-10 M+25M$.

Finally, consider the case $m=-M, n=-N$. Then we get $\left(M^{2}-N\right)\left(N^{2}-M\right)=(N-M)^{3}$, so $2 N^{2}-\left(M^{2}+3 M\right) N+$ $\left(3 M^{2}-M\right)=0$. Solving for $N$, we get $N=\left(\left(M^{2}+3 M\right) \pm \sqrt{ }\left(M^{4}+6 M^{3}+9 M^{2}-24 M^{2}+8 M\right)\right) / 4$. So we require
$M\left(M^{3}+6 M^{2}-15 M+8\right)=M(M+8)(M-1)^{2}$ to be a square. Hence $M(M+8)$ is a square. We have $(M+$ $4)^{2}>M(M+8)$ and for $M \geq 5$, we have $(M+3)^{2}=M^{2}+6 M+9<M^{2}+8 M$. So we need only check $M=1$, $2,3,4$. We find $M=1$ gives the only square, and that gives the solution ( $m, n)=(-1,-1)$.

