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)?
 A: 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}
A: 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.$$
A: 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.
