22. The coefficients $p$ and $q$ of the quadratic equation $x^{2} + p x + q = 0$ are chosen randomly in the interval $(0 ; 2)$. What is the probability that the roots of this equation will be real numbers?
Solution. Let event $A$ be that the roots of the given equation are real numbers.

We will find the probability of event $A$ by applying formula (7). Let the coefficients $p$ and $q$ of the quadratic equation be randomly chosen numbers. Their possible values are: $0 \leq p \leq 2 ; 0 \leq q \leq 2$. Represent $p$ and $q$ as rectangular Cartesian coordinates of points on a plane. The possible values of $p$ and $q$ in the coordinate system $O p q$ will be represented by points located inside and on the boundaries of the square shown in Fig. 10, with an area of $S_{G}=4$.

![](https://cdn.mathpix.com/cropped/2024_05_22_c311c9dd990dc55c716eg-028.jpg?height=426&width=494&top_left_y=1154&top_left_x=379)

Fig. 10

The roots of the quadratic equation are real numbers if and only if the discriminant $D$ of this equation is non-negative.

Therefore, the favorable outcomes for event $A$ satisfy the condition: $D=p^{2}-4 q \geq 0$, which implies that $q \leq \frac{p^{2}}{4}$.

Let's construct the boundaries of the region to which the points on the plane satisfying the conditions belong:

$$
\left\{\begin{array}{l}
q \leq p^{2} / 4 \\
0 \leq p \leq 2 \\
0 \leq q \leq 2
\end{array}\right.
$$

The boundary lines $p=0, p=2, q=0, q=2$ are the sides of the square that bounds the region of possible values of $p$ and $q$. The boundary curve $q=p^{2} / 4$ represents a parabola. The solutions to the system of inequalities are the coordinates of all points on the plane located in the shaded area in Fig. 10, that is, between the boundary lines $p=0, q=2, q=p^{2} / 4$ and on these lines. The points on the plane that belong to the shaded area characterize the outcomes of the experiment that are favorable to event $A$. The area of the shaded region is $S_{g}=\int_{0}^{2} \frac{p^{2}}{4} d p=\left.\frac{1}{4} \frac{p^{3}}{3}\right|_{0} ^{2}=\frac{2}{3}$.

The probability of event $A$ is $P(A)=S_{g} / S_{G}=1 / 6$.