The Oxford Math Interview
Question 5
Let \(A\) and \(B\) be 2 uniform independent random variables on \([0, 1]\). What is the probability that the function \(x^2 + Ax + B\) has 2 real roots?

We know that the equation \(ax^2+bx+c = 0\) has for solutions \( \frac {-b \pm \sqrt{b^2-4ac} } {2a} \), which are distinct and real provided \(b^2-4ac\) is strictly positive.

Hence, \(x^2+Ax+B\) has two real roots if and only if \(A^2-4B > 0\) if and only if \(B \lt \frac{A^2}4\).

Now, since \(A\) and \(B\) are independent and uniform, \((A,B)\) is itself uniform in the square \([0, 1]^2\):

[0,1]^2 plot

Also notice that \(B \lt \frac{A^2}4\) corresponds to the are under the line \(B=\frac{A^2}4\) so the probability that \(x^2+Ax+B\) has two real roots is is simply the area under the curve \(B=\frac{A^2}4\) divided by the total area of the square \([0,1]^2\).

y=x^2/4 plot

$$ P(B \lt A^2/4) = \frac { \int_0^1 { \frac{A^2}{4} } dA }1 $$ $$ = \big[\frac{A^3} {12}\big]_0^1 $$ $$ = \frac{1} {12} $$