# Solved – Probability that a quadratic equation with random coefficients has two real solutions

In the following second order equation \$ax^2+2bx+1.5=0\$ where \$a\$ and \$b\$ are given by random points \$(a,b)\$ in the \$[0,2]times[0,1]\$ rectangle, what is the probability of having two real solutions?

I'm a little lost here. I tried integrating \$4b^2-6a\$ with \$a=0to 2\$ and \$b=0to 1\$ as limits but the integral comes up negative.
I created a simulation of the problem using matlab and the probability is 0.11 but I want to find a way to solve it on paper and not with using matlab.

Any thoughts?

Contents

The quadratic formula tells us this equation has two real solutions exactly when the discriminant \$4b^2 – 6a\$ is positive. This describes a set of points \$R\$ in the \$(a,b)\$ plane, shown in blue here: When the joint density of \$(a,b)\$ is \$f\$, then (by definition of pdf) the probability of any event (like \$R\$) is given by its integral \$int_R f(a,b)da db\$. Because the distribution is uniform, this is the same as finding the area of the shaded region as a proportion of the total area (equal to \$2\$), often written as a double integral like

\$\$frac{1}{2}int_0^1 int_{alt 4b^2/6, 0le ale 2} da db.\$\$

However, we can reduce this to a single integral: the shaded region is bounded by the parabola \$a = 2 b^2/3\$ on the right, \$a=0\$ on the left, and extends from \$b=0\$ to \$b=1\$. Its area therefore is \$int_0^1 2b^2/3 db = 2/9\$. That amounts to \$1/9 = 0.1111ldots\$ of the total area.

Edit (see comments). In case this is unclear, we can proceed more formally. The uniform distribution function \$f\$ is obtained by knowing (a) it is constant on the rectangle \$[0,2]times[0,1]\$ and (b) is zero outside this set. From (a) and the fact that any PDF must integrate to unity forces \$f(a,b)=1/2\$ inside the rectangle, whence

\$\$eqalign{ f(a,b) = &1/2, &0 le a le 2, 0 le b le 1\ &0 &text{otherwise}. }\$\$

Integration is defined in terms of characteristic functions: the integral over an event \$E\$ with respect to a measure \$dmu\$, written, \$int cdots int_E dmu\$, equals \$int cdots int I_E(x) dmu(x)\$ where the multiple integral is taken over all possible values of \$x\$ and \$I_E(x) = 1\$ when \$xin E\$ and \$I_E(x)=0\$ otherwise. The figure immediately shows that the solution is

\$\${Pr}_f[(a,b)in R] = int int_R f(a,b) da db\$\$

and the original double integral expression follows immediately from this expression by the definition of integration. For more about this, consult any textbook on measure theory and integration or–for a less formal approach–consult any advanced calculus text that covers multiple integration. End of edit.

This is essentially problem #50 from Fred Mosteller's Fifty Challenging Problems in Probability:

What is the probability that the quadratic equation \$x^2 + 2bx + c = 0\$ has real roots?

Solving it requires proposing some "reasonable" probability distribution for \$(b,c)\$. Mosteller chooses a set of uniform distributions over a sequence of rectangles that grows without bound and takes the limit.

Rate this post