# How to solve a cubic equation

Consider the general cubic equation

$x^3+bx^2+cx+d=0.\quad\quad\quad(*)$

Let

$y = x + \omega \implies x = y - \omega.\quad\quad\quad(1)$

Substituting (1) into (*), we have

$(y-\omega)^3 + b(y-\omega)^2+c(y-\omega) + d = 0.$

This is a new cubic equation in $y$:

$y^3 + (b-3\omega)y^2 + (3\omega^2-2b\omega+c)y - \omega^3+b\omega^2-c\omega+d=0\quad\quad\quad(2)$

Let

$\omega = \frac{b}{3}\quad\quad\quad(3)$

so that (2) becomes

$y^3 + (c-\frac{b^2}{3})y+d-\frac{bc}{3}+\frac{2b^3}{27}=0.$

That is

$y^3+py=q\quad\quad\quad(4)$

where $p = c-\frac{b^2}{3}, q = -d+\frac{bc}{3}-\frac{2b^3}{27}$ (see Fig. 1).

Thus, (4) is the so called depressed cubic equation. A solution is readily available through Cardano’s formula (see “Through the Mind’s Eye“).

Once we know $y$, (1) gives

$x = y - \frac{b}{3}.$

Fig. 1

# Deriving the quadratic formula without completing the square

$ax^2+bx + c =0, a \ne 0.\quad\quad\quad(*)$

Let

$y = x + \omega \implies x = y-\omega.\quad\quad\quad(1)$

Substituting (1) into (*), we have

$a(y-\omega)^2+b(y-\omega)+c = 0.$

This is a new quadratic equation in $y$:

$ay^2+(b-2a\omega)\cdot y + a\omega^2-b\omega+c=0.\quad\quad\quad(2)$

Let

$\omega = \frac{b}{2a} \quad\quad\quad(3)$

so that (2) becomes

$ay^2 + 0\cdot y + a(\frac{b}{2a})^2 - b(\frac{b}{2a}) +c=0.$

That is,

$ay^2 + \frac{-b^2}{4a} + c =0.\quad\quad\quad(4)$

Solving (4) for $y^2$,

$y^2 = \frac{b^2-4ac}{4a^2} \implies y = \pm \frac{\sqrt{b^2-4ac}}{2a}\quad\quad\quad(5)$

Substituting (3) and (5) into (1) gives

$x = \pm \frac{\sqrt{b^2-4ac}}{2a}-\frac{b}{2a}=-\frac{b}{2a} \pm \frac{\sqrt{b^2-4ac}}{2a},$

i.e.,

$x = \frac{-b \pm\sqrt{b^2-4ac}}{2a}.$