Welcome to another an Mathologer video. If I
were to wake you up in the middle of the night, I’m sure that most of you would be
able to rattle off the quadratic formula: minus B plus or minus the square root of B
squared, and so on. But along with all that quadratic fun
you had in school, most of you would have tortured a few carefully cooked up cubic
equations and maybe even a quartic or two. Right? But did you ever wonder why no
one ever taught you the cubic formula or the quartic formula? Did your teachers ever
even mention the higher degree counterparts of the incredibly useful
quadratic formula? Probably not. Why is that? Is it a cultish
mathematical conspiracy? Are they all hiding some deep dark secret? Well
today’s Mathologer is your invitation into the hidden polynomial brotherhood.
Okay, here’s the general cubic equation which we want to solve. And here’s its
solution, the cubic formula in all its glory. Whoa that looks … interesting. So maybe
that’s our answer right there. That’s way too complicated to memorize and use. A
pretty good reason not to teach it, right? Wrong! Sure the full cubic formula
doesn’t exactly roll off the tongue. But it’s not that hard to make sense of. For
starters the two monsters inside the cube roots actually only differ in a
minus sign. But we can also simplify things dramatically by some
straightforward pre-processing. The general cubic equation can be reduced to
solving a much simpler cubic with a genuinely simple cubic formula. What do I
mean by pre-processing? Well, first, if you divide by the leading coefficient a that
gives an equation with the same solutions but with a leading coefficient
of 1. So we may as well turn all the a’s into 1s. That already looks a lot
simpler. The next most frequent coefficient in the formula is b. Now it’d
be good to get rid of all those b’s and it turns out we can. There’s a second
easy pre-processing step which I’ll motivated soon. This pre-processing
allows us to assume b equals zero and so we just have to worry
about solving a simple cubic without the green quadratic term. Pretty simple, right?
Maybe not kindergarten simple but definitely not a big leap from the
quadratic formula. Again, by performing some simple pre-processing, we can reduce
any cubic equation whatsoever to solving one of these simple cubic equations. In
the literature the letters c and d are usually replaced by the letters p and q
and when people say cubic formula they usually have this exact formula in mind. Really very pretty, isn’t it? Okay, let’s
do a quick example to see how it all works.
Let’s choose, well let’s see p equal to – 15 and q equal to – 126.
Sub these numbers everywhere and we get this. The number under the square root
signs pans out to be 3844 which happens to be equal to 62 squared.
Lucky ! 🙂 Now 63-62 that’s 1 and 63 + 62 that’s 125. Cube root of 1 is 1 and cube
root of 125 is 5, and so we finally get mm-hmm so 6 is solution of our cubic and
you can easily check that. Great! Although shouldn’t there be three
solutions? What happened to the others? Don’t worry, we’ll get to them later.
Anyway, all this looks pretty straightforward and very useful for
dealing with cubic conundrums. Also, for people interested in how our mathematics
came to be the discovery of the cubic formula is considered to be one of the
major milestones in the history of mathematics. So, once again, why doesn’t
anybody teach the cubic formula. There are a couple of answers to this puzzling
question, one more surprising than the next. Promise 🙂 Of course I’ll explain it
all in the following. As you’ve probably already guessed this is another master
class Mathologer video and as usual with these long videos we’ll start really
easy and slowly build up to the challenging finale. It’s all broken up
into seven chapters, with truckloads of really interesting cubic maths ahead.
Plus at the very end I’ll throw in solving the quartic equation for free.
Mathematical seatbelts on? Okay here we go. The cubic formula was discovered
independently by two Italian mathematicians: Nicolo Tartaglia and Scipione del Ferro. And then neither del Ferro nor Tartaglia told anyone about their
amazing discovery. Huh? Why not? Well, just like today, the success
of a sixteenth century mathematician depended on the sorts of problems they
could solve. But back then there was no such thing as Publish or Perish.
Instead mathematicians competed for celebrity in mathematical duels. Mathematicians would publicly challenge
others with take-home exams. They would post sets of problems and whoever could
solve more problems was declared to be the better mathematician. And so if you
were the only mathematician with a secret weapon like the cubic formula
then you would have been pretty much invincible. Don’t tell anybody.
Makes sense, right? And also an impressive start to 500 years of NOT teaching the
cubic formula. Anyway after winning a competition featuring nasty cubics it
became clear that Tartaglia had the secret weapon that he knew the cubic
formula. Then the great Gerolamo Cardano started going after him for this formula.
Cardano was a fascinating character. He was a polymath with his fingers in everything:
he was a famous doctor, a top mathematician, a successful gambler, and
so on. Anyway, eventually Tartaglia gave in. Interesting tidbit: Tartaglia gave
Cardano his formula dressed up as a poem. Quando chel cubo con le cose appresso. Se agguaglia a qualche numero discreto Truouan dui altri differenti in esso. I
put a link to the translation and discussion in the video description.
Ok Tartaglia also made Cardano’s swear a solemn oath not to tell anybody else.
Which of course Cardano broke. After learning the formula from Tartaglia
Cardano kept digging and eventually also found the cubic formula in a
notebook of del Ferro that other discoverer. It became apparent that del
Ferro discovered the formula before Tartaglia. In Cardano’s mind this meant
he was now off the hook. He could now tell people about del Ferro’s solution
and he actually subsequently published a book about it. In a way Cardano’s book
was like a Renaissance WikiLeaks and similar to today and not surprisingly
Tartaglia was incredibly annoyed by this wiki leaking and all hell broke loose.
I’ll link to some sources that have the complete story which, apart from all the
maths also feature a murder, a beheading, and a cameo appearance of the
Inquisition. An absolute must-read for all you maths history buffs. Some great
history, right? Now I’d like you to imagine that we’ve all been transported
back to the time of Cardano and his friends. Try not to be distracted by all
the beheading and inquisitioning. And armed with our knowledge of modern high
school mathswe want to challenge one of these big shots to a mathematical duel.
But since they did not tell us about the cubic formula in school we first have to
rediscover it for ourselves. Time for a bit of a revision
of quadratics to prepare ourselves for the cubic monsters to come. How do you
find a solution to this quadratic equation. Sure, that’s a no-brainer, just
plug the coefficients 2, 8 and -6 into the quadratic formula. Another way of
finding the solutions taught in school since time immemorial is “completing the
square”. This actually translates into the way of
deriving the quadratic formula from scratch. Let me show you a Mathologerized
version of completing the square for this particular quadratic. Ok, start by
dividing through by the leading coefficient. Alright getting there.
Next, interpret x squared as the area of an actual physical square with side
lengths x. Similarly, we’ll think of 4x as the area of a rectangle with sides x and 4.
Chop the rectangle in two like so and rearranged like this. Adding a little
square in the top right corner completes the left side into a new larger square.
But of course to keep our equality we also have to add the little square to
the right side like that. The left side is not just square-shaped it’s also a
perfect square namely x + 2 all squared. It’s now easy to solve the new
equation. Right? Piece of cake. Of course, there’s also that second minus
root 7 solution which we get if we’re not dealing with physical squares. Anyway
here’s an animated derivation of the quadratic formula for the general
quadratic equation by completing the square.
Enjoy the animated algebra and the music. So we know how to complete the square
geometrically in terms of real squares. This is actually similar to how Cardano
and his friends, and probably also the Babylonians thousands of years ago, would
have thought about the process. Algebraically completing the square
boils down to starting with this other super famous identity here, hammering the
quadratic, to look like the right hand side and then using the squareness of
the left hand side to solve the equation. You’ve all done some version of this a
million times, right? To continue our preparation the
cubic puzzling to come we need a second visual derivation of the quadratic
formula. This very nice derivation also illustrates the geometric meaning of the
quadratic formula. Ready? Okay, to be able to quickly refer back to it, let’s write
the quadratic formula in this form and tuck it away up there. Start again with
the pre-processed form of our equation down there. Then the quadratic
corresponds to a parabola like this. Here’s a nice idea. The parabola has a
special point that turning point down there. Let’s shift the parabola
horizontally until the turning point rests on the y-axis. Shift, shift, shift.
The two blue points, the x-intercepts, are still exactly the same distance apart.
However, the quadratic for this new parabola is now in this simpler form,
super simpler form. Right? It’s just the archetypal y=x^2
parabola just shifted up or down. it’s easy to solve this equation which
amounts to locate in the blue intercepts and now to find the solutions we are
really interested in we simply have to undo the horizontal shift we executed
before and keep track of where the blue points go, there great,
Ok now let’s see this scheme in practice First, how far do we have to shift? Well, that amounts to figuring out the x- coordinate of the green turning point
right? There that one. This would normally be done in school with a little algebra
but we’re on a mission here. So let’s take the express lane and use a little
easy calculus to make short work of this job. If you haven’t seen calculus yet,
doesn’t matter, just run with it or substitute the school algebra. OKay, so
form the derivative of the quadratic, set this derivative equal to zero and solve
for x. There, solve, solve, solve. That’s the x-
coordinate of the turning point and more than that: it’s also the familiar – b/2a, the first orange term in our quadratic formula. So that’s just the shift,
right? Now we can shift our parabola. To obtain
the quadratic equation of the new shifted parabola we replace every x by
x-b/2a. Maybe ponder that for a second. All good? Great!
Now use algebra autopilot to expand and collect like terms. Neat. Of course you
also recognize the fraction the messy constant term, right? There, it’s in the
green bit. Now solve to find the shifted blue points there and finally undo the
shift. Tada! Also very nice, isn’t it? Okay having reexpertized ourselves in
quadratics, we are ready to confront our cubic nightmare. A very natural idea is
to try and mimic completing the square to somehow complete the cube using this
perfect cube formula. Hmm, well the way things line up sort of feels it might
work, right? I think most people would play around with this for a while before
trying anything else. Okay so we really go for it for a day, trying to make
completing the cube pan out. And we come up with … zilch! It turns out it’s not that
easy and maybe it’s time to try something else.
So let’s look to mimic our parabola shifting. Okay, start the pre-processing by
dividing through by the leading coefficient. Graphically this kind of cubic will look
roughly like one of these curves. A cubic equation always has at least one
solution but may also have two or three. As well, every cubic has one special
point, the inflection point. This is the point where the cubic switches from
curving one way to the other. Finally, and this may come as a surprise to many of
you, a cubic graph always features a half-turn symmetry about this special
inflection point. Now let’s shift the inflection point to
the y-axis. For that we need the x-coordinate of this point. I’ll again use
some baby calculus. The inflection point here is characterized by the second
derivative being zero. So differentiate once. Okay. Twice. Set equal to zero and
solve. Solve, solve, solve, solved! That’s it, that’s the x-coordinate. This fraction
-b/3a actually appears in the original monster cubic formula I showed
you. Let me show it to you. There that’s the shift again. Now replace x by x – b/3a
and let the algebra auto-pilot perform our shift. That finishes the
pre-processing. The new coefficients are a messy combo of the original a, b, c, and d
but the fundamental form is one of those simple cubics I mentioned in the intro. So if we can figure out how to solve
this special simple cubic equation, then we can undo the shift to solve the
original equation. All very natural and very pretty.
I just love this stuff. Now to analyze our special cubic, what do p and q stand
for in the picture. Well, q is just the y-intercept.
And p is the slope of the curve at the inflection point. So p is the slope of
this green line. Of course, changing q just shifts the cubic up or down. What if
you vary p? Well here’s an animation of how the shape of the curve changes. So
what we’ve got here is that for negative p we’ve got this rollercoaster
shaped curve and for positive p it’s kind of stretched out like that, all
right? So, again, going into the negative – rollercoaster.
In a little while it will be important to know how many solutions our equation
has. Again, for non negative p the graph is stretched out like this and there can
only be one solution. But for negative p we get a rollercoaster graph like this
and 1, 2 or 3 solutions are possible. To figure out how many
solutions we get for negative p, we need to determine the difference in height
between the inflection point and the two extrema. Okay, because of the half-turn
symmetry, the two green height differences will be equal. Now, how many
solutions will we have? Okay, you got it? Well, if the yellow segment is longer
than the green, as pictured here, then there will be just one solution. It’s
also straightforward to check algebraically when this happens. How? Well
the extrema of the cubic occur when the derivative is zero. And the derivative of
the cubic is a quadratic and so we just have to solve a quadratic equation to
pinpoint the coordinates of the extrema. Again, piece of cake, right? And with the
coordinates of the extrema and the turning point, it is then also
easy to translate the yellow-green inequality into algebra. I leave that
as an exercise for you to complete in the comments. In the end the algebraic
counterpart to our yellow-green inequality pans out like this. Okay, in
exactly the same way the cubic having two solutions corresponds to equality
here and three solutions correspond to the reverse inequality. And so the sign
of the expression (q/2)^2+(p/3)^3 tells us how many
solutions our equation has. And this does not only work for negative p
roller-coaster cubics that we’ve been considering so far but for all cubics.
Right? For example, if p is positive, we have only one solution. But, also, with p
positive (q/2)^2+(p/3)^3 is positive. Works: one solution.
But there’s one tiny little annoying exception. Can you spot it? Well can you?
Well, when both p and q are zero, we still have
only one solution however in this case Q (q/2)^2+(p/3)^3 is
equal to 0 and so our table wrongly suggests there are two solutions. A minor glitch in the fabric of the
universe, which is easily fixed by talking for example about single and
repeated solutions. Anyway, the take away message from all this is that (q/2)^2+(p/3)^3 plays the same role for cubics as the
discriminant b^2-4ac plays for quadratics and just like b^2-4ac features prominently in the quadratic formula, will see that this
cubic discriminant takes center stage in the cubic formula. Remember when we wasted that day trying
to complete the cube? It turns out that time wasn’t
totally wasted. While playing with that perfect cube identity for hours we
noticed something very promising: the two middle terms have a common factor 3 u v.
If we pull it out, we get this. And now we can line up things like this. What
this shows us is that if we somehow find u and v so that all the lined up boxes
are equalities, then our cubic is effectively a perfect cube after all and
we will have solved our equation. What this amounts to is solving for u and v
in the green and yellow boxes. And then having done that we obtain our solution
x by just adding u and v. Pretty easy, actually. Let me just show you one way of
doing this. Well, first cube both sides of the green equation. Next, multiply the
yellow equation by v^3. Now we’ve got the same expression here and here and we
can sub like this. Shuffle everything to the left, as usual.
Looks bad at first glance, right? But it’s just a quadratic equation in
disguise. Think of the v^3 as the unknown.
There, blue squared plus something times blue plus something equals 0. Now
just use the quadratic formula to solve for the blue v^3 and cube rooting on
both sides gives this. Almost there. Remember that in our original equations u and v are indistinguishable and so if we solve for u, we get exactly the same
result. And now because of the plus/minus it would seem we can make two choices
each for both u and v, giving a total of three different ways to add them to get
solutions to our cubic equation: plus plus, minus minus, plus minus, and what
gives the same sum, minus plus. So here we have
three candidates for solutions AND cubic equations have up to three solutions.
That looks very promising, doesn’t it? Yes, it does. However, if we double-check
by substituting our candidates in the original equation, we find that only one,
the plus minus or minus plus gives us a genuine solution of the cubic. Why don’t
the other candidates for solutions work out? Can you figure out what the reason
might be? Let us know in the comments. Also, if all this only gives one of the
solutions, where are the other solutions hiding? Well, we’ll get to that. Why don’t they teach this? Well, there’s a
few related reasons that have to do with the way the cubic formula spits out
solutions. Remember that really nice example that I showed you at the
beginning. In that case, the solution given by the cubic formula easily
simplified down to a final answer of 6. Lucky with all those integer squares
and cubes materializing in just the right spots, wasn’t it? Of course it
wasn’t luck. One has to work damn hard to find an
example where the roots simplify that well. But things in general are even
worse than you might expect and some really weird stuff can happen. Let’s have
a look at another example. It’s pretty easy to guess a solution of this
equation. Can you see it. Ok, too late 🙂 Yep x=4 and just to check 4^3 that’s 64, 6 times 4 that’s 24, 64 minus 24 that’s 40, minus 40 is 0. Bingo!!
But what does our formula tell us? Plugging in -6 and -40 we get
this. So the cubic also has a monster rooty solution. But remember that 392
under the square root sign is our cubic discriminant and since 392 is positive
that tells us the cubic equation has only one solution. But that means that
the rooty monster in front of us must equal 4, the solution we guessed earlier.
Can you see at a glance that the two sides of this equation are really equal?
No, not obvious at all. It’s a challenge for you, can you do this from scratch? But
it can be even weirder. Have a look at this third example. Ok, plugging in -6 and -4 we get, well, under the square root sign our cubic discriminant
is 4 minus 8 that’s -4, which is negative. Hmmm, I hear you think. But let’s
first just focus on a negative discriminant which tells us that our
equation has three solutions. Let me just show you those solutions.
But now have a closer look at the expression spat out by our cubic formula.
Not only does this expression not look anything like those three solutions. In
addition, it contains square roots of negative numbers. This means that even
though our three solutions are real numbers, our formula expresses these
solutions in terms of complex numbers. How crazy weird is that. Not surprisingly
Cardano and his buddies were completely weirded out by this. They barely had an
understanding of negative numbers and complex numbers were way beyond their
imagination. And as it’s clear from the formula, the case of three roots always
leads to these weird complex number infested outputs. This horror case came
to be referred to as the casus irreduciblis. In fact, the struggle to
overcome the casus irreducibilis led to the discovery of complex numbers by
Rafael Bombelli not long after Cardano published the cubic formula.
I’ll make sense of the casus irreducibilis in the next chapter. First, let’s
just get all the cubic formula weirdness out in the open. How much weirder can it
get? Well, let’s see. When you’re only dealing with real
numbers, as we have until now, in the first instance it makes sense to speak
of THE cube root of this number, the one real cube root of this number.
However, when we’re dealing with non-real complex numbers,
there is no distinguished cube root anymore. Just as every nonzero complex
number has two square roots, every nonzero complex number has three cube
roots and none is distinguished in any way that makes it qualify for the job of
THE cube root. As we shall see this means that the expression up there does not
just stand for one of the real solutions down there, but for all three of them. One
final bit of weirdness. So Cardano’s formula outputs tame
integer, rational, etc. solutions in weird complex ways. That prompts the question
whether there is another totally different cubic formula that avoids this
weirdness. Right, there’s really no reason why there should not be several cubic
formulas. The answer to this question is both `no’ and `yes’. If by formula we mean a
combination of the coefficients using just basic arithmetic and square roots
and cube roots and the like, as an our cubic formula, the answer is `no’. Any such
formula cannot totally avoid the complex weirdness. This can be proved using a
heavy weapon called Galois theory. We skirted Galois theory in our previous
video on impossible constructions and it will also be the topic of a completely
insane, promise, completely insane Mathologer video in the near future. On the
other hand, if we allow ourselves to also use a bit of trigonometry, then we can
make up cubic formulas that always give real solutions in terms of real
expressions, avoiding the detour into the complex numbers. Anyway, to summarize,
except for the overcomplicated output of simple solutions, our cubic formula is
well-suited to dealing with cubic equations that have positive or zero
discriminant. That is, for equations that have exactly one or two solutions we
don’t need to enter the complex wilderness. Okay,
and that just leaves us with making sense of complex infested outputs in the case
of negative discriminates. Here’s one of the complex monsters
we created earlier. Let’s try to make sense of it. To begin we’ll just cross
our fingers and go for it without worrying too much about any worrying
details. Again, if you’ve never seen complex numbers, please just run with it
as best as you can. So we can always rewrite the square root in terms of the
square root of -1, like this. Now the square root of -1 is usually abbreviated
by the letter i. Marty behind the camera is shaping to throw something at
me. Okay, yes there’s a large nit you can pick here but please save your nitpicks
and projectiles for the comments in the end. It all works out ok. The two complex
numbers under the cube root only differ by the plus or minus sign in the middle.
That means they are complex conjugate numbers and so in the complex number
plane we picture them on opposite sides of the real axis. These two complex
numbers are also pinned down by this distance and this angle. That means we
can rewrite our complex numbers in terms of sine and cosine like this. There,
beautiful ! Ah, so nice. This way of writing complex
numbers is called the polar form. To find the roots of complex numbers written in
this form is very easy. First take the cube root of the distance like so.
Actually it simplifies quite nicely here. And then divide the angle by 3. Ok, there
roots coming up. Now, when we add up the two complex numbers up there, the
plus/minus imaginary parts cancel out, leaving us with a real number. That’s one
of our real solutions. But that’s not all. So far we’ve only used one cube root
each for the two terms in Cardano’s formula. There are two more each. All
these roots together from the corners of two equilateral triangles with centers
the origin. There’s one and there’s the second triangle. In total there are three
conjugate pairs among our six cube roots. Add up these conjugate pairs to get all
three solutions of our cubic equation. And just in case you’re wondering, and
this is a little trig challenge for you. Not `trick’, `trig’ 🙂 these numbers are
equal to these nice expressions. Great stuff, don’t you agree? I have to
admit that these videos are always a killer to put together but they are also a
blessing. While preparing them I always end up stumbling over lots of great
maths and amazing history of which before I only had the barest inkling,
always enough for another video – which I know I’ll never live long enough to
get to. So, in lieu of a second video here are just three fun facts
I stumbled across while working on this video, without explanation. Feel free to
give proving them a go in the comments. Fun fact number one. Here is a cubic with
three zeros. Draw in the tangents at those zeros. The tangents intersect the
graph in one more point each. Then those three points lie in a straight line.
Always! Nice, huh? Fun fact two. This is again about cubics with three zeros. Highlight
the inflection point. Draw an equilateral triangle whose centre is hovering
somewhere above the inflection point. Then it is always possible to rotate and
scale this triangle so that the three corners end up above the zeros. Pretty
neat. You can prove this easily based on what I said in the previous chapter. But
there’s more. Inscribe a circle into the triangle. Then the two extrema line up
with the left- and rightmost points of the circle like this. Final related fun
fact and this one is a real killer: Start again with a cubic polynomial but this
time the coefficients can be any complex numbers. So in general the three zeros of
such a polynomial will be three points in the complex plane, forming a triangle.
Highlight the midpoints of the edges of this triangle. It turns out there’s
exactly one ellipse that touches the edges in those midpoints. And here’s the
killer fun fact three: the two zeros of the derivative of our polynomial are the
focal points of this ellipse. This amazing result is called Marden’s theorem.
And one more thing is true. The zero of the second derivative, which is also the
z-coordinate of the “complex inflection point” is the center of the ellipse. And, phew, that’s just about it for today,
to finish I’ll just show you an animation of a method for solving quartic
equations. This solution is due to Ludovico Ferrari Cadano’s assistant. One of
the super surprising and famous results in algebra is that Ferrari’s method is as
far as we can go when we are asking for solutions in radicals.
There is no quintic formula of this type or a formula for anything beyond. As I
said proving this will be the mission of a future Mathologer video. For now enjoy
Ferrari and the animations and the music. Until next time 🙂