Problem 91
Medium Geometric Probability

Determine the probability that the roots of the equations…

Determine the probability that the roots of the equations
$1^{\circ}$ the quadratic $x^2+2ax+b=0$;
$2^{\circ}$ the cubic $x^3+3ax+2b=0$
are real, if the coefficients are equally likely to lie anywhere in the rectangle $|a|\le n$, $|b|\le m$. What is the probability that under these conditions the roots of the quadratic equation are positive?

Explanation of Method

$(a,b)$ is a uniform point in a rectangle of area $4nm$, so each probability is the area of a region divided by $4nm$. The quadratic has real roots iff its discriminant is non-negative: $b\le a^2$ (below a parabola). Its roots are both positive iff additionally the sum $-2a$ and the product $b$ are positive. The cubic $x^3+px+q$ has three real roots iff $\left(\frac q2\right)^2+\left(\frac p3\right)^3\le0$, here $b^2+a^3\le0$. In each case the answer depends on whether the curve leaves the rectangle through its top side, which gives two formulas.

Step 1: The model

$(a,b)$ is uniform in $[-n,n]\times[-m,m]$, area $4nm$.

Step 2: $1^{\circ}$ — real roots of $x^2+2ax+b=0$

The discriminant is $4a^2-4b$, so the roots are real iff $b\le a^2$. For each $a$, the favourable $b$ run from $-m$ to $\min(a^2,m)$.

Step 3: Positive roots of the quadratic

Both roots positive iff they are real, their sum $-2a\gt0$ and their product $b\gt0$ (Vieta): $a\lt0$, $0\lt b\le a^2$.

Step 4: $2^{\circ}$ — the cubic $x^3+3ax+2b=0$

For $x^3+px+q=0$ all three roots are real iff $\left(\frac q2\right)^2+\left(\frac p3\right)^3\le0$ (Cardano). With $p=3a$, $q=2b$:

\[ b^2+a^3\le0 \iff a\le0 \ \text{ and }\ |b|\le(-a)^{3/2}. \]

(If only one real root is required, the answer is simply $1$: a cubic always has at least one real root.)

Step 5: Checks

Step 6: A remark on the statement

The text as received writes the cubic as $x^3+3bx+2b=0$, with only one coefficient. The problem clearly intends two coefficients from the rectangle, i.e. $x^3+3ax+2b=0$. (With the literal version, the roots are all real iff $b\le-1$, and for $m\gt1$ the probability would be $\frac{m-1}{2m}$.)


Result

Question$n^2\le m$ (resp. $n^{3/2}\le m$)otherwise
quadratic, real roots$\frac12+\frac{n^2}{6m}$$1-\frac{\sqrt m}{3n}$
quadratic, positive roots$\frac{n^2}{12m}$$\frac14-\frac{\sqrt m}{6n}$
cubic $x^3+3ax+2b$, all roots real$\frac{n^{3/2}}{5m}$$\frac12-\frac{3m^{2/3}}{10n}$