= Cardano formula
{c}
{wiki}
For a depressed cubic $X^3+aX+b=0$ over a <field> of <characteristic zero>, put
$$
D=\left(\frac b2\right)^2+\left(\frac a3\right)^3.
$$
Choose $U,V$ with $U^3=-b/2+\sqrt D$, $V^3=-b/2-\sqrt D$, and $UV=-a/3$. Then $x=U+V$ is a root, because
$$
x^3+ax+b=U^3+V^3+(3UV+a)(U+V)+b=0.
$$
For $a\ne0$, choose a nonzero $U$ and set $V=-a/(3U)$; this enforces the compatibility rather than choosing two arbitrary cube roots. If $a=0$, take a cube root of $-b$ directly. With a primitive cube <root of unity> $\omega$, the other roots are $\omega U+\omega^2V$ and $\omega^2U+\omega V$.
The <Lagrange resolvent for a cubic> explains why a quadratic equation appears inside the formula. Even when the cubic has three real roots, complex intermediate radicals may occur; the compatible pairing of cube roots is what makes the resulting expressions solve the original equation.
Back to article page