Find all the integer pairs $(x,y)$ that satisfy the equation $7x^2-40xy+7y^2=(|x-y|+2)^3$
it is clear the equation is symmetric therefore you can assume w.l.o.g that $x\ge y$ which makes the new equation equal to $(x-y+2)^3=7x^2-40xy+7y^2$
which becomes $0=x^3+x^2(-1-3y)+x(12+28y+3y^2)+(8+y^3-y^2-12y)$ but I don't know what to do next , help, suggestions and solutions would be appreciated. I think Lagrange multipliers can be used but there is a preferred solution that doesn't use calculus. Taken from the 2019 SAIMC https://chiuchang.org/imc/wp-content/uploads/sites/2/2019/08/SAIMC-2019_Keystage-3_Individual_Final.x17381.pdf
First notice that $7x^2-40xy+7y^2\le\frac{27}{2}|x-y|^2$ and equality holds only if $x+y=0$. (You can show this directly by expanding)
Now, let $t=|x-y|$ then $(t+2)^3\le\frac{27}{2}t^2$ and $t\ge 0$.
Since $(t+2)^3-\frac{27}{2}t^2=(t-4)^2(t+\frac{1}{2})$, this holds only if $t=4$, and even when $t=4$, you get equality and this implies $x+y=0$.
Thus, $|x-y|=4$ and $x+y=0$ is the only candidate.
Therefore, the only possible pairs are $(2,-2)$ and $(-2,2)$. (They are actually integer pairs, but even for real number pair we get the same)