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)$.
- If $n^2\le m$ (the parabola stays inside the rectangle): area $=\int_{-n}^n(a^2+m)\,da = \frac23n^3+2nm$, so \[ P_1 = \frac12+\frac{n^2}{6m}. \]
- If $n^2\gt m$: for $|a|\ge\sqrt m$ the whole column (length $2m$) is favourable. Area $=4nm-\frac43m^{3/2}$, so \[ P_1 = 1-\frac{\sqrt m}{3n}. \]
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$.
- $n^2\le m$: area $\int_0^n a^2\,da=\frac{n^3}3$, so $P_+ = \dfrac{n^2}{12m}$.
- $n^2\gt m$: area $\frac{m^{3/2}}3 + m(n-\sqrt m) = nm-\frac23m^{3/2}$, so $P_+ = \dfrac14-\dfrac{\sqrt m}{6n}$.
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 $n^{3/2}\le m$: area $=\int_0^n 2s^{3/2}\,ds = \frac45n^{5/2}$, so \[ P_2 = \frac{n^{3/2}}{5m}. \]
- If $n^{3/2}\gt m$: for $-a\ge m^{2/3}$ the whole column is favourable. Area $=\frac45m^{5/3}+2m(n-m^{2/3})$, so \[ P_2 = \frac12-\frac{3\,m^{2/3}}{10\,n}. \]
(If only one real root is required, the answer is simply $1$: a cubic always has at least one real root.)
Step 5: Checks
- The two formulas agree at the boundary: at $n^2=m$, $\frac12+\frac16=1-\frac13$ ✓; at $n^{3/2}=m$, $\frac15=\frac12-\frac3{10}$ ✓.
- Simulation with $n=1$, $m=2$: real roots $0.584$ (formula $0.583$), positive roots $0.042$ ($0.0417$), cubic $0.100$ ($0.1$).
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}$ |