TITLE: Diophantine system of two equations with four variables
QUESTION [5 upvotes]: Find all integer solutions for the system:
$$\left\{\begin{array}{rcl}xy + vw &=& 5 \\ xv - yw &=& 6\end{array}\right.$$
It's supposed to be solvable by 9-graders...

REPLY [8 votes]: By Lagrange's identity we have:
$$ (xy+vw)^2+(xv-yw)^2 = (x^2+w^2)(v^2+y^2) $$
but since $5^2+6^2 = 61$ is a prime number any integer solution of the initial system of equations must satisfy:
$$\left\{\begin{array}{rcl} x^2+w^2&=&1\\ v^2+y^2&=&61\end{array}\right.\quad\text{or}\quad \left\{\begin{array}{rcl} x^2+w^2&=&61\\ v^2+y^2&=&1,\end{array}\right.$$
so one of the variables is zero.

REPLY [8 votes]: $$ (x + iw)(v+iy) = 6 + 5i$$
This implies (taking modulus of the complex numbers)
$$ (x^2 + w^2)(v^2 + y^2) = 61$$
Since $61$ is prime...
[Heavyweight: this is just factorizing $6+5i$ in the Gaussian integers]