# What is the solution for a cubic equation? Thanks.....

Mar 20, 2016

See explanation for a demonstration of Cardano's method...

#### Explanation:

There is a general formula and there are several methods.

My personal favourite method, which works well when a cubic equation has one Real root and two non-Real roots is Cardano's method.

Given a cubic equation:

$a {x}^{3} + b {x}^{2} + c x + d = 0$

If the coefficients are integers, then it may be useful to first multiply through by ${3}^{3} {a}^{2}$ to reduce the number of fractions we need to deal with.

$27 {a}^{3} {x}^{3} + 27 {a}^{2} b {x}^{2} + 27 {a}^{2} c x + 27 {a}^{2} d = 0$

${\left(3 a x\right)}^{3} + 3 b {\left(3 a x\right)}^{2} + 9 a c \left(3 a x\right) + 27 {a}^{2} d = 0$

Substitute $t = 3 a x + b$ to get:

${t}^{3} + \left(9 a c - 3 {b}^{2}\right) t + \left(27 {a}^{2} d + 2 {b}^{3} - 9 a b c\right) = 0$

Let $p = 9 a c - 3 {b}^{2}$ and $q = 27 {a}^{2} d + 2 {b}^{3} - 9 a b c$, so we have:

${t}^{3} + p t + q = 0$

Next substitute $t = u + v$ to get:

${u}^{3} + {v}^{3} + \left(3 u v + p\right) \left(u + v\right) + q = 0$

Then add the constraint: $v = - \frac{p}{3 u}$ to make $\left(3 u v + p\right) = 0$

${u}^{3} - {p}^{3} / \left(27 {u}^{3}\right) + q = 0$

Multiply through by $27 {u}^{3}$ and rearrange to get:

$27 {\left({u}^{3}\right)}^{2} + 27 q \left({u}^{3}\right) - {p}^{3} = 0$

Use the quadratic formula to find:

${u}^{3} = \frac{- 27 q \pm \sqrt{729 {q}^{2} + 108 {p}^{3}}}{54}$

$= \frac{- 27 q \pm 3 \sqrt{81 {q}^{2} + 12 {p}^{3}}}{54}$

The derivation was symmetric in $u$ and $v$, so one of these roots can be used for ${u}^{3}$ and the other for ${v}^{3}$.

If $81 {q}^{2} + 12 {p}^{3} \ge 0$ then the square root is Real and the Real root of the cubic ${t}^{3} + p t + q = 0$ is:

${t}_{1} = \sqrt[3]{\frac{- 27 q + 3 \sqrt{81 {q}^{2} + 12 {p}^{3}}}{54}} + \sqrt[3]{\frac{- 27 q - 3 \sqrt{81 {q}^{2} + 12 {p}^{3}}}{54}}$

In this case, the Complex roots are given by:

${t}_{2} = \omega \sqrt[3]{\frac{- 27 q + 3 \sqrt{81 {q}^{2} + 12 {p}^{3}}}{54}} + {\omega}^{2} \sqrt[3]{\frac{- 27 q - 3 \sqrt{81 {q}^{2} + 12 {p}^{3}}}{54}}$

${t}_{3} = {\omega}^{2} \sqrt[3]{\frac{- 27 q + 3 \sqrt{81 {q}^{2} + 12 {p}^{3}}}{54}} + \omega \sqrt[3]{\frac{- 27 q - 3 \sqrt{81 {q}^{2} + 12 {p}^{3}}}{54}}$

where $\omega = - \frac{1}{2} + \frac{\sqrt{3}}{2} i$ is the primitive Complex cube root of $1$.

If on the other hand $81 {q}^{2} + 12 {p}^{3} < 0$ then the square roots are pure imaginary, the cube roots are of Complex numbers and all three roots are Real.

In this case to match the appropriate cube root $v$ to $u$, we have to use the relation $v = - \frac{p}{3 u}$ to find:

${t}_{k + 1} = {\omega}^{k} \sqrt[3]{\frac{- 27 q + 3 \sqrt{81 {q}^{2} + 12 {p}^{3}}}{54}} - \frac{p}{3 {\omega}^{k} \sqrt[3]{\frac{- 27 q + 3 \sqrt{81 {q}^{2} + 12 {p}^{3}}}{54}}}$

$k = 0 , 1 , 2$

From these vales of $t$ we can find $x$ by $x = \frac{t - b}{3 a}$