Associated Topics || Dr. Math Home || Search Dr. Math

### Probability of a Function Having Complex Roots

```
Date: 05/11/2000 at 18:28:08
From: Henrik
Subject: Probability That a Function Has Complex Roots

I found a similar problem in your archives, but note that this one is
not quite the same:

What is the probability, P, that the function f(x) = x^2 + px + q = 0
has complex roots? Consider the following cases:

(a) 0 < p < 1     (b) 0 < p < 5     (c) 0 < p
0 < q < 1         0 < q < 5         0 < q
```

```
Date: 05/12/2000 at 11:18:27
From: Doctor Anthony
Subject: Re: Probability That a Function Has Complex Roots

>What is the probability, P, that the function f(x) = x^2 +px + q = 0
>has complex roots? Consider the following cases:
>
>(a) 0 < p < 1
>    0 < q < 1

For complex roots you require B^2 < 4AC, that is:

p^2 < 4q

To find the probability of this, assuming that p and q are each
uniformly distributed in the range 0 to 1, we set up rectangular axes
with q along the horizontal axis and p on the vertical axis.

The graph of p^2 = 4q is the boundary and we require a probability
that we lie below this boundary. This will be given by the area under
the boundary divided by the area of the 1x1 square (= 1).

When p = 1, q = 1/4, so we integrate between 0 and 1/4 and then addthe
rest of the area, which is (3/4) x 1.

Area = INT(0 to 1/4)[p.dq] + 3/4

= INT(0 to 1/4)[2.q^(1/2).dq] + 3/4

= 2[(2/3)q^(3/2)] from 0 to 1/4 + 3/4

= (4/3)(1/4)^(3/2) + 3/4

= (4/3)(1/8) + 3/4

= 1/6 + 3/4

= 11/12

And so in this case the probability of complex roots is 11/12.

>(b) 0 < p < 5
>    0 < q < 5

This time, when q = 5, p^2 = 20 and p = 4.47, so the curve remains
inside the 5x5 box and we can simply integrate in the range 0 < q < 5.

Area = INT(0 to 5)[p.dq]

= INT(0 to 5)[2.q^(1/2).dq]

= 2(2/3)q^(3/2) from 0 to 5

= (4/3)5^(3/2)

(4/3)5^(3/2)
and the probability is  ------------  =  0.59628
25

So the probability of complex roots is 0.59628.

>(c) 0 < p
>    0 < q

This time,

Area below curve = (4/3)q^(3/2)

Total area -> q^2

(4/3)q^(3/2)
Probability =  ------------
q^2

(4/3)
=  ------- -> 0  as  q -> infinity.
q^(1/2)

So in this case the probability of complex roots tends to zero.

- Doctor Anthony, The Math Forum
http://mathforum.org/dr.math/
```
Associated Topics:
High School Basic Algebra
High School Probability

Search the Dr. Math Library:

 Find items containing (put spaces between keywords):   Click only once for faster results: [ Choose "whole words" when searching for a word like age.] all keywords, in any order at least one, that exact phrase parts of words whole words

Submit your own question to Dr. Math
Math Forum Home || Math Library || Quick Reference || Math Forum Search