Solve in integers: $(x + y + z + v)^2 – 29w = 2023, xy + yz + zv + vx – w^2 = 475$

algebra-precalculusdiophantine equationssystems of equations

Problem: Solve in integers the system of equations:
\begin{align}
(x + y + z + v)^2 – 29w &= 2023, \\ % Equation 1
xy + yz + zv + vx – w^2 &= 475. % Equation 2
\end{align}

This problem is from the algebra section of a local high school math competition.

My Work

Let's say $S = x + y + z + v$. We have:

$S^2 – 29w = 2023$

$xy + yz + zv + vx – w^2 = 475$

The second equation is messy, but I will try to rewrite it using $S$.

$2(xy + yz + zv + vx) = S^2 – (x^2 + y^2 + z^2 + v^2)$

Substitute this into the second equation:

$S^2 – (x^2 + y^2 + z^2 + v^2) – 2w^2 = 950$

So, $x^2 + y^2 + z^2 + v^2 + w^2 = S^2 – 950$

From here, I know that I can substitute $S^2$ back into the first equation, but I do not think that I will get anywhere with that. Could I please get some help with where to go from here or if I have completely taken the wrong path? Does the solution have to do with Diophantine Equations? Thank you for your help!

Best Answer

Substitute $x+z=a, y+v=b$. Now the system turns into:

$$(a+b)^2-29w=2023$$ $$ab-w^2=475$$

In other words, $2023+29w=(a+b)^2\ge 4ab=4(475+w^2)=4w^2+1900$ (using a well-known inequality $(a+b)^2\ge 4ab$).

So, we are getting $4w^2-29w-123\le 0$, which has solutions $w\in[-3, 10.25]$, so as $w$ is an integer, it is in the range $-3,\ldots, 10$.

Using the first equation, we can quickly sieve out some values of $w$, because $2023+29w=(a+b)^2$ must be a square number. Of course, if $-3\le w\le 10$, then $1936\le 2023+29w\le 2313$, and in this range the only square numbers are $44^2=1936, 45^2=2025, 46^2=2116, 47^2=2209, 48^2=2304$. Out of those, only $1936=2023-3\cdot 29$ gives an integer value $w=-3$ and this gives $a+b=\pm 44$.

Now, we can find $ab=475+w^2=484$ and then solve for $a, b$ using Vieta formulae i.e. solving the quadratic equation $X^2\mp 44X+484=0$. This gives $a=b=\pm 22$.

Finally, the solutions are as follows: $x, y$ can be arbitrary integers, $w=-3$; for the rest, either $z=22-x, v=22-y$ or $z=-22-x, v=-22-y$.