# Polynomial has real roots

I am trying to prove that the polynomial $f = X^3+pX+q \in \mathbb{R}[X]$ has three real roots iff $\Delta(f) = -(4p^3+27q^2) \geq 0$. I've figured out the left-to-right direction. Write $f = (X-\alpha_1)(X-\alpha_2)(X-\alpha_3)$, and then notice that
$$\Delta(f) = (\alpha_1 - \alpha_2)^2(\alpha_1-\alpha_3)^2(\alpha_2-\alpha_3)^2 \geq 0.$$ But does anyone have a hint for the other direction? Suppose the discriminant is $\geq 0$, how to prove $f$ has three real roots (not necessarily distinct)?

• Assume it doesn't have three real roots, so that two are complex conjugates and the other is real. Compute the discriminant and show that it is negative. – rogerl Feb 18 '18 at 19:48

What's the alternative? Well, your polynomial can have one real root $\alpha_1$ and two non-real conjugate roots $\alpha_2$ and $\alpha_3=\overline{\alpha_2}$. Therefore\begin{align}(\alpha_1-\alpha_2)^2(\alpha_1-\alpha_3)^2(\alpha_2-\alpha_3)^2&=(\alpha_1-\alpha_2)^2\left(\alpha_1-\overline{\alpha_2}\right)^2\left(\alpha_2-\overline{\alpha_2}\right)^2\\&=\left|\alpha_1-\alpha_2\right|^4(2i\operatorname{Im}(\alpha_2))^2\\&=-4\left|\alpha_1-\alpha_2\right|^4(\operatorname{Im}(\alpha_2))^2\\&<0.\end{align}
• Thanks! I'm wondering what exactly is $Im(\alpha_2)$ and how you get so quickly to this? Is it just working out all the brackets or is there a trick? – Sigurd Feb 18 '18 at 22:13
• @Sigurd $\operatorname{Im}(\alpha_2)$ is the imaginary part of $\alpha_2$. If $\alpha_2=a+bi$ (with $a,b\in\mathbb R$), then $\operatorname{Im}(\alpha_2)=b$. On the other hand$$\alpha_2-\overline{\alpha_2}=a+bi-(a-bi)=2bi=2i\operatorname{Im}(\alpha_2).$$ – José Carlos Santos Feb 18 '18 at 22:16
Since $$-4p^3\geq27q^2,$$ we obtain $p\leq0.$
Now, $f'(X)=3X^2+p$, which gives $$X_{max}=-\sqrt{\frac{-p}{3}},$$$$X_{min}=\sqrt{\frac{-p}{3}}$$ and our equation has three real roots iff $$f\left(X_{min}\right)f\left(X_{max}\right)\leq0,$$ which gives $$-4p^3-27q^2\geq0.$$
Try to prove that if $f$ has a repeated root then $\Delta(f) = 0$ and if there are complex roots, then they appear in paris and then we must have that $\Delta(f) < 0$. Then as we have exhausted all cases we can establish the other side of the iff statement.