Solutions of bivariate cubic Diophantine equation The problem is what are the integer solutions to
$$7x^2 - 40xy + 7y^2 = (|(x - y)| + 2)^3$$
I only got $x - y = 4 (\mod 13)$. Also, how to solve it? 

Let $(x,y)$ be an integral solution to the equation. Both sides of the equation are invariant under the transformation $(x,y)\ \mapsto\ (-x,-y)$, so without loss of generality $x\geq y$ and hence
\begin{eqnarray*}
7x^2 - 40xy + 7y^2&=& (|(x - y)| + 2)^3=(x-y+2)^3.
\end{eqnarray*}
Expanding the right hand side and  bit of rearranging shows that this is equivalent to
$$(x-y)^3-14(x-y)^2+12(x-y)=-8-13x^2-13y^2,\tag{1}$$
where the right hand side is strictly negative. The left hand side is a cubic in $(x-y)$ which factors as
$$(x-y)^3-14(x-y)^2+12(x-y)=\big(x-y\big)\big((x-y)-7-\sqrt{37}\big)\big((x-y)-7+\sqrt{37}\big),$$
so the left hand side of $(1)$ is positive if $x-y\geq7+\sqrt{37}$. So we see that $0\leq x-y\leq 13$.
You have already shown that $x-y \equiv 4\pmod{13}$, so it follows that $y=x-4$. Plugging this back into $(1)$ leaves you with a cubic polynomial in $x$, which you can solve by standard methods, e.g. the rational root theorem.
