Solving Polynomial Equations 7: Checking the solution to a general cubic
Wild Egg Maths
4.25K subscribers
The power series approach to solving general polynomial equations yields in the cubic case a fascinating array of numbers. We further investigate how to think about this array effectively, including a pleasant parametrization and employing matrix techniques to quickly write out many terms of the series.
00:02
hello everyone i'm norman wahlberger
00:04
and thanks for joining me on this
00:05
adventure towards
00:08
solving the general polynomial equation
00:11
we've had some nice successes uh working
00:15
on the cubic
00:16
and the quartic situation generalizing
00:19
our power series expansions that we
00:21
started with the quadratic case
00:23
and it appears now that there's at least
00:25
the possibility that there's
00:27
something of a uniform approach that
00:29
might
00:30
work even for higher degree although we
00:33
have
00:34
very little evidence of that currently
00:37
so
00:37
we've had a look at the cortex situation
00:39
and we found
00:40
some small evidence that we're on the
00:44
right track but we haven't had a
00:45
sort of comprehensive look and i want to
00:48
now return to the cubic case
00:50
we're sort of emboldened that our
00:51
general approach is in the right
00:52
direction
00:53
and so we want to understand the cubic
00:55
situation
00:56
a little bit more solidly so that's
00:59
sometimes what we have to do we're
01:00
we're thinking about this this area as a
01:03
landscape
01:04
okay we're investigating this landscape
01:06
there's different aspects of it
01:08
we want to be looking at things in
01:10
multiple ways
01:12
to reinforce our sort of
01:14
three-dimensional understanding of
01:15
what's going on
01:16
okay it's not just a linear road leading
01:19
to some
01:20
summit that's not what we're thinking
01:22
about we're thinking about exploring an
01:23
entire region
01:25
and looking at things from different
01:26
points of view
01:28
and as we proceed and as we become more
01:30
familiar with the terrain
01:32
we may sort of tighten up and and
01:34
clarify and and be more accurate and be
01:36
a little bit more precise about things
01:38
okay so it's a it's a dynamic kind of
01:40
thing
01:42
okay so let's go back to what we've
01:45
already accomplished with the cubic
01:46
equation we had something like this so
01:48
here's our basic
01:49
cubic c 0 plus c 1 x plus c 2 x squared
01:52
plus c
01:52
3 x cubed equals zero and we had some
01:56
formula power series essentially sort of
01:59
in
02:00
in c zero that looked like this up to
02:03
degree
02:04
seven and we saw that the pattern of
02:07
terms here
02:08
sort of captured by this expression down
02:10
here
02:11
involving some powers of c0 c2 and c3
02:15
in the numerator power of c1 in the
02:18
denominator
02:19
and kind of corresponding factorials
02:21
nicely corresponding to the various
02:23
powers or exponents that appear here and
02:26
there was also a sign
02:27
that depended actually on the c3
02:30
exponent okay so we want to
02:34
we want to um describe the situation a
02:38
little bit so instead of having to write
02:39
out something like this
02:41
we would like a little bit more compact
02:43
formula that that captures more
02:45
clearly what we're doing and um
02:48
one subtlety that is not exactly
02:51
reflected
02:52
in this this formula here is these
02:55
conditions that i talk about here that
02:57
the terms that are appearing actually
02:59
satisfy these two conditions
03:01
one having to do with the total degree
03:04
and the other
03:05
having to do with the total index degree
03:08
so we said that
03:09
the total degree of these terms is zero
03:12
while the total index degree is minus
03:15
one
03:15
so not all such terms appear only
03:18
certain ones and we want to clarify that
03:20
a little bit
03:22
okay so let's rewrite this let's start
03:25
by
03:27
rewrite this in
03:30
a more uniform
03:34
manner so we're going to take this
03:36
expression
03:37
and we're going to
03:41
replace the a b c
03:44
and k with exponents which are more
03:48
reflective of where they're actually
03:51
positioned
03:52
so maybe we'll use m for exponent okay
03:55
m i don't think we've used m for
03:57
anything so maybe m sub
04:00
zero is the exponent of c zero
04:03
okay and instead of b we might write
04:06
m sub two instead of c we might write
04:10
m sub three instead of k
04:14
we'll put an m sub 1 down there as the
04:17
exponent in the
04:19
denominator okay that means we have to
04:21
adjust these
04:23
terms over here so instead of a
04:24
factorial we have m
04:26
sub 0 instead of b we have m sub
04:30
2 factorial instead of c we have m
04:33
sub 3 factorial instead of this k
04:36
that's going to be m sub 1.
04:40
by the way you might like to know how do
04:43
i make these
04:44
subscripts um relatively quickly so
04:47
there's
04:47
various shortcuts whenever you use a
04:50
computer program there's some shortcuts
04:52
of course that
04:52
that help you become more efficient and
04:55
what i'm using here is
04:56
in scientific workplace if i want to
04:59
make a subscript say m
05:01
sub 1. what i do is i press the m and
05:03
then i press
05:04
ctrl l ctrl l like l for lower
05:08
raises um opens a little spot for um
05:11
an index so if i type m
05:15
control l one then i get m sub one and
05:18
if i want a superscript
05:19
it's ctrl h h for higher so this
05:23
c here that'll be c was uh the
05:26
coefficient of c3 so that's m
05:28
sub 3 i guess
05:32
all right now
05:38
this is subject
05:41
to the two conditions
05:44
on the on the total degree
05:49
and the total
05:52
index degree right and let's write down
05:56
in terms of these exponents what those
05:58
conditions are
06:00
the total degree is going to be m sub 0
06:04
plus m sub 2 plus
06:08
plus m sub 3 and then we have to
06:11
subtract
06:12
m sub 1 because it's actually appearing
06:14
with a negative sign
06:15
because it's coming from the denominator
06:17
so that's the total degree
06:19
and that should be equal to zero the
06:22
other condition
06:23
is the one on the total index degree and
06:25
i remind you remember that's the
06:27
uh the sum of the the products of
06:29
exponents
06:30
and indices so we have to take
06:34
0 times m
06:38
sub 0 plus then 2
06:41
times m sub 2 plus
06:44
3 times m sub 3
06:49
[Music]
06:50
minus 1 times m sub 1 we'll just write
06:54
that
06:55
and that should all be equal to minus 1.
06:58
we don't really need the 0 times m sub 0
07:00
do we know that's going to be 0 so we
07:02
can get
07:03
rid of that
07:06
so that is the condition on this term
07:09
having total indexed degree minus
07:13
- now these are two
07:16
equations in ultimately four unknowns
07:22
so there's really only two degrees of
07:25
freedom here
07:27
and that's good because we would like to
07:30
describe these various terms that appear
07:35
here in in a kind of a consistent way
07:37
and so understanding the
07:39
number of degrees of freedom is a first
07:42
step in sort of
07:43
describing what happens so of these four
07:48
variables that are floating around m0 m1
07:50
m2 m3
07:52
we could choose any two of them and
07:54
solve for the other two
07:56
in terms of those two so let's just do
07:59
that and see what happens
08:01
i might scroll down here a little bit
08:03
put it on top
08:04
oop sorry
08:10
okay let's solve this let's say for
08:13
example we'll try to solve
08:15
this exactly for
08:19
maybe m sub 2 and m sub
08:22
3 in terms of m sub 0 and m sub 1.
08:27
okay and since they're just linear
08:29
equations it's easy enough
08:31
to find out what happens there so m sub
08:33
2 is this
08:34
expression involving m1 and m0 and m sub
08:37
3 is
08:37
this expression involving m0 and m1
08:41
so we could parametrize the situation
08:45
using m 0 and m 1 as parameters
08:49
that would then mean that we would
08:50
replace the m2s and
08:53
threes with these expressions involving
08:55
those
08:57
parameters m0 and m1 that would mean
09:00
that we would also have to replace these
09:02
factorials here with the corresponding
09:04
things
09:06
now that's that's something that we
09:08
could do but if you think about that for
09:10
a little while
09:11
that will end up having a little bit of
09:12
a problem there will be a challenge with
09:14
that
09:15
what's that the challenge is that these
09:19
expressions here have
09:20
negative signs okay so these are going
09:23
to be exponents we want all these things
09:25
to be positive
09:27
these all these exponents that we're
09:28
talking about
09:31
hello all these exponents here um
09:36
m0 m2 m3 m1 they're all positive
09:40
greater than or equal to zero but
09:44
because there's some not minus signs in
09:46
here uh there's going to be conditions
09:48
that
09:49
are required that to ensure that
09:52
these quantities are also positive
09:55
that's a little bit inconvenient so
09:58
let's actually look at something else
09:59
suppose that we
10:01
solve this in a different way so instead
10:04
of solving for m2 and m3
10:06
suppose we solve for
10:10
m1 and m2 let's see what happens there
10:13
solve exact
10:16
say for m sub 1 and m sub 2.
10:23
okay now they're in terms of m 0 and m 3
10:25
and there's still some negative signs
10:29
the same inconvenience would happen if
10:32
we worked
10:33
with these kinds of parameterizations
10:37
let's try another possibility let's try
10:40
to
10:40
solve this exactly
10:44
in terms of say m 0
10:47
and m sub 1 in terms of m 2 and m 3.
10:55
ah something different is happening
10:57
we're getting
10:58
m 0 and m1 as positive combinations when
11:02
i say positive i mean
11:04
greater than or equal to zero positive
11:06
combinations of m2 and m3
11:10
that is much more attractive to us
11:13
because then we don't have to worry
11:15
about
11:16
these factorials having negative values
11:18
we can
11:19
be guaranteed that if m2 and m3 are
11:22
positive
11:23
then these expressions for m0 and m1
11:25
will also be positive
11:28
okay so this is good
11:32
this is good okay so let's
11:36
use that okay so so
11:39
we set let's just grab these things
11:44
m0 is this one
11:49
and m1 is this one
11:55
and let's clean it up a little bit let's
11:56
put the one in front there
12:00
and also put the one in front there
12:06
so now our
12:10
general term
12:14
has the form okay so we'll grab this
12:18
thing here again
12:26
now we're going to replace the m0 with
12:28
this
12:29
okay so that m0 right there
12:32
will be replaced with that expression
12:34
and this m0 factorial down here replaced
12:38
with
12:39
that factorial and the m1 is
12:42
correspondingly going to be replaced
12:44
with this
12:45
expression so instead of m1 down here
12:47
we'll have this as the exponent
12:49
instead of m1 here we'll have this
12:53
of course here's there's a 1 and a minus
12:55
1 so they cancel so let's just get rid
12:57
of them
13:00
oh what about the m3 well that's all
13:02
right because everything now is in terms
13:04
of
13:04
m2 and m3
13:09
so this is nice because now for any
13:12
value of
13:13
m2 and m3 which is positive number
13:16
a positive natural number zero one two
13:19
three et cetera
13:20
we can plug in there and we're gonna get
13:24
all these factorials are also gonna be
13:26
positive so they're actually
13:28
evaluable if we have negative factorials
13:31
then
13:32
it's a whole can of worms as to you know
13:34
what is minus
13:35
2 factorial there is a possible answer
13:38
that but that's
13:39
quite a lot more sophisticated we don't
13:41
want to go there we want to avoid
13:43
negative factorials and this way of
13:45
parameterizing things
13:47
avoid that okay
13:51
so what is this okay okay there's okay
13:54
now let's give this thing some name
13:59
so let's set
14:02
say it's a coefficient so maybe
14:06
c c depending on m
14:10
sub 2 and m sub 3
14:14
equals this whole thing
14:24
and let's make that into a function
14:27
let's just
14:28
clarify what we've already got oh we've
14:29
got all kinds of things here i'm going
14:30
to get rid of
14:32
our existing definitions it's useful to
14:36
clear definitions now and then start
14:38
fresh so you don't get confused okay so
14:40
now we're going to set
14:41
this as our definition of function c
14:44
which will output one of our sort of
14:47
ingredient
14:48
terms of our power series
14:51
solution so let's just check this
14:54
for example uh what is c
14:58
of say you know two one
15:01
twenty one this let's compare this with
15:03
what we started off here so
15:05
let me grab this thing here so we have
15:07
another look
15:13
okay if c2 is raised to the
15:16
second power and c3 is raised to the
15:18
first power we get a 21.
15:20
um that looks exactly like this term
15:22
here
15:24
okay and say let's say we wanted to to
15:27
get this one here
15:28
that would be c2 to the third power c3
15:32
to the first power that would be c of
15:35
do we say three comma one
15:38
that's exactly giving us that 84.
15:42
how about this this term here which is
15:45
actually with a minus sign
15:47
that's when the power of um
15:50
c2 is 2 and the power of c3 is 2. so
15:52
that should be
15:54
c of 2 2 whoops
15:58
and we in fact also get the minus sign
16:00
which is good
16:05
so this suggests now what the general
16:07
formula is
16:08
this suggests now
16:12
a general formula for
16:15
the or for a solution
16:19
an algebraic solution admittedly
16:22
algebraic kind of power
16:23
series solution to
16:26
the general cubic
16:31
which is what um that
16:35
say x is
16:38
it's a sum uh
16:42
where say sub m sub 2
16:46
not m squared m sub 2 goes from 0
16:50
to well i know to some to some index
16:54
you know i know maybe 4 that's kind of
16:58
variable
17:00
actually to suggest this variable aspect
17:02
i could maybe put even a plus
17:04
sign there that's suggesting that this
17:06
is some ongoing thing that we can go as
17:08
far as
17:08
as we feel like it and we're going to
17:10
get some some expression that's useful
17:12
to us
17:14
and the other one would be same thing
17:16
with with an m
17:18
sub 3 there
17:21
and then and then this this quantity
17:24
here
17:25
um c sub m 2 m 3.
17:30
we should probably display this because
17:32
that's going to be important to us
17:42
okay so can we get at this can i ask for
17:46
example
17:46
um scientific workplace to to calculate
17:50
this
17:50
first of all let me just say what i've
17:52
been doing here okay
17:54
let's see we've defined this thing up
17:56
here this
17:59
let's cm2m3 check that yes there it is
18:02
and now can i actually get a you know a
18:04
double sum so for example suppose i try
18:06
something like this
18:10
um instead of an
18:14
general well let me let's go up to
18:16
degree you know three or something
18:18
uh three okay what would happen if i
18:21
actually
18:21
tried to get scientific workplace to
18:23
evaluate this
18:28
uh say simplify
18:36
so um you see this little uh hourglass
18:39
here that means
18:40
it's working it's thinking but it
18:42
shouldn't really think that long right
18:44
because
18:45
there's four terms here four terms
18:47
there's like 16 terms
18:48
and each one is going to be some some
18:51
expression that looks like this
18:54
admittedly in the variable c0 c1 c2 c3
18:58
okay but it's not going to be able to do
19:02
that for us
19:03
and the reason is because
19:06
computationally
19:07
the engine that's running here is you
19:09
know it's very powerful
19:11
but it's not um you know it's
19:14
it's not primarily designed for mass
19:17
computation so this is not as powerful
19:19
an engine as you get with some other
19:20
mathematical programming
19:22
you know things that are expressly
19:25
geared for for mathematics computation
19:27
this framework here is a typesetting
19:31
arena which has a powerful computational
19:34
engine
19:36
in in it but this kind of thing is going
19:38
to be hard for this
19:39
program to do because in this first sum
19:43
here it's going to try to evaluate this
19:46
first sum and because there's these
19:47
variables with these factorials
19:49
it's not able to kind of get a closed
19:51
form expression
19:52
for it okay so what is it what it's
19:55
trying to do is it's trying to evaluate
19:56
this inside thing here before it
19:58
does this final sum and that's not
20:01
something that it's going to be able to
20:02
do
20:04
at least not that i know how to do it so
20:06
i'm going to have to sort of
20:08
cut this computation um i mean i knew
20:11
this was going to happen i just want
20:12
to show you you know what's going to
20:14
happen um this is
20:15
like a dead end we're now stuck in a
20:17
loop which is just going to go around
20:18
and around and we have to
20:21
stop and and and go back and do
20:22
something else okay
20:24
so how do we do that uh we'll do a roll
20:26
ctrl alt delete
20:29
i'm going to take a scientific workplace
20:32
and i'm going to end the task
20:37
okay and now i'm going to open it up
20:39
again
20:41
and open it again
20:48
go back to where we were
20:56
okay so this is sort of where we were
20:57
but we're not going to try to get
20:59
the computer to evaluate this
21:03
as it is but i'm going to show you a
21:06
workaround
21:07
okay so we still want to
21:10
understand this so here's here's a
21:12
workaround we have
21:15
this expression which depends on two
21:17
things m2 and m3
21:18
and the variables are going through
21:20
natural numbers
21:21
starting at zero now scientific
21:24
workplace has a capability of
21:27
nicely creating matrices for us okay
21:30
and i'm going to use that to
21:34
to show you these these see things
21:37
explicitly in kind of a matrix form so
21:39
we see a lot of them at the same time
21:43
now because matrices typically are
21:46
indexed from
21:46
one okay and we're starting from zero we
21:49
have to just
21:50
adjust that a little bit so i'm going to
21:54
to adjust our labeling or indexing
21:59
define a variant let's say d
22:02
d of k l will be equal to the old
22:06
c of
22:10
k minus 1 l minus 1.
22:15
so when if d is 1 1 then we're picking
22:19
up the
22:19
c at 0 0. okay so
22:23
that'll help us in that if k and l now
22:26
just
22:26
range through values starting with one
22:29
then we'll still be able to go through
22:30
the entire range
22:31
so we'll make this definition here and
22:34
now i'm going to show you something
22:35
really cute that
22:36
scientific workplace can do which is to
22:39
create a
22:40
matrix so here's matrices
22:43
all these uh things fill matrix okay
22:47
and um maybe six by six okay that's all
22:50
right
22:51
defined by a function maybe a little bit
22:53
let's do those seven by seven just
22:56
okay seven by seven defined by a
22:58
function
22:59
d
23:05
okay seven by seven can you see all of
23:07
that there's a 7 by 7
23:08
matrix which has all these
23:12
c values starting when
23:15
the indices are zero and i just want to
23:19
grab
23:20
the our actual
23:26
formula and
23:34
compare
23:36
compare with
23:39
okay does it look um
23:43
somewhat similar so
23:46
here c0
23:49
c1 um
23:57
see there's a 2 there's a 5 these are
24:00
all with negative signs where is this
24:04
one here
24:06
um c zero
24:09
squared c two over c one cubed
24:13
that's not on oh well here it is oh yes
24:15
here here this over here
24:17
okay it's just been arranged kind of
24:18
funny way let me actually move that
24:20
to a more sensible spot okay that's more
24:22
likely okay so now this first
24:25
row here the catalan row you can see
24:27
that's captured here in this first
24:29
column and then this next row
24:33
coefficients 1 5 21 84 3 30 etcetera
24:36
it seems to be captured by this second
24:39
column
24:40
and then this next term here which we
24:41
only have three terms up till
24:43
now 3 180 and 28
24:47
that's captured here and we see that the
24:48
order is a little bit different 3
24:50
28 180 and then there's more and then we
24:53
just had a 12
24:54
earlier now we have a whole column for
24:56
that
24:58
so let me remind you that we obtained
25:01
this formula here
25:02
through this rather laborious process of
25:05
using undetermined coefficients
25:07
substituting this power series into our
25:09
general cubic and then
25:10
recursively getting our computer to
25:12
solve for all the various coefficients
25:15
and we all you know we were only able to
25:17
go a certain
25:18
ways here but now that we have a general
25:21
formula
25:23
we can just spit out you know
25:26
these matrices i did a seven by seven i
25:28
could just as well have done a
25:30
a 20 by 20 and then i'd have some huge
25:32
um slab of
25:33
of terms and what if i want to
25:37
you know extract from this the actual
25:41
expression which is a polynomial which
25:44
basically consists of the sum of all
25:45
these terms
25:48
well to get the
25:52
corresponding polynomial
25:56
or polynomial well actually it's not
25:58
really a polynomial it's really it's a
26:00
rational function isn't it
26:01
because it has denominators as well as
26:04
numerators
26:05
um what we can do is we
26:08
employ the following trick but if you
26:10
have a matrix
26:12
and it's a square matrix in this case
26:13
but it doesn't matter and you want to
26:16
find an expression which is the sum of
26:17
all the entries of that matrix
26:20
what you can do is you can multiply by
26:23
a vector which is the vector 1 1 1 1 1
26:27
on the right and horizontal vector 1 1 1
26:30
1
26:30
1 on the left if you think about it when
26:33
you do that matrix multiplication you're
26:34
going to be picking up
26:36
the sum of all the entries of the matrix
26:40
okay so i'm going to illustrate that
26:42
here
26:43
in the following way let's give this
26:45
matrix a name let's call it uh
26:47
m okay m is that matrix and i'm going to
26:50
make that definition and we said it was
26:52
a seven by seven matrix right
26:55
yes okay so now i'm going to
26:59
we compute
27:03
there's the matrix m and i'm going to
27:04
put a matrix
27:06
or a vector beside it no not that that's
27:08
not a vector
27:09
here is a matrix sorry
27:13
here's our form for a matrix
27:18
maybe a seven by one
27:23
and i'm gonna fill it with ones one one
27:25
one one one
27:27
one and i also want the transpose of
27:31
that so i'm gonna just calculate the
27:32
transpose with a
27:34
capital t as an exponent that gives me
27:36
the transpose there
27:39
so i'm going to take the the horizontal
27:42
vector
27:43
and put it to the left and then i have
27:46
the matrix m which is the seven by seven
27:49
matrix
27:49
and then this vector of ones on the
27:52
right
27:53
and now i claim that when i do this
27:55
multiplication i'm gonna get a one by
27:57
one matrix
27:58
now this is a one by seven times a seven
28:00
by seven times a 7 by 1 i'm going to get
28:02
a one by one matrix
28:03
which is just the sum of all the entries
28:06
in the matrix m
28:08
let's see what we get oh it's a big
28:11
thing which runs off the page
28:13
if i say expand i'll be able to see it
28:17
and if we sort of wanted to look like
28:21
more previously if i arrange this say
28:24
polynomial collect in terms of say c3
28:27
which is i think is the way we organized
28:29
it previously
28:33
there's there's the equal sign so i can
28:38
oops sorry um
28:42
equal sign i'm going to eliminate
28:44
everything before this equals sign
28:46
we don't need that boom
28:50
i don't actually even need this either
28:56
i'm going to remove all of that oops
29:00
sorry from here
29:03
to here i'm going to remove okay
29:07
so we get
29:11
and let's compare this with
29:15
our original
29:24
thing
29:27
you can see this first original row that
29:28
we had is
29:30
captured by this thing here this next
29:33
one here
29:36
it's going beyond here to this thing
29:40
and then this one here is all these
29:42
terms here
29:43
and we're getting a lot further terms so
29:45
this is um
29:47
now a powerful way of
29:51
of writing down the solution
29:54
of a general cubic equation this is a
29:57
new formula
29:58
okay that's published here for the first
30:01
time
30:01
okay it's a formula for
30:05
the general cubic and it has an ongoing
30:07
nature the formula that we've given now
30:09
um you know could be could be jacked up
30:11
we've just gone to the 7x7 case but you
30:13
could
30:14
you could expand this at will because
30:16
exactly
30:18
the nature of the terms is completely uh
30:21
completely expressed so this this is the
30:23
formula all right
30:24
where the c is given by this expression
30:26
here
30:29
now you'll all be wanting to know what
30:32
about the the coefficients that are
30:33
appearing here
30:34
what's the pattern we have catalan
30:35
numbers but we also have something else
30:38
what are those other things what kind of
30:41
new and wonderful
30:43
integer numbers are appearing here well
30:46
we have to have a little investigation
30:48
of that