# Expected root of quadratic random polynomial

Suppose $A,B,C$ are i.i.d. random variables with uniform distribution on $[-1,1]$. I'm interested in the expected roots of the polynomial $Ax^2 + Bx + C$, which are complex random variables given by $$Z_1 = \frac{-B+\sqrt{B^2-4AC}}{2A}$$ and $$Z_2 = \frac{-B-\sqrt{B^2-4AC}}{2A}.$$

Making simulations, I computed $$E[Z_1] \approx 0.3559 + 0.0005i$$ and $$E[Z_2] \approx -0.6421 - 0.0005i.$$

To confirm this resuts, I need to calculate this values mathematically. For $E[Z_1]$ for instance, this means to calculate the integral $$\frac{1}{8}\int_{-1}^1 \int_{-1}^1 \int_{-1}^1 \frac{-b+\sqrt{b^2-4ac}}{2a}\ da\ db\ dc.$$

Unfortunately, looks like this integral has different values when we change the order of integration. I tried to compute with Wolframalpha. It gives me zero or can't compute depending on the order. Probably this is because the term $\frac{1}{2a}$ goes to infinity in the interval of integration, so we can't use Fubini's Theorem. I'm not sure if Wolframalpha just failed to compute some integrals or $E[Z_1]$ is really not defined. This second scenario means $Z_1$ has no expected value, so the random polynomial $Ax^2 + Bx + C$ has no expected root. I think this is a strange scenario, therefore I really need to confirm whether this is the case or not.

• When $\Delta=B^2-4AC\geq 0$ (with probability about 0.6272) the imaginary part is 0, otherwise it is non-zero, and when it is nonzero the average magnitude of the imaginary part will be correspondingly about 2.68 times as large as you'd get by averaging across both sets of cases. Are you sure you intend to average over both cases? The values of $\Delta$ lie in the range -4 to 5, and the distribution is not symmetric. Actually, it sort of look's like Gandalf's hat – Glen_b -Reinstate Monica Aug 10 '16 at 6:06
• Your $Z_1$ and $Z_2$ are not well defined until you have made a choice of which complex root to take. That choice affects their distributions. – whuber Sep 25 '17 at 21:06
• They are not explicitly given. Every number has two complex square roots. You have to choose which one will be used for $Z_1$ and which for $Z_2$. – whuber Sep 25 '17 at 21:18
• There is no unique value of, say, $\sqrt{i}$. It is one of two complex values. Since neither one is real, it makes no sense to call one "positive" or the other "negative": you have to make a choice as to which one to assign to $Z_1$ and which one to $Z_2$. Your software had to make a choice for you--but that doesn't mean it's the only choice. See en.wikipedia.org/wiki/Branch_point, for instance. – whuber Sep 25 '17 at 21:33
• The distinction between $Z_1$ and $Z_2$, which differ according to which sign precedes the square root, is explicitly a distinction between positive and negative. Your observation nevertheless shows that ultimately it doesn't matter. However, the specific results of any simulation do depend on some such convention. – whuber Sep 26 '17 at 15:03

Your $Z_1$ and $Z_2$ are not well defined until you have made a choice of which complex root to take. That choice could affect their distributions. (It actually does not, by virtue of the symmetries of $A$, $B$, and $C$ around $0$.)

Regardless, since $Z_1+Z_2=-B/A$ is well-defined, suppose you have made such a choice and that the $Z_i$ have finite expectations. From the independence of $A$ and $B$ and the fact that the density of $A$ does not approach zero near $A=0$, it follows from I've heard that ratios or inverses of random variables often are problematic, in not having expectations. Why is that? that $-B/A$ has no expectation. But since $E[-B/A]=E[Z_1+Z_2]$, that creates a contradiction demonstrating at least one of $Z_1$ and $Z_2$ cannot have an expectation.

You can also argue from the symmetry of this problem that the expectation of $\sqrt{B^2-4AC}/(2A)$, if it exists, must be zero. (The distribution of $(A,B,C)$ and the distribution of $(-A,B,-C)$ are the same, but the corresponding distributions of $\sqrt{B^2-4AC}/(2A)$ are negatives of each other. Ergo, their expectations must be negatives of each other, too.) Therefore the expectation of each $Z_i$ is just $E[-B/(2A)]$. This has a simpler expression as an integral:

$$E[-B/2A] = \frac{1}{4}\int_{-1}^1 \int_{-1}^1 -\frac{b}{2a} da db$$

We might try to evaluate it as an iterated integral (according to Fubini's Theorem). However, the inner integral (with respect to $a$) diverges at $0$:

$$\lim_{t\to 0^{+}} \int_t^1 \frac{-da}{a} = \lim_{t\to 0^{+}}\log(t) \to -\infty$$

while

$$\lim_{t\to 0^{-}} \int_{-1}^t \frac{-da}{a} = \lim_{t\to 0^{-}}(-\log(-t)) \to \infty,$$

demonstrating it is undefined. That is why it is invalid to change the order of integration--Fubini's Theorem does not apply--to obtain $0$ for the integral over $b$ and thus get the (wrong) value of $0$ for the expectation.

In either analysis, the source of the difficulty is clear: $A$ has a non-negligible density in any neighborhood of zero.