Solve the following system of equations:

$$
\begin{aligned}
& x^{2}=a x+b y \\
& y^{2}=b x+a y
\end{aligned}
$$

where $a$ and $b$ are parameters.
I. By subtraction from the given equations, we obtain

$$
x^{2}-y^{2}=(a-b)(x-y)
$$

which, when combined with (1) or (2), results in a system equivalent to the original. Further manipulation yields

$$
(x-y)(x+y-a+b)=0
$$

which is satisfied in two ways:

$$
\begin{array}{lcc}
A) & \text { if } & x-y=0 \\
B) & \text { if } & x+y-a+b=0
\end{array}
$$

In case $A$, $y=x$, and substituting this into (1) gives

$$
x^{2}=(a+b) x, \quad x(x-a-b)=0
$$

from which we obtain two solutions of the original system:

$$
x_{1}=y_{1}=0, \quad x_{2}=y_{2}=a+b
$$

In case $B$,

$$
x+y=a-b, \quad y=(a-b)-x
$$

and substituting this into (1) yields

$$
x^{2}-(a-b) x-b(a-b)=0
$$

from which we obtain two more solutions:

$$
\begin{aligned}
& x_{3}=\frac{1}{2}(a-b-\sqrt{(a-b)(a+3 b)}) \\
& x_{4}=\frac{1}{2}(a-b+\sqrt{(a-b)(a+3 b)})
\end{aligned}
$$

and since, according to (4) and (5),

$$
x_{3}+y_{3}=x_{4}+y_{4}=x_{3}+x_{4}=a-b
$$

it follows that

$$
y_{3}=x_{4}, \quad y_{4}=x_{3}
$$

This completes the solution of the system of equations.

II. The solutions in (3) are real for all (real) pairs of $a, b$ values, while (6') and (6'') are real if and only if the factors under the square root are not of opposite signs; specifically, if neither is negative:

$$
a-b \geqq 0 \quad \text { and } \quad a+3 b \geqq 0
$$

which is

$$
a>0 \quad \text { and } \quad-\frac{a}{3} \leqq b \leqq a
$$

or if both factors are negative:

$$
a-b<0 \quad \text { and } \quad a+3 b<0
$$

which is

$$
\begin{array}{ll}
a>0 & \text { and } \quad-\frac{a}{3}<b<a, \quad \text { or if } \\
a<0 & \text { and } \quad a<b<-\frac{a}{3}
\end{array}
$$

Indeed, in these cases, the discriminant is positive, $x_{3} \neq x_{4}=y_{3}$, and similarly, $x_{4} \neq y_{4}$, and these solutions are different from those in (3), where $x=y$; furthermore, the solutions in (3) are also different from each other because the inequalities imply $b \neq-a$, and thus $x_{2}=a+b \neq 0=x_{1}$ (Figure 1).

![](https://cdn.mathpix.com/cropped/2024_05_02_ee75cfd625c312b2fa89g-2.jpg?height=539&width=526&top_left_y=126&top_left_x=794)

Figure 1

$x_{3}=x_{4}\left(\right.$ and with it $\left.y_{3}=y_{4}\right)$ can occur in two ways:

$\alpha$) if $a-b=0$, then they are identical to the solution $x_{1}=y_{1}=0$, so the system has 2 solutions if $a \neq 0$, and a single solution if $a=0$.

$\beta$) if $a+3 b=0$, then they are identical to the solution $x_{2}=y_{2}=a+b$, giving 2 solutions if $a \neq 0$.

Note. If $b \neq 0$, then (1) and (2) are the equations of two parabolas in a Cartesian coordinate system, and these parabolas are reflections of each other across the line $y=x$, or $y-x=0$, because swapping $x$ and $y$ transforms one equation into the other. Thus, the solutions of the system are the coordinates of at most 4 common points of these two parabolas. The solutions $\left(x_{1}, y_{1}\right)$ and $\left(x_{2}, y_{2}\right)$ lie on the axis of reflection. The line connecting the solutions $\left(x_{3}, y_{3}\right)$ and $\left(x_{4}, y_{4}\right)$, given by (4), is perpendicular to the axis of reflection.