# Prove that the solutions to the system of equations are integers

Let $a, b \in \mathbb{Z}$ and consider the system of equations below: $$\begin{cases} y -2x-a =0\\ y^2-xy+x^2-b=0\end{cases}$$ Prove that $x,y\in\mathbb{Q}$ implies $x,y\in\mathbb{Z}$.

I tried to do this by considering the term $b-a^2$ but got nowhere after that.

Substitute $2x+a$ in the second equation. After some simplification, you get: $$3x^2+3ax+a^2-b=0\iff 3x(x+a)=b-a^2$$ Now write $x=\dfrac pq$ in irreducible form, $q>0$. The equation is equivalent to: $$3p(p+aq)=(b-a^2)q^2$$ Since $\gcd(p,q)=1$, hence $\gcd(q,p+aq)=1$, $q$ divides $3$.

But it is impossible that $q=3$ since this would imply $p(p+aq)=3(b-a^2)$, and $3$ cannot divide $p$ nor $p+3a$.

This proves $x$, hence $y$, is an integer.

Alternative proof (by courtesy of PM 2Ring):

$q^2$ is coprime with $p$ and $p+aq$, hence by Gauß's lemma, it divides $3$. However the only square that divides $3$ is $1$, so that $x$ is an integer, whence $y$ is too.

• Alternatively, $q^2$ divides $3p(p+aq)$, but if $q > 1$ then $q$ can't divide either of $p$ or $(p+aq)$, and the only square that divides 3 is 1. May 20, 2015 at 12:07
• Excellent! May I add it to my answer? May 20, 2015 at 12:22