## Task $4 / 88$

Determine all integer solutions of the equation $x^{2}+y^{2}=(x-y)^{3}$
1. Obviously, $x=y=0$ is a solution.
2. Now let $x^{2}+y^{2} \neq 0$. Then $x^{2}+y^{2}=(x-y)^{3}>0$. We set $x-y=a>0$, so $y=x-a$. By substitution and rearrangement, we get

$$
x^{2}+(x-a)^{2}=a^{3} \rightarrow x_{1 ; 2}=\frac{a}{2}(1 \pm \sqrt{2 a-1})
$$

For $x$ to be an integer, $2 a-1$ must be an odd perfect square: $2 a-1=(2 m-1)^{2}$ with $m \in \mathbb{N}, m \geq 0$, thus $a=2 m^{2}-2 m+1$. This yields for $m \in \mathbb{N}$

$$
\begin{gathered}
x_{1}=0.5\left(2 m^{2}-2 m+1\right)(1+2 m-1)=m\left(2 m^{2}-2 m+1\right) \\
x_{2}=0.5\left(2 m^{2}-2 m+1\right)(1-2 m+1)=(1-m)\left(2 m^{2}-2 m+1\right) \\
y_{1}=m\left(2 m^{2}-2 m+1\right)-\left(2 m^{2}-2 m+1\right)=(m-1)\left(2 m^{2}-2 m+1\right)=-x_{2} \\
y_{2}=\left(2 m^{2}-2 m+1\right)(1-m)-\left(2 m^{2}-2 m+1\right)=(-m)\left(2 m^{2}-2 m+1\right)=-x_{1}
\end{gathered}
$$