# Suma kwadratów pierwiastków wielomianu

## Transkrypcja filmu video

In the last video,
we figured out how to figured out the sum
of the roots of a polynomial. What we're going to try to
attempt to do in this video is think about the
sum of the squares of the roots of a polynomial. So let's think about
that a little bit. So let's say that I
have a second degree polynomial that looks like this. So it's x squared plus a1x,
plus a2 and this is equal to 0. We saw-- and actually,
I'll just redo some of what we did
in the last video, because it's going to
be useful over here. This thing is going to
have two roots, r1 and r2. Two roots, and that tells
us that this thing can be rewritten as x minus r1,
times x minus r2 is equal to 0. And if you expand
this out, you get x squared minus r1
plus r2, x, plus r1r2. So that's what you
get right over there. Now, let's think about it. We figured out from the last
video that r1 plus r2, which is right over here,
that needs to be equal to the negative
of this coefficient. This a1 over here is equal to
the negative of r1 plus r2. So r1 plus r2 is equal
to the negative of a1. So let's see if we can use that
information, right over there, to figure out what-- let
me do this in a new color-- to figure out what r1
squared plus r2 squared is. So let's see how
we could get that. Well, one place that we
could start off with, we could start off with
r1 plus r2 squared. So r1 plus r2 squared, which
is, of course, the same thing as negative a1 squared, which
would be the same thing as a1 squared. a1 squared-- I could
put a negative here, but a negative 1
times negative 1 is obviously a
positive one-- this is going to be
equal to r1 squared plus 2r1r2, plus r2 squared. So this has the sum that
we care about in it. Let's call this
sum 1-- we're just raising the roots
to the first power. Let's call this sum 2. So this over here, we've
written, essentially, that sum 1 squared--
that's sum s sub 1 squared is equal
to-- this plus this is s sub 2-- is equal
to s sub 2 plus 2r1r2. Now, can we figure
out what r1r2 is based on looking at the
actual original polynomial? Well, you look over
here, if you just did an expansion--
of course, I forgot to write here that this is
equal to 0-- r1r2 is essentially represented by a2 over here. So to take the first degree
sum, or the roots raised to the first power sum, we
looked at this coefficient. Now all of a sudden, we're
involving the coefficient to the right of that. We're going two degrees below
the degree of the polynomial. So this, right over here, is a2. So r1r2 is a2. That's a2. This right here-- this whole
expression-- is a1 squared. So if we want to
solve for this sum-- if we want to solve
for s sub 2, we would get s sub 2 is equal
to a1 squared-- that's this over here--
minus 2 times a sub 2. So we just figured
out a fast way to figure out the sum of the
squares of the root of just a second degree
quadratic right now. So for example,
if I were to give you-- let me give you
something strange. So if I were to give you 7x
squared minus pi x, plus e is equal to 0. And someone said, I
want you to figure out the sum of the squares of
the roots of this polynomial, first you want to
make the coefficient in front of the x squared 1. So divide everything by 7. So you get x squared minus
pi over 7 x, plus e over 7 is equal to 0. And then you could just use
the result that we just found. The sum of the square of the
roots-- is this s2 over here. Whatever the roots are,
you square each of them, you take their
sum, and it's going to be equal to a1 squared. So it's going to be
pi squared over 49. I'm just squaring
this right over here, or I could just square that. The negative doesn't
matter what I'm squaring. minus 2 times e over seven. And that's about as
simplified as you could get this expression. So it's pi squared over
49, minus 2 e over 7, which by itself a
pretty neat result. Because it would be very hard
to find the roots of this. You'd get some crazy
numbers, and then you'd have to square
them and sum them. But we just figured out a
very fast way of doing it. Now, let's see if we can extend
this to the third degree. And it actually
turns out you can-- not only to the third
degree you can extend this to the nth degree. And I might do an induction
proof it gets a little bit messier than when you just take
the first degree sum, right over here, where you
take the sum of the roots to the first power. But let's just see if it
works for the third power. So let's say, I have
the polynomial x to third plus a1x squared, plus
a2x, plus a3 is equal to 0. We have three roots. r1, r2, r3, which
tells us that we can rewrite this
polynomial as x minus-- or this equation as
x minus r1, times x minus r2, times x
minus r3 is equal to 0. Now we already figured out
what this part right here is, it's this thing over here. We already multiplied it out. It's this thing. It is this over here. So essentially, to get
this whole expression, we just have to multiply this
times this thing over here. We can just use the distributive
property-- multiple this thing times each of these terms. So first, let's multiply
this whole thing by x. So you get x to the third, minus
r1 plus r2 times x squared, plus r1r2x. So I just multiplied this
thing over here times x. Now I can just multiply
this thing up here times negative r3. So negative r3 times x squared. Negative r3 times this term over
here, it will give us-- well it's going to be a
negative times a negative, so it's going to be a
positive-- so it's positive r3 three times this. We can distribute them. We're going to get r1-- so
let me make sure I'm doing. Negative r3 times this over
here is going to be negative-- let me just write it like this. I don't want to skip steps. So it's going to be-- the
negative and the negatives cancel out. So negative r3
times r1 plus r2 x. And then finally, you have
the negative r3 times r1r2. So minus r1r2r3. And all of that's
going to be equal to 0. But let's simplify it. So this thing is
going to be equal to x to the third minus
r1 plus r2 plus r3-- we did that in the last video. That shows us that
the sum of our roots is this second coefficient
here, the coefficient on the second degree
term, x squared. And then, we go over here. We have r1r2, x. Then you have r1, r3 x. Plus r1r3-- I'm just
distributing this. And then you have r3 times r2. So plus r2r3. All of that times x, and
then minus r1r2 and r3. Now if we want to take the sum
of the squares of the roots. So if we want to take r1
squared plus r2 squared plus r3 squared, well, we could
try to do the same thing. We could take r1
plus r2 plus r3, which we know how to
calculate-- we can square that. And we're essentially
going to get-- When you square
this you're going to get-- let me see if
I can write it neatly. This is going to be
equal to r1 times-- So I'm just going to--
let me just rewrite it. This is equal to--
just to clarify, this is equal to r1 plus r2 plus
r3, times r1 plus r2 plus r3. So it's going to be-- I
could start over here. r1 times r1 is r1 squared,
plus r1 times r2-- so r1r2-- plus r1 times r3. And then, plus--
now we're in the r2. r2 times r1 is plus
r1r2-- same thing, I'm just switching the
order so it looks the same. r2 times r2 is r2 squared. And then, r2 times
r3 is plus r2r3. And then let's go to the
r3, r3 times r1 is just another r3r1-- I just
switched the order. r3 times r2 is another r2r3. And then, r3 times
r3 is r3 squared. So what did we
just get here when we squared just the
straight up sum? You got r1 squared plus r2
squared plus r3 squared, plus-- you essentially got all
of the different combinations, but you got them twice. You have two r1r2, so
you have 2 times r1r2. Then you have two r1r3, so plus
r1r3-- I have the 2 out front. Plus r2r3. And this over here is
equal to-- remember what we did-- this is equal
to r1 plus r2 plus r3 squared. So we got essentially
the same result. Remember, this thing right over
here-- let's make things clear. This thing over here
r1-- all the combinations of the products of the roots. If you look over here,
that's exactly what this thing is over
here, which must be what our a2 coefficient is. So this is our a2 coefficient. This r1 plus r2 plus
r3, that is-- we figured out multiple
times-- that's this thing right over here,
which is going to be a1. So this is going
to be a negative, or it's equal to negative a1. But you take
negative a1 squared, and that's the same
thing as a1 squared. So this is a1 squared. And this is the sum
that we care about. So we get r1 squared plus
r2 squared plus r3 squared is equal to this
business over here. It's equal to a1 squared
minus 2 times a2. So we got the exact
same result that we got for the second degree case. And it actually turns out this
will be true of any degree. I haven't proven to
you yet, although I can make an induction
argument now-- we've proven some base cases. But just to make it
clear how to apply it, I give you crazy polynomial. I give you-- Let's do
a third degree case, let's say, 10x to
the third minus 5 x squared, plus 7x-- I'm making
this up on the fly-- plus 2 is equal to 0. And if I were to
ask you the sum? If I were to ask you r1
squared plus r2 squared plus r3 squared-- If I were to ask
you the square of the sum of the roots, you just take--
well, let me be careful. You have to make
sure that you have a one in front of the
highest degree term. So this thing over here,
has to be rewritten. Divide both sides by 10 x to
the third minus 5 over 10, so minus 1/2 x
squared, plus 7 over 10 x, plus 2 over 10, which
is one fifth is equal to 0. So I just divided
both sides by 10, and yup, I did that part right. And now, we can apply this. I almost made a
careless mistake. You have to have a one
coefficient out here, at least, the way that we've derived this. So this sum is going to
be equal to a1 squared. So it's this-- 1/2 squared. So a1 is actually negative
1/2, but negative 1/2 half squared is just one fourth. So it is going to be one
fourth minus 2, times a2. So minus 2 times 7 over 10. So this is equal to one
fourth minus 14 over 10. We could find a common
denominator here. This is the same thing as
5 over 20 minus 14 over 10. And this is equal-- or sorry,
minus 28 over 20, I should do, which is equal to
negative 23 over 20. And you might say,
hey, Sal, hang on. I'm taking the square of a bunch
of roots and adding them up, and I'm getting a
negative number. I thought squares-- I thought
y squared numbers I always get a positive number that
would be true if you're dealing with real numbers, but remember
the words of a polynomial can be complex and
complex numbers squared can be negative numbers. So this obviously is involving
some type of complex roots. But we know that
the sum when you take the sum of the squares
of those complex roots you get negative 23 over 22.