How do you solve standard cubic equations, and is there a general formula like there is for quadratics?

2 Answers
Oct 27, 2017

It's a little complicated...

Explanation:

There are standard formulas, but they are somewhat messy and I would not recommend learning them.

Here's a sequence of steps for solving a general cubic equation:

Given:

#ax^3+bx^2+cx+d = 0" "# with #a != 0#

Divide the whole equation by #a# to get:

#x^3+b/ax^2+c/ax+d/a = 0#

Note that:

#(x+b/(3a))^3 = x^3+b/ax^2+b^2/(3a)x+b^3/(27a^3)#

#(c/a-b^2/(3a))(x+b/(3a)) = (c/a-b^2/(3a))x+((bc)/(3a^2)-b^3/(9a^2))#

So substitute #t = x+b/(3a)# to get:

#t^3+(c/a-b^2/(3a))t+(d/a+b^3/(9a^2)-(bc)/(3a^2)-b^3/(27a^3)) = 0#

Let:

#p = (c/a-b^2/(3a))#

#q = (d/a+b^3/(9a^2)-(bc)/(3a^2)-b^3/(27a^3))#

So:

#t^3+pt+q = 0#

Next let:

#t = u+v#

So our equation becomes:

#u^3+v^3+(3uv+p)(u+v) + q = 0#

To eliminate the term in #(u+v)# add the constraint:

#3uv+p = 0#

Hence:

#u^3-p^3/(27u^3)+q = 0#

Multiplying through by #9u^3# this becomes:

#9(u^3)^2+9q(u^3)-p^3/3 = 0#

Then by the quadratic formula we find:

#u^3 = (-9q+-sqrt(81q^2+12p^3))/18#

This would give #6# possible values for #u#, but they are also values for #v# and there are three distinct resulting sums. So we can take the positive sign of the #+-# here and find...

Hence three roots:

#u_k = omega^k root(3)((-9q+sqrt(81q^2+12p^3))/18)" "k = 0,1,2#

where #omega = -1/2+sqrt(3)/2i# is the primitive complex cube root of #1#

Then #v_k = -p/(3u_k)#

So three roots to our reduced cubic:

#t_k = omega^k root(3)((-9q+sqrt(81q^2+12p^3))/18) - (omega^(-k) p)/(3root(3)((-9q+sqrt(81q^2+12p^3))/18))#

and hence three roots to our original cubic:

#x_k = -b/(3a)+omega^k root(3)((-9q+sqrt(81q^2+12p^3))/18) - (omega^(-k) p)/(3root(3)((-9q+sqrt(81q^2+12p^3))/18))" "k = 0,1,2#

Actually, if exactly one of the roots of the cubic is real, then we can simplify this to:

#x_k = -b/(3a)+omega^k root(3)((-9q+sqrt(81q^2+12p^3))/18)+omega^(-k)root(3)((-9q-sqrt(81q^2+12p^3))/18) " "k = 0,1,2#

This derivation works ok when #81q^2+12p^3 >= 0#, but gives a nasty formulation when #81q^2+12p^3 < 0#. In particular the real root is described in terms of irreducible cube roots of complex numbers.

As an alternative, if the cubic has #3# real roots we can use a trigonometric substitution #t = k cos theta# to get a result expressed in terms of #cos# and #cos^(-1)#.

Oct 27, 2017

Here's the trigonometric method for the case where the cubic equation has #3# real roots...

Explanation:

Let us deal with the reduced cubic:

#t^3+pt+q = 0#

(see other solution for how to get here if your cubic is more general)

Consider the substitution:

#t = k cos theta#

Then our equation becomes:

#k^3 cos^3 theta + kp cos theta + q = 0#

We want to use the trigonometric identity:

#cos 3 theta = 4 cos^3 theta - 3 cos theta#

So dividing our equation by #k^3/4# we find:

#4 cos^3 theta + (4p)/k^2 cos theta + (4q)/k^3 = 0#

Then we want:

#(4p)/k^2 = -3#

So:

#k^2 = -(4p)/3#

and we can choose:

#k = sqrt(-(4p)/3) = 2/3sqrt(-3p)#

Note also:

#k^4 = (-(4p)/3)^2 = (16p)/9#

Then:

#(4q)/k^3 = (4qk)/k^4 = (4qk)/((16p)/9) = (9qk)/4 = 3/2qsqrt(-3p)#

So our equation becomes:

#4 cos^3 theta-3 cos theta + 3/2qsqrt(-3p) = 0#

That is:

#cos 3 theta = -3/2qsqrt(-3p)#

So:

#3 theta = +-cos^(-1)(-3/2qsqrt(-3p)) + 2npi" "n in ZZ#

Hence distinct values:

#cos theta = cos(1/3 cos^(-1)(-3/2qsqrt(-3p))+(2npi)/3)" "n = 0, 1, 2#

Then #t = k cos theta#, so the distinct roots of our original cubic are:

#t_n = 2/3sqrt(-3p) cos(1/3 cos^(-1)(-3/2qsqrt(-3p))+(2npi)/3)" "n = 0, 1, 2#

Footnote

If not all of the roots are real, then #abs(-3/2qsqrt(-3p)) > 1#. The formula we derived is still true, but we have to deal with complex values of #cos^(-1)#.

Alternatively, note that #cosh theta# also satisfies:

#cosh 3 theta = 4 cosh^3 theta - 3 cosh theta#

So we can follow a similar derivation to find:

#t_n = 2/3sqrt(-3p) cosh(1/3 cosh^(-1)(-3/2qsqrt(-3p))+(2npi)/3i)" "n = 0, 1, 2#

I have not really used this hyperbolic method, since in the cases where it makes most sense we can use Cardano's method anyway.