Given {a,b,c} in [-L,L] What is the probability that the roots of a x^2+b x + c = 0 be real?

Nov 19, 2016

$\frac{41 + 6 \ln \left(2\right)}{72} \approx 0.6272$

Explanation:

We will operate on the assumptions $L > 0$ and that the probability is equal that $\left(a , b , c\right) = \left({x}_{1} , {x}_{2} , {x}_{3}\right)$ for all $\left({x}_{1} , {x}_{2} , {x}_{3}\right) \in {\left[- L , L\right]}^{3}$

Initial observations:

• $a {x}^{2} + b x + c = 0$ has real roots if and only if the discriminant of the quadratic is nonnegative, that is, ${b}^{2} - 4 a c \ge 0$, or ${b}^{2} \ge 4 a c$.

• We can partition the probability space into the two cases in which $\text{sgn"(a) = "sgn} \left(c\right)$ or $\text{sgn"(a)!="sgn} \left(c\right)$, and
$P \left(\text{sgn"(a)="sgn"(c)) = P("sgn"(a)!="sgn} \left(c\right)\right) = \frac{1}{2}$

• If $\text{sgn"(a) != "sgn} \left(c\right)$, then $4 a c \le 0$, meaning ${b}^{2} \ge 4 a c$.

• By symmetry:
$P \left({b}^{2} \ge 4 a c | a , c \le 0\right) = P \left({b}^{2} \ge 4 a c | a , c \ge 0\right)$

• As ${b}^{2} = {\left(- b\right)}^{2}$ for all $b$, we can restrict $b$ to $\left[0 , L\right]$ without changing the probability of it falling within a certain range. Thus
$P \left({b}^{2} \ge 4 a c | a , c \ge 0\right) = P \left({b}^{2} \ge 4 a c | a , b , c \ge 0\right)$

With these, we can reformulate the problem as follows:

$P \left(a {x}^{2} + b x + c \text{ has real roots}\right) = P \left({b}^{2} \ge 4 a c\right)$

$= \frac{1}{2} P \left({b}^{2} \ge 4 a c | \text{sgn"(a)!="sgn} \left(c\right)\right)$

$+ \frac{1}{2} P \left({b}^{2} \ge 4 a c | \text{sgn"(a)="sgn} \left(c\right)\right)$

$= \frac{1}{2} \left(1\right) + \frac{1}{2} P \left({b}^{2} \ge 4 a c | a , c < 0 \mathmr{and} a , c > 0\right)$

$= \frac{1}{2} + \frac{1}{2} P \left({b}^{2} \ge 4 a c | a , c > 0\right)$

$= \frac{1}{2} + \frac{1}{2} P \left({b}^{2} \ge 4 a c | a , b , c > 0\right)$

$= \frac{1}{2} + \frac{1}{2} P \left({b}^{2} \ge 4 a c | \left(a , b , c\right) \in {\left[0 , L\right]}^{3}\right)$

We will now calculate $P \left({b}^{2} \ge 4 a c | \left(a , b , c\right) \in {\left[0 , L\right]}^{3}\right)$

If we consider a coordinate system in 3-space, then ${\left[0 , L\right]}^{3}$ is equivalent to a cube with side length $L$ resting in the first octant and having sides colinear with the axes. Let $S$ be the solid bounded by this cube and above by the surface ${y}^{2} = 4 x z$, and ${V}_{S}$ be the volume of this solid. Then the probability that ${b}^{2} \ge 4 a c$ given an arbitrary $\left(a , b , c\right) \in {\left[0 , L\right]}^{3}$ is equal to the probability that $\left(a , b , c\right)$ falls within $S$ given that $\left(a , b , c\right)$ falls within the cube, i.e. ${V}_{S} / {V}_{\text{cube}} = {V}_{S} / {L}^{3}$

To find ${V}_{S}$, we will first consider the area ${A}_{b}$ of the slice of $S$ found by fixing $y = b$ for some $b \in \left[0 , L\right]$, and then we will add up all of these areas by integrating ${A}_{b}$ as $b$ goes from $0$ to $L$.

If we fix $y = b$ for some $b$, then ${A}_{b}$ is the area bounded by the lines $x = 0 , x = L , z = 0 , z = L$ and the curve $4 x z = {b}^{2}$, which we can rewrite as $z = {b}^{2} / \left(4 x\right)$

Notice that the curve intersects the square at the points where $x = L$ or $z = L$, that is, at $\left(x , z\right) \in \left\{\begin{matrix}L & {b}^{2} / \left(4 L\right) \\ {b}^{2} / \left(4 L\right) & L\end{matrix}\right\}$

With that, we can now set up our integrals. The upper bound from $x = 0$ to $x = {b}^{2} / \left(4 L\right)$ is the line $z = L$. The upper bound from $x = {b}^{2} / \left(4 L\right)$ to $x = L$ is the curve $z = {b}^{2} / \left(4 x\right)$. Thus

${A}_{b} = {\int}_{0}^{{b}^{2} / \left(4 L\right)} L \mathrm{dx} + {\int}_{{b}^{2} / \left(4 L\right)}^{L} {b}^{2} / \left(4 x\right) \mathrm{dx}$

and

${V}_{S} = {\int}_{0}^{L} {A}_{b} \mathrm{db}$

Omitting the full process of integration to save space, we find the result

${V}_{S} = \frac{5 + 6 \ln \left(2\right)}{36} {L}^{3}$

Thus

$P \left({b}^{2} \ge 4 a c | a , b , c \in \left[0 , L\right]\right) = {V}_{S} / {L}^{3} = \frac{5 + 6 \ln \left(2\right)}{36}$

Substituting this into our initial equation, we get our final result:

$P \left(a {x}^{2} + b x + c \text{ has real roots}\right)$

$= \frac{1}{2} + \frac{1}{2} P \left({b}^{2} \ge 4 a c | \left(a , b , c\right) \in {\left[0 , L\right]}^{3}\right)$

$= \frac{1}{2} + \frac{1}{2} \left(\frac{5 + 6 \ln \left(2\right)}{36}\right)$

$= \frac{41 + 6 \ln \left(2\right)}{72}$

$\approx 0.6272$