How do you solve standard cubic equations, and is there a general formula like there is for quadratics?
2 Answers
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
#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^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
#3uv+p = 0#
Hence:
#u^3-p^3/(27u^3)+q = 0#
Multiplying through by
#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
Hence three roots:
#u_k = omega^k root(3)((-9q+sqrt(81q^2+12p^3))/18)" "k = 0,1,2#
where
Then
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
As an alternative, if the cubic has
Here's the trigonometric method for the case where the cubic equation has
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
#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_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
Alternatively, note that
#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.