Solve the following system of equations:
\begin{array}{rcl}x+y+z &=& a, \\ x^2 +y^2 + z^2 &=& b^2, \\ xy &=& z^2, \end{array}

where a and b are given real numbers.What conditions must hold on a and b for the solutions to be positive and distinct?


As the first step, let's express z in terms of a and b. To this end, rewrite the first equation as

x + y=a - z

and square

x^2 + 2xy + y^2 = a^2 - 2az + z^2.

From the third equation we then have

x^2 + z^2 + y^2 = a^2 - 2az

and the second equation leads to b^2 = a^2 - 2az. If a=0 then also b=0 and the second equation gives x=y=z=0. If a\ne 0, we get

z = \frac{a^2 -b^2}{2a}.

Next, eliminate z from the first and the third equations:

\begin{array}{rcl}x+y &=& \frac{a^2 +b^2}{2a}, \\ xy &=& \frac{(a^2 - b^2)^2}{4a^2}.\end{array}

x and y

It follows that x and y are the two solutions to the quadratic equation:

4a^2 t^2 - 2a(a^2 +b^2) t + (a^2 - b^2)^2=0.


x,y=\frac{a(a^2 +b^2)\pm\sqrt{a^2(a^2 +b^2)^2-4a^2(a^2 -b^2)^2}}{4a^2}.

This simplifies to

x,y=\frac{a^2+b^2\pm\sqrt{ (3a^2 -b^2)(3b^2 -a^2)}}{4a}.

First of allx and y are real and different iff (3a^2 -b^2)(3b^2 -a^2)\gt 0.

Assuming a\gt 0, they are positive iff

(a^2 +b^2)^2 \gt (3a^2 -b^2)(3b^2 -a^2),

which is equivalent to 4(a^2 -b^2)^2\gt 0 and is always satisfied. This also shows that for {a\lt 0$} there are no solutions.

So we focus on (3a^2 -b^2)(3b^2 -a^2)\gt 0.

The factors need to be either both positive or both negative. Assuming the latter we arrive at a contradiction:

3a^2 \lt b^2\lt 3b^2\lt a^2.

The only possibility is for the two factors to be positive:

9a^2 \gt 3b^2 \gt a^2.

The conclusion is that the system has distinct positive solutions iff a\gt 0 and 9a^2 \gt 3b^2 \gt a^2.