When solving for roots to a cubic equation, the sign of the $\Delta$ tells us when there will be 3 distinct real roots (as long as the first terms coefficient, $a$, is non-zero.) Namely when $\Delta$ is positive.
The equations to find the 3 roots are:
- $x_1 = -\frac{1}{3a}(b + C + \frac{\Delta_0}{C})$
- $x_2 = -\frac{1}{3a}(b + \frac{C(-1 + i\sqrt 3)}{2} + \frac{2\Delta_0}{C(-1 + i\sqrt 3)})$
- $x_3 = -\frac{1}{3a}(b + \frac{C(-1 - i\sqrt 3)}{2} + \frac{2\Delta_0}{C(-1 - i\sqrt 3)})$
Where: $$C = \sqrt[3]{\frac{\Delta_1 + \sqrt{\Delta_1^2 - 4\Delta_0^3}}{2}}$$
By the given equation, $\Delta_1^2 - 4\Delta_0^3 = -27a^2\Delta$, I know that when $\Delta$ is positive the square root in $C$ will produce an $i$. So when $\Delta$ is positive $C$ is effectively: $$C = \sqrt[3]{\frac{\Delta_1 + i\sqrt{4\Delta_0^3 - \Delta_1^2}}{2}}$$
So obviously the $i$ in $C$ cancels with the $i$s in the $x_2$ and $x_3$ roots, and we get 3 real roots. But for the life of me I cannot work out how. Can someone help me break those steps down?
For example, let's try the equation $x^3 - 2 x^2 - x + 2 = 0$: $a= 1$, $b = -2$, $c = -1$, $d=2$, $\Delta_0 = 7$, $\Delta_1 = 20$.
$$C = \sqrt[3]{10 + 9 i \sqrt{3}} = \sqrt{7} e^{i\theta} = \sqrt{7}(\cos\theta + i \sin\theta)$$ where $$ \theta = \dfrac{1}{3} \arctan(9 \sqrt{3}/10)$$ Then $$ \Delta_0/C = \sqrt{7} e^{-i\theta} = \sqrt{7} (\cos \theta - i \sin \theta)$$ so $$ \eqalign{x_1 &= -\dfrac{1}{3} \left( -2 + \sqrt{7} (\cos\theta + i \sin \theta) + \sqrt{7} (\cos\theta - i \sin\theta)\right)\cr &= \dfrac{2}{3} - \dfrac{2\sqrt{7}}{3} \cos \theta}$$ $$ \eqalign{x_2 &= -\dfrac{1}{3} \left( - 2 + \sqrt{7} (\cos(\theta + 2 \pi/3) + i \sin(\theta + 2 \pi/3)) + \sqrt{7} (\cos(\theta - 2 \pi/3) + i \sin(\theta + 2 \pi/3))\right)\cr &= \dfrac{2}{3} - \dfrac{2\sqrt{7}}{3} \cos(\theta + 2\pi/3)}$$ and similarly $$ x_3 = \dfrac{2}{3} - \dfrac{2\sqrt{7}}{3} \cos(\theta - 2\pi/3)$$ It turns out that $x_1 = -1$, $x_2 = 2$, $x_3 = 1$ (which is no accident: I chose the polynomial to have those roots).