For what value of the parameter $p$ will the sum of the squares of the roots of the equation

$$
p x^{2}+\left(p^{2}+p\right) x-3 p^{2}+2 p=0
$$

be the smallest? What is this smallest value?
To ensure that our equation has definite roots, we must assume that $p \neq 0$; otherwise, we would be faced with the identity $0 x^{2}+0 x+0=0$ - which is satisfied by every number - and thus our question would be meaningless. On the other hand, to ensure that the roots are real, we must assume that the discriminant of the equation simplified by $p$

$$
x^{2}+(p+1) x-(3 p-2)=0
$$

is non-negative:

$$
0 \leq(p+1)^{2}+4(3 p-2)=p^{2}+14 p-7=(p+7)^{2}-56
$$

that is, that either

$$
p \leq-7-\sqrt{56} \approx-14.48 \quad \text { or } \quad p \geq-7+\sqrt{56} \approx 0.48
$$

The sum of squares of the roots to be examined can be expressed by their sum and product, and through the coefficients in (1) by $p$:

$$
\begin{aligned}
y=x_{1}^{2}+x_{2}^{2}= & \left(x_{1}+x_{2}\right)^{2}-2 x_{1} x_{2}=(p+1)^{2}+2(3 p-2)= \\
& =p^{2}+8 p-3=(p+4)^{2}-19
\end{aligned}
$$

Therefore, we need to find the minimum of $y$ as a function of $p$ on the domain defined by (2a).

Without considering (2a), the smallest value of $y$ is -19 when $p=-4$, when in (3) $(p+4)^{2}$ takes its smallest value, which is 0. However, (2a) excludes $p=-4$, and indeed the value $y=-19$ is impossible, since the sum of squares cannot be negative.

To take into account the boundedness of the domain of $y$, consider the graph of (3), delete the arc excluded by (2a), and find the "lowest" point on the remaining graph.

![](https://cdn.mathpix.com/cropped/2024_05_02_70e5e6e9dad81924f8ecg-1.jpg?height=821&width=748&top_left_y=1216&top_left_x=683)

The complete graph is a parabola, with branches descending to the vertex at $(-4,-19)$ and rising from there. We have already seen that the vertex falls within the arc to be deleted, and since the endpoints of the domain defined by (2a) differ from $p=-4$, we delete a part from the "bottom" of each branch. After this, the smallest value we are looking for can be selected by direct comparison from the ordinates of the endpoints of the two remaining branch segments:

$$
p=-7 \mp \sqrt{56} \text { when } y=(-3 \mp \sqrt{56})^{2}-19=46 \pm 12 \sqrt{14} \approx\left\{\begin{array}{c}
90.90 \\
1.10
\end{array}\right.
$$

Accordingly, the smallest value we are looking for is $y=46-12 \sqrt{14} \approx 1.10$ and this is taken by $y$ when $p=-7+2 \sqrt{14} \approx 0.48$. At this point, the discriminant is 0, the roots are: $x_{1}=x_{2}=-\frac{p+1}{2}=3-\sqrt{14} \approx-0.7417$ and $y=2 x_{1}^{2} \approx 2 \cdot 0.550=1.100$.