I am stuck on this problem about cubic polynomials. I rely on the Wikipedia page on the topic. Using wikipedia notations (chapter "General formula for roots") :
For the case where $\Delta > 0$, there are 3 real roots and I could check that I can find them.
But for the case where $\Delta < 0 $, when there is one real root and 2 complex conjugated roots, I can not find the real root using the formula they give : $$ x_k = -\frac{1}{3a}\left( b + u_kC+\bar{u_k}\bar{C}\right) $$ where : $$ C = \sqrt[3]{\frac{\Delta_1 + \sqrt{-27a^2\Delta}}{2}} $$ and $u_k$ are the three complex cube roots of unity.
Actually, when $\Delta <0$, $C$ is a real number, and to me the sum $u_kC + \bar{u_k}\bar{C} = 2C\Re(u_k)$ is always real. So where are the complex congugated roots ? And also, depending on the $u_k$ chosen, there is a factor -2 in the root founded.
Can somebody help me to find where I am going wrong ?
I got it ! It was a notation issue.
In Cardano's formula, $\bar{C}$, in the case of one real root and two complex conjugated roots, is not the conjugated of $C$ but another real value :
$$ C = \sqrt[3]{\frac{\Delta_1 + \sqrt{-27a^2\Delta}}{2}} $$
and
$$ \bar{C} = \sqrt[3]{\frac{\Delta_1 - \sqrt{-27a^2\Delta}}{2}} $$
And the formula gives all the roots of the polynomial using the three cube roots of unity.
On a general case, depending on the sign of $\Delta$, $C$ and $\bar{C}$ can be two real or two complex conjugated numbers, which gives a coherency to the formula.