Solution: By Vieta's theorem: $x_{1}+x_{2}=-a, x_{1} \cdot x_{2}=2 a, \quad$ therefore, $x_{1}^{2}+x_{2}^{2}=\left(x_{1}+x_{2}\right)^{2}-2 x_{1} x_{2}=a^{2}-4 a$. From the condition, we get that $a^{2}-4 a=21$ or $a \in\{-3 ; 7\}$.

The discriminant of the equation is $D=a^{2}-8 a$, when $a=7$ it is negative, meaning the equation has no solutions, when $a=-3$ the equation has two roots. Therefore, the answer is $a=-3$.

Answer: $a=-3$.

## Criteria:

| Points | Conditions for awarding |
| :---: | :--- |
| 15 | The correct answer is obtained with justification |
| 10 | The number of solutions of the equation depending on the value of the parameter is not investigated or an incorrect answer is obtained due to an arithmetic error |
| 0 | The solution does not meet any of the above conditions |
2. (15 points) For what values of the parameter $a$ is the sum of the squares of the roots of the equation $x^{2}+a x+2 a=0$ equal to $21?$