 Unfortunately, our elementary factoring technique sometimes fails. That is factoring out a GCD, or factoring my groups, or using some memorized factorization form that can only get us so far. So in this lecture, I want to explore more advanced factoring techniques of polynomials. And this is going to come from the so-called division algorithm. We talked about this previously, that is factoring polynomials. The division algorithm of polynomials is essentially the same as the division algorithm for integers. Where we're thinking of division with remainder. If f and g denote polynomial functions, and if g is a non-zero polynomial, that is, we could divide by it, then there exists unique polynomial functions, q and r, such that f of x divided by g of x is equal to q plus r of x over g of x. So this is like a mixed number right here, or what we called a mixed polynomial previously, that's analogous to doing something like seven halves is equal to three and a half. Something like that. We can take a polynomial that's big on top divided by a polynomial small on the bottom, so it's in proper fraction. We can rewrite it as a whole number part and a fractional part. We do the same thing for our fractions here. We have a whole number part. This is the quotient. And then we have a fractional part with our remainder sitting on top. You can also clear the denominators of that expression. You can write this as f of x equals q times g plus r. And so the fact or the division algorithm provides unique quotients and remainders where we came assume that the remainder r of x is either the zero polynomial itself, it's just the number zero, or its degree is strictly less than g. So essentially r needs to be less than g so that this is a proper fraction. We've talked about how this division algorithm works in the previously. Now what does this have to do with factoring? Factoring and division are very much related processes, right? Factoring, you keep the divisor as opposed to division, you throw it away. The rest of the process is the same thing. And so the remainder theorem actually is going to start to connect us to y division and is going to be an important part for factoring here. Let f be a polynomial function. If f of x is divided by x minus c, then the remainder is going to be f of c. So dividing f of x by x minus c gives us the remainder is going to be f of c. So let's think about that for a second. If I take f of x and I divide this by x minus c, what I'm saying is you're going to get some, you're going to get some, well let's say it this way, using the whole number expression right here. f of x is going to equal some quotient q of x times the divisor g of x, which in this case is going to be x minus c. And there's going to be some number r of x right here. Well if you evaluated this thing at c f of x, you're going to get f of c, where you're going to get q of c, which could be anything. You're going to get c minus c, and then you're going to get r of c, which some things I should mention is that c minus c of course is going to be a zero. And I should also mention that r of c is going to be a constant. And why is that? Well if our divisor is x minus c, and we required that the polynomial r of x has to have a degree less than g, well if g has degree one, that means r of c is going to have degree zero, which means it's a constant, it's just a number. Let's call that number r for the sake of it. And so simplifying this thing, we see we get f of c is equal to zero plus some number r. And f of c equals r. Oh that's what the remainder theorem is trying to tell us here. Media consequence of the division algorithm, that if you evaluate the function at the number c, that's the same thing as dividing it by x minus c. If you want the remainder, it doesn't tell you the quotient, but it tells you the remainder. Why is this relevant? Well because if you divide by x minus c and the remainder were zero, that means that x minus c is a divisor of f. And I actually found one of the roots of the polynomial. That's going to be a critical step here, but let's focus on the remainder theorem for this moment. So let's find the remainder of f of x, which equals x cubed minus 4x squared minus 5. If it's divided by first, let's do x minus 3. Well if we want to find the remainder, by the remainder theorem, the remainder here would just look like f of 3. We could just evaluate the function and so our remainder r is going to equal f of 3, which we see as a 3 cubed minus 4, 3 squared minus 5. That gives us 27. We're going to subtract from that. We're going to get 3 squared is 9 times that by 4. We get 36 minus 5. 27 take away 36 is a negative 9. Take away another negative 5. You're going to get negative 14. So that's the remainder if we were to do division by x minus 3. And if we have any doubt about it, let's try this maybe with comparing it to the synthetic division. So synthetic division, remember, we're going to write 1, negative 4, 0, and negative 5. So we have to record a x position. There's a coefficient of 0 there, and we're dividing by 3. So if we do our synthetic division, we're going to bring down the 1. 1 times 3 is 3 minus 4. Negative 1 times 3 is negative 3. Plus 0 is 0 times 3 is negative 9. Negative 5 minus negative 9 is negative 14 again. The remainder is negative 14. We've got the exact same thing, right? That's what the remainder theorem tells us. These numbers are going to be the same. What if we do x plus 2? Well, the claim by the remainder theorem is that r, the remainder if you divide by x plus 2 will be f of negative 2. Make sure you switch the sign. And so we end up with a negative 2 cubed minus 4 times negative 2 squared minus 5. Negative 2 cubed is a negative 8. Negative 2 squared is a positive 4 times negative 4 gives us a negative 16 minus 5. And so combining those together, negative 8 and negative 16 gives us a negative 24 minus 5 gives us a negative 29. And if we were to verify that with synthetic division again, right? Same coefficients from the polynomial. 1 negative 4 is 0, negative 5, 3, bring down the 1. We get 1 times 3 is 3 minus 4. Sorry, why am I doing 3 again? That should be a negative 2 this time. We did 3 last time. So bring down the 1. That step's still the same. 1 times negative 2 is negative 2. Minus 4 is negative 6. Times negative 2 is positive 12 plus 0 is 12. Times negative 2 is negative 24. Negative 24 minus 5 gives you the negative 29. You can see that the arithmetic is very similar on the two processes because it's going to give you the same thing. That's what the remainder theorem guarantees us. So we can see that we can find the remainder by evaluating the polynomial. But it also goes the other way around. We can actually evaluate the polynomial using synthetic division because the remainder will be the function evaluation. We could evaluate the polynomial using synthetic division, which in some respect is a simpler algorithm. Notice with synthetic division, you don't have to do any exponents. We don't have to worry about things like negative 2 cubed, which can actually be a huge time saver. Synthetic division only requires addition and multiplication. And that, of course, includes subtraction, right? Addition, subtraction, multiplication. You never have to worry about exponents when you do synthetic division. That's kind of a nice thing. Let's look at another example here. What is the remainder when f of x equals x to the 100th minus 7x plus 3 is divided by x minus 1? If you try this with synthetic division, you'd have to take 1, 0, 0, 0. There's a lot of 0s there. Boom, boom, boom, boom, boom, 0, 0, negative 7, et cetera. That would be a very long and tedious calculation. Turns out by the remainder theorem, if we just want the remainder, the remainder is going to equal f of 1, which is going to give you 1 to the 100th minus 7 times 1 plus 3. 1 to the 100th, that's just going to be 1. So we get 1 minus 7 plus 3. You're going to get 1 minus 7, which is negative 6 plus 3 gives us a negative 3. And so I admit that this example here is somewhat intentional that clearly the 100th power is very difficult to work with. But the fact we're going to have 1 is much, much easier here. But I wanted to emphasize here that the remainder theorem tells us that function evaluation is the same as finding the remainder. And finding the remainder is the same as function evaluation. And so in many ways and many times, you'll often see me use synthetic division to evaluate a polynomial because the remainder theorem says that I can do that.