Solving a Cubic - by hand
Solving a cubic polynomial equation can be done by hand. But the computations are a bit tedious. The process is long enough that it is common to have an error of simple arithmetic pop up. Since a computer is good at avoiding those, let's use this worksheet to make the process cleaner.
Our Challenge:
We wish to find the roots of the cubic polynomial [ P(x) = x^3 + 5x^2 - 14x + 26, ] that is, we want to find the solutions of the equation [ x^3 + 5x^2 - 14x + 26 = 0. ]
Step One: get into the reduced form
Our polynomial is already has a leading coefficient of , so we are left to find a substitution that removes the quadratic term. This should work: [ x = z - 5/3 ]
We see that and
Step Two: Compare with the "ideal form"
If we were lucky, we could compare our polynomial with the cube-of-a-sum polynomial and see the answer magically. Let's get our comparison object down, at least. Of course, it requires the insight to use this clever rearrangment: [ (u+v)^3 = 3uv (u+v) + (u^3+v^3). ] If we move stuff around, we want to compare [ (u+v)^3 - 3uv (u+v) - (u^3+v^3) = 0 ] with [ z^3 - \frac{67}{3}z + \frac{1582}{27} = 0. ] Let's guess that , and so, by pattern matching, we want [ -3uv = p = -67/3 \quad \text{and} \quad -(u^3+v^3) = q = 1582/27. ]
So we deduce that and should satisfy these equations: [ uv = -p/3 = 67/9 ] and [ -(u^3 + v^3) = q = 1582/27 . ]
Step Three: Solve for and
It is a challenge to solve for and directly. Instead, let us try to solve for and . Note that we know and . This means we can rely on our knowlege of quadratic equations! As a refresher:
so we can recover and from their sum and product by using the quadratic formula. That is niiiiiiiice.
I'm gonna use a little wizardry to get things arranged but keep from retyping numbers. We want to find the roots of
[ y^2 + by + c = y^2 -(s+t)y + (st) = y^2 -(u^3+v^3)y + (u^3v^3) = y^2 +q y + (-p/3)^3 ]
so, we set up as follows:
Finally, we can use the quadratic equation.
Here is the big reveal, what do we find for and ?
Alright! those are at least numbers. So far, so good. Let's ask for approximations of those numbers to get a sense of what we have.
Now we just need to find the cube roots of these to get and
Find and by extracting cube roots
This is a little tricky sometimes. Here SageMath will introduce complex numbers if I do , so we do a little hack to keep it happy.
Okay. That is my best guess at an answer. This number is a root of our cubic in . We'll have to adjust to get .
Let's check
We can check the quality of our answer in two ways
we can evaluate our polynomial at this value
final
and see if we get zero, orWe can graph the original cubic between and and look for a root.
yeesh! That is intimidating. How can we sort out if that is zero or not? Well, let's at least makes sure we are evaluating at the value we care about
At least that is a really small number. We'll have to trust our graph, I suppose.