For what values of the parameter $a$ is the sum of the squares of the roots of the equation $x^{2}+2 a x+2 a^{2}+4 a+3=0$ the greatest? What is this sum? (The roots are considered with their multiplicity.)

#
The equation has roots when $D / 4=a^{2}-\left(2 a^{2}+4 a+3\right)=-\left(a^{2}+4 a+3\right) \geq 0$, that is, when $-3 \leq a \leq-1$. The sum of the squares of the roots is 

$\left(x_{1}+x_{2}\right)^{2}-2 x_{1} x_{2}=(2 a)^{2}-2\left(2 a^{2}+4 a+3\right)=-8 a-6$. This expression takes its maximum value at the smallest possible $a=-3$.

## Answer

18 when $a=-3$.