Let $a$ and $b$ be real numbers such that the two polynomials $x^{2}+a x+b$ and $x^{2}+b x+a$ each have two distinct real roots, and the polynomial $\left(x^{2}+a x+b\right)\left(x^{2}+b x+a\right)$ has three distinct real roots. What values can the sum of these three roots take? (All-Russian Olympiad 2015 Grade 9 Day 1 Problem 1)
The conditions of the statement imply that the two quadratic polynomials (let's call them $P_{1}$ and $P_{2}$) have a common root. Let $r_{2}$ be the common root, $r_{1}$ the root specific to $P_{1}$, and $r_{3}$ the root specific to $P_{2}$.

Vieta's formulas applied to $P_{1}$ give

$$
\left\{\begin{array}{l}
r_{1} r_{2}=b \\
r_{1}+r_{2}=-a
\end{array}\right.
$$

while applied to $P_{2}$ they give

$$
\left\{\begin{array}{l}
r_{3} r_{2}=a \\
r_{3}+r_{2}=-b
\end{array}\right.
$$

We thus deduce

$$
\left\{\begin{array}{l}
r_{1}+r_{2}+r_{2} r_{3}=0 \\
r_{2} r_{1}+r_{2}+r_{3}=0
\end{array}\right.
$$

from (2) and (3) on the one hand and from (1) and (4) on the other. By subtracting these two equations, we get $\left(r_{1}-r_{3}\right)\left(1-r_{2}\right)=0$, so $r_{2}=1$ since $r_{1}$ and $r_{3}$ are distinct. Returning to the previous system, we obtain $r_{1}+r_{2}+r_{3}=0$.

## Examination of coefficients