Solving a system of equations, three variables x,y,z

here's a problem from this PRMO which I found online:

Three real numbers $x,y,z$ are such that $x^{2}+6y=-17$, $y^{2}+4z=1$, $z^{2}+2x=2$. What is the value of $x^{2}+y^{2}+z^{2}$?

Ok I am quite confused about what to do because simple manipulations like adding the three equations don't seem to work (or at least I don't see anything yet). It would be really helpful if someone could tell me the approach or point out what I'm missing. Would be great if you could just give a small hint first instead of the whole answer immediately. Thanks!


Solution 1:

Adding all equations we have

$$ x^2+2x+\alpha+y^2+6y+\beta+z^2+4z+\gamma = 0\\ \alpha+\beta+\gamma = 14 $$

Now for

$$ x^2 +2x+\alpha = 0\\ y^2+6y+\beta=0\\ z^2+4z+\gamma = 0 $$

making the discriminants

$$ 2^2-4\alpha = 0\to \alpha = 1\\ 6^2-4\beta = 0\to\beta = 9\\ 4^2-4\gamma = 0\to\gamma = 4 $$

then the sum gives

$$ \left(x+\frac 22\right)^2+\left(y+\frac 62\right)^2+\left(z+\frac 42\right)^2=0 $$

so the solution is $x = -1, y = -3, z = -2$

and then $x^2+y^2+z^2 = 14$

Solution 2:

Hint: From the first equation we get $$y=-\frac{1}{6}\left(17+x^2)\right)$$ plugging this in the second equation and solving this for $z$ $$z=\frac{1}{4}\left(1-\frac{1}{36}\left(17+x^2\right)^2\right)$$ so we get $$\frac{1}{16}\left(1-\frac{1}{36}(17+x^2)^2\right)^2+2x=2$$ Factorizing we obtain $$\frac{(x+1)^2 \left(x^2+4 x+31\right) \left(x^4-6 x^3+64 x^2-210 x+727\right)}{20736}=0$$