QUESTION
Solve the equation $3x^2+2y^2-4xy+x-2=0$ in the set of integer numbers.
MY IDEA
I decided to write it as:
$2x^2+2y^2-4xy+x^2+x-2=0={(x\sqrt{2}+y\sqrt{2})}^2+x^2+x-2$
I was thinking of writing $x^2+x-2$ as a perfect square, but I don't know.
Another way might be writing all the equations as a perfect square, which means it should equal $0$.
I'm not that good at this type of problem and I wonder if one of you can explain how you can solve this problem?
You have
$$2(x - y)^2 = 2 - x^2 - x \implies (x - y)^2 = 1 - \dfrac{x(x+1)}{2}.$$
This implies that $1 - x(x+1)/2$ is a perfect square. Since the term $x(x+1)/2$ is always non-negative, then either $(x-y)^2 = 1 - 0 = 1$ or $(x-y)^2 = 1 - 1 = 0$ by means of $x = 0$ or $x = -1$ for the first case, or $x = 1$ or $x = -2$ for the second case. Those values for $x$ yield the solutions $$(x,y) \in \{(-2,-2), (-1,-2), (-1,0), (0,-1), (0,1), (1,1)\}.$$