Finding probability that an equation has real roots when two numbers are chosen from a uniform distribution

The Question reads as follows:

Choose independently two numbers B and C at random from the interval [-1,1] with uniform distribution and consider the quadratic equation:

$$x^2+Bx+C=0$$

find the probability that the roots of this equation a) are both real b) are both positive

I know a) requires that $0\le B^2-4C$ and b) requires $0\le B^2-4C$ , $B \le 0$ , $0 \le C$.

I know what this looks like geometrically and I believe for part a I should be able to integrate something from -1 to 1 but I am not sure what.


Solution 1:

So I believe I figured this out.

For A to be true we need the probability that $0 \le B^2-4C$. To find this I rearranged this to be $C \le \frac{B^2}{4}$ and this is the function we will integrate from -1 to 1.

$$ \int_{-1}^1 \frac{x^2}{4}dx = \frac{1}{6} \approx .1667$$

This would be the area under the curve but is not counting the rest of the area of our square. We must add this area to our integral and then divide by the total area of the square.

$\frac{1}{6} + 2 = \frac{13}{6}$

$\frac{\frac{13}{6}}{4} = \frac{13}{24}$

So this is the probability that the roots of the equation are real.

Looking at the constraints on part B we can see that we have more constraints. This will change the bounds of our integral.

$$ \int_{-1}^0 \frac{x^2}{4}dx = \frac{1}{12} \approx .08333 $$

Here we do not need to add back in any area because given our constraints this is the only section we are looking for. We still must divide by the total area of the square though.

$\frac{\frac{1}{12}}{4} = \frac{1}{48}$