What is the probability of $f(x) = x^2 - 4x + 2^n$ having 2 zeroes, where $n$ is any real number between $0$ and $6$?

56 Views Asked by At

My friend asked about this for his homework. His problem was only for integers, but I'm really interested to know how you would solve this. As far as I can tell, the one restriction is needing a function to determine how many zeroes $f(x)$ will have for any given value of $n$. We can call this function $g(n)$, but I have no idea how it would work. Part of me thinks you'd have to manually check on a graph and make it a piecewise function, but I really want to solve this algebraically.

2

There are 2 best solutions below

2
On BEST ANSWER

The function has two zeros if and only if its discriminant is positive, and the discriminant is

$$(-4)^2 - 4 \cdot 1 \cdot 2^n = 16 - 4 \cdot 2^n.$$

So there are two zeros if $n < 2$, one zero if $n = 2$, and none otherwise.

1
On

You always have two solutions and this is independent of n, hence the probability is 1. It is of course different if x is constrained to the real numbers.