# Probability concerning polynomial.

#### anemone

##### MHB POTW Director
Staff member
Let [FONT=MathJax_Math]A[/FONT], [FONT=MathJax_Math]B[/FONT], [FONT=MathJax_Math]C[/FONT] be random number between [FONT=MathJax_Main]([/FONT][FONT=MathJax_Main]0[/FONT][FONT=MathJax_Main],[/FONT][FONT=MathJax_Main]1[/FONT][FONT=MathJax_Main])[/FONT]. What is the probability that the polynomial Ax^2+Bx+C=0 has no real roots?

I know that this question is a kind of c.r.v problem (uniform distribution). Also, it has something to do with exponential random variables. My problem is, exponential random variable sounds vaguely familiar with me. But I'm sorely tempted to pick it up if someone could shed some light on it.

Like always, I'd be grateful for advice.

Thanks.

#### Mr Fantastic

##### Member
Let [FONT=MathJax_Math]A[/FONT], [FONT=MathJax_Math]B[/FONT], [FONT=MathJax_Math]C[/FONT] be random number between [FONT=MathJax_Main]([/FONT][FONT=MathJax_Main]0[/FONT][FONT=MathJax_Main],[/FONT][FONT=MathJax_Main]1[/FONT][FONT=MathJax_Main])[/FONT]. What is the probability that the polynomial Ax^2+Bx+C=0 has no real roots?

I know that this question is a kind of c.r.v problem (uniform distribution). Also, it has something to do with exponential random variables. My problem is, exponential random variable sounds vaguely familiar with me. But I'm sorely tempted to pick it up if someone could shed some light on it.

Like always, I'd be grateful for advice.

Thanks.
Hints: b^2 - 4ac < 0 => -2 ln(b) > -ln(4) - ln(a) - ln(c).

Also, if b ~ U(0, 1) then -ln(b) ~ .... and the sum of two independent exponential random variables with parameter 1 is ....

Therefore ....

Details are left for you to fill in.

#### anemone

##### MHB POTW Director
Staff member
Ah! I've done much of what you said (I really should have written it out in the first place) and I'm stuck on the rest.
But never mind, Mr. F, as this question is already outside my territory, I'll just leave it the way it's.
But I would love to see your workout, if only that's OK with you, .

Thanks.

Last edited:

#### CaptainBlack

##### Well-known member
Ah! I've done much of what you said (I really should have written it out in the first place) and I'm stuck on the rest.
But never mind, Mr. F, as this question is already outside my territory, I'll just leave it the way it's.
But I would love to see your workout, if only that's OK with you, .

Thanks.
When other methods are beyond you there is always Monte-Carlo:

Code:
>NN=1000000;      ..number of experiments
>AA=random(NN,3); ..coefficients ~U(0,1)
>
>.. proportion with negative discriminant:
>pp=sum( (AA(:,2)^2-4*AA(:,1)*AA(:,3)<0)' )/NN
0.745455
>.. approximate SE of the above proportion
>se=sqrt(NN*pp*(1-pp))/NN
0.000435605
>
CB

#### anemone

##### MHB POTW Director
Staff member
Thanks, CB. This site is awesome for math lovers.

I think I have found another 'method' to get an approximate answer to this question.
My attempt is to rewrite the quadratic equation as a linear equation (and trying to graph it on Cartesian plane) and think along the line of what sensible meaning would it be in order to get the polynomial Ax^2+Bx+C=0 has at least one real root. And the far that I can tell is the probability to get the polynomial Ax^2+Bx+C=0 has no real roots will be approximately equal to 0.7499985, but that is a wretchedly lousy idea to consider.

Last but not least, I sure hope Mr. F would consider showing me the solution.

#### chisigma

##### Well-known member
Mr Fantastic's idea was really 'fantastic' [nomen est omen ...]... however I had to spend several efforts to realize it!...

First step is the computation of the p.d.f of the logarithm of a r.v. uniformly distributed in $0<x<1$ [demonstrations will be supplied on request...]. If the r.v. b is uniformly distributed in $0<x<1$, then the r.v. $\displaystyle \ln b^{2}$ has p.d.f. ...

$\displaystyle f_{1}(t)=\begin{cases}\frac {1}{2} e^{\frac{t}{2}} &\text{if}\ t<0\\ 0 &\text{if}\ t>0\end{cases}$ (1)

... and if the r.v. a and c are uniformly distributed in $0<x<1$ then the r.v. $\displaystyle \ln \frac{1}{a c}$ has p.d.f. ...

$\displaystyle f_{2}(t)=\begin{cases}0 &\text{if}\ t<0\\ t\ e^{-t} &\text{if}\ t>0\end{cases}$ (2)

From (1) and (2) we derive that the r,v, $\displaystyle \ln b^{2}+ \ln \frac{1}{a c}$ has p.d.f. $f(t)=f_{1}(t)* f_{2}(t)$ where '*' means convolution. That convolution can be realized efficiently through the use of Fourier Transform. We have...

$\displaystyle \mathcal{F} \{f_{1}(t)\}= \frac{1}{2}\ \int_{- \infty}^{0} e^{\frac{t}{2}}\ e^{- i\ \omega\ t}\ dt= \frac{1}{1-2\ i\ \omega}$ (3)
$\displaystyle \mathcal{F} \{f_{2}(t)\}= \int_{0}^{+ \infty} t\ e^{-t}\ e^{- i\ \omega\ t}\ dt= \frac{1}{(1+ i\ \omega)^{2}}$ (4)

... so that is...

$\displaystyle \mathcal {F}\{f(t)\} = \mathcal{F}\{f_{1}(t)\}\ \mathcal{F}\{f_{2}(t)\} = \frac{1}{(1-2\ i\ \omega)\ (1+i\ \omega)^2}= \frac{1}{3}\ \frac{1}{(1+i\ \omega)^{2}} + \frac{2}{9}\ \frac{1}{1+i\ \omega} + \frac{4}{9}\ \frac{1}{1-2\ i\ \omega}$ (5)

.... and from (5)...

$\displaystyle f(t)=\begin{cases}\frac{4}{9}\ e^{\frac{t}{2}} &\text{if}\ t<0\\ \frac {1}{3} t\ e^{-t} + \frac{2}{9}\ e^{-t} &\text{if}\ t>0\end{cases}$ (6)

Now we are in condition to compute the probability of $a\ x^{2}+ b x + c$ to have real roots that is...

$\displaystyle P= \int_{\ln 4}^{\infty} f(t)\ dt= \frac{5}{36} + \frac{\ln 4}{12} = .254413418982... \implies 1-P= .745586581017...$ (7)

Kind regards

$\chi$ $\sigma$

Last edited:

#### awkward

##### Member
Another approach is to find the volume of the region in the cube 0 <= A, B, C <=1 satisfying B^2 < 4AC. It's a little tricky to get the limits of integration right, otherwise it's just a simple calculus exercise.

#### anemone

##### MHB POTW Director
Staff member
Thanks, awkward.
I'll give it a try and hopefully, things will work out well or I'll ask again for more guidance....