The number of integral solutions for the equation $x-y = x^2 + y^2 - xy$ Find the number of integral solutions for the equation $x-y = x^2 + y^2 - xy$ and the equation of type $x+y = x^2 + y^2 - xy$

Rearranging  we get $$x^2-x(y+1)+y^2+y=0$$ which is a Quadratic Equation in $x$
As $x$ must be real, the discriminant must be $\ge0$ i.e., 
$(y+1)^2-4(y^2+y)=-3y^2-2y+1\ge0$
$\iff 3y^2+2y-1\le0$
$\iff \{y-(-1)\}(y-\frac13)\le0$
$\iff -1\le y\le \frac13$
Now, use the fact that $y$ is integer
