5 (1133). For what value of $a$ does the sum of the squares of the roots of the quadratic trinomial $x^{2}-(a-2) x-a-1$ take the smallest value?
Solution. Based on Vieta's theorem, we have $x_{1}+x_{2}=$ $=a-2, x_{1} \cdot x_{2}=-a-1$. Then

$$
\begin{gathered}
x_{1}^{2}+x_{2}^{2}=\left(x_{1}+x_{2}\right)^{2}-2 x_{1} x_{2}=(a-2)^{2}-2(-a-1)= \\
=a^{2}-2 a+6=(a-1)^{2}+5
\end{gathered}
$$

Since $(a-1)^{2} \geqslant 0$, $x_{1}^{2}+x_{2}^{2}$ takes its minimum value when $a=1$.

Remark 1. This problem can also be solved without using Vieta's theorem, by calculating the roots of the given quadratic trinomial using formulas. We have

158

$$
\begin{gathered}
x_{1}=\frac{a-2+\sqrt{ } a^{2}+8}{2}, x_{2}=\frac{a-2-\sqrt{ } a^{2}+8}{2}, \\
x_{1}^{2}+x_{2}^{2}=\left(\frac{a-2+\sqrt{ } a^{2}+8}{2}\right)^{2}+\left(\frac{a-2-\sqrt{ } a^{2}+8}{2}\right)^{2}= \\
=\frac{4 a^{2}-8 a+24}{4}=a^{2}-2 a+6=(a-1)^{2}+5 .
\end{gathered}
$$

Remark 2. The value of $a$ at which the quadratic trinomial $a^{2}-2 a+6$ obtained during the solution process takes its minimum value can also be found differently, by calculating the x-coordinate of the vertex of the corresponding parabola using the known formula. In our case, $a=\frac{2}{2}=1$.