 In this example, let's evaluate the antiderivative of the rational function x plus two over x cubed minus two x squared plus x. Now, we're gonna do this using the technique of partial fraction decomposition. We should mention that the integrand is a proper rational function, so polynomial division is not necessary here. But we'll notice that the denominator is not factored. That's a very rude thing to do to someone. But anyways, we'll just proceed to factored, right? Whenever you try to factor anything, look for common divisors. Like, notice x squared, x cubed, x squared, x. I'll have a common factor of x. So factor that out. You're left with x squared minus two x plus one. Now, for me, I can recognize that x squared minus two x plus one is a perfect square trinomial. That is, it factors as x minus one quantity squared. And I can see that because the first term, x squared is a perfect square. The last term plus one is a perfect square. And if you take their square roots, x and one and multiply them together, which is just x, the middle term is double that, so two x. That is, I'm just trying to utilize this factorization. If you have a plus b squared, this equals a squared plus two a b plus b squared. So you can use that to help you out here, or just the usual factors, the usual way of factorization. I need factors of one that have to be negative two as you take negative one and negative one. So this, you'll notice in this example that the common denominator, it has a repeated root. So there's this x minus one that shows up twice. How does this affect the template of the partial fraction decomposition? It turns out it has a big impact on it. x cubed minus two x squared plus x right here. Now, because we have an x in the denominator, we're gonna need a factor that looks like a over x. All right? And as for the next one, because we have x minus one, we might be tempted to do the following. We take b over x minus one, and we take c over x minus one. This doesn't quite work though, because if you look for the least common denominator here, your least common denominator is just gonna be x times x minus one. You don't get x minus one twice in this situation. I like to sort of compare this to like, if you have roommate who are looking for a pizza, they wanna order a pizza together, but the college students don't always have tons of money. So therefore, instead of buying multiple pizzas, they can only buy one pizza, the three roommates. What toppings should they get? Well, one person wants pepperoni on their pizza. The other person wants bacon on their pizza. And this one person's like, yeah, I want bacon too. Well, if someone wants pepperoni and two people want bacon, it doesn't mean we get a pepperoni double bacon pizza. It just means we get a pepperoni bacon pizza. Put them together right there. So in order to get an x minus one squared in the denominator, one of these factors has to be squared. We don't actually need the second one exactly. But this also kind of violates one of the assumptions we used before, right? Because in order to make this thing work, we know that the fractions have to be proper fractions. And if your denominator is x minus one, like you see right here, then the numerator actually could be non-constant. If your denominator is quadratic and you're proper, that means the numerator could actually be a linear polynomial, bx plus c. And that's like, yikes. How do you fix something like that? Well, it turns out if you take this perspective, that's not the best thing to do because after all, our goal of decomposing is to integrate it. How do we choose a template that's gonna be favorable for integration? So it turns out with one small tweak, we can actually make this a lot more easy. So instead of saying x, instead of taking bx plus c, we're gonna take bx minus one plus c, like so. And so you might ask, why is that an improvement? Well, because we don't know what b and c are, they're unspecified constants. It's a constant, but we don't know what they are yet. Like we've done with anti-derivative so many times, these unspecified constants are gelatinous cubes that typically they'll just devour everything that's near them. But in this case, our gelatinous cube is now gonna be vomiting up all of the stuff that's been eaten over the last several minutes, much like in spirit away when no face eats his medicine, right? If you've seen the movie before, you know exactly what I'm describing right now. We actually want our cube to start puking up some information. So we actually can replace this instead with a bx minus one plus c. This bx minus one plus c is equally generic to the bx plus c because we don't actually know what b and c are yet. This has the convenience that when we break up the fraction, the second one, we get this bx minus one over x minus one squared plus c over x minus one squared. There's not a whole lot of simplification as you go to the second fraction, sorry, the third fraction, but the second one you can, there's an x minus one that cancels and upon canceling, you see that your template's gonna look like a over x plus b over x minus one, just one of them, and then there's a c over x minus one squared. And so this template right here will be extremely general. That is, we can find out what a, b, and c are in this situation, so there's no unnecessary assumptions, but we've also constructed a template for which it'll be favorable for integration that we'll see in just a moment. Now, this happens because we have a repeated x minus one. If we had like actually like x minus one to the 10th power, what this means is we're gonna have a d over x minus one cubed. We'll have a e over x minus one to the fourth, and we continue on this pattern until we get up to the 10th power. You're gonna get one for each power going from one up to the power that you have here. So I'm gonna go back here. We only have to do a square. Now at this moment, we're going to simplify this creature, multiply both sides by x cubed minus two x squared plus x. That is to say multiply both sides by x times x minus one squared. We do that over here as well, x times x minus one squared. Now remember, x times x minus one squared is just the factorization of the original denominator. They'll cancel out entirely, leaving us with an x plus two. Now when you distribute onto the three partial fractions here, do pay attention here. For the first one a over x, the x will cancel and will be left with a times x minus one squared. For the second one, an x minus one will cancel. So we're gonna get b times x times x minus one. There was two x minus one, so only one of them canceled, so we're still left with one. And then finally the x minus one squares will cancel and we're left with c times x, all right? And so now we have the following situation. And we have two strategies that we could use to try to solve this thing. First we could try multiplying everything out and setting up a system of equations. If you do that on the right hand side, you'll end up with a times x squared minus two x plus one. You'll end up with a b times x squared minus x and you'll have a cx. And so this is supposed to equal x plus two. And so if you combine like terms, if we consider the quadratic term, the quadratic term on the left hand side is zero. On the right hand side you get an a and a b. If you consider the x term on the left hand side, it has a coefficient of one. On the right hand side you get a negative two a minus b plus c. And then if you look at the constant term, on the left hand side you get a two. On the right hand side you get just an a from there. And so you could solve the system of equations. Notice right here, right here you get a equals two. That's really nice. If you substitute that in right here, you're gonna see that b is negative two. And then you have to plug those into here. b is negative two, a is two. So you're gonna get negative four plus two, which is negative two. You end up with c being also negative two. Did I do that one right? I'm sorry, that should be a three. Like so. And so from there solving the system of equations, we can see that our partial fraction decomposition x plus two over our denominator x times x minus one squared. This turned out to be two over x, that was our a, then we got minus two, sorry, minus two over x minus one, and then plus three over x minus one squared. I kinda skirted over the details of c there, but if you plug in the numbers and solve for it, you get the following, you get a three there. And so that the system of equations, I actually think it works out really nicely here. You might be intimidated. It's like, oh no, there's three equations, three unknowns, but I mean, this one turned out really nice, a equals two. It works out super, super nice here. But let's say you don't wanna use systems equations. What if you wanna use this technique of annihilation? That is an alternative, right? In which case, how do you choose annihilators? Well, one annihilator to choose will be x equals zero because that will annihilate the c and it'll annihilate the b as well. If you use x equals zero, you're gonna get zero plus two, which is two on the left-hand side. This will equal a times zero minus one squared, which is a times negative one squared, which is just equal to a, and you see this agrees with what we did in the system approach. So a equals two, that's pretty nice. Another good choice for annihilation will be x equals one, because if you choose x equals one and it'll annihilate the a, it'll annihilate the b, in which case the left-hand side, you get one plus two equals three. The right-hand side, you then end up with, everything got annihilated except for c times one, which is just a c. And so we see that c equals three, like we saw over here as well. Now the problem here, though, is that in terms of annihilation, that's all that we have here. If we choose zero, we're done. If we choose one, we're done. There's no other annihilating values, right? We didn't ever figure out what b is here. So how does one proceed with this technique of annihilation if you use up all the roots? Well, one idea is we actually know what a and c are now, so you could plug in that a equals two, and you could plug in that c equals three. So if you take that approach, you're gonna get that x plus two equals two times x minus one squared plus b times x times x minus one. And then we get a, what did we have above? We had c times x, so you get a three x, like so. Then you could proceed to combine like terms because there's a bunch of constants, or x terms you could do. You could combine like terms, do some division and things like that. It can get a little bit messy. You could take the derivative right now also to kind of get rid of some stuff. You could solve for b. But in this situation, as there's only one unknown left, we just have to pick something else, like pick x equals two, or x equals negative one, something simple, and just go from there. If you plug into the right, the left hand side is a four, we're gonna get two times two minus one, which is one. We're gonna get b times two times two minus one plus three times two. So we end up with four is equal to two plus two b plus six. Two and six together is eight, subtract eight from both sides. We get negative four equals two b, divide by two, you end up with b equals negative two, like we saw earlier. So this is sort of the trade-off, right? The annihilation can get some stuff pretty quickly, but we have repeated factors. Some of the other stuff is gonna be hard to find, and it kind of boils down to solving the system of equations. So because of this, I do kind of emphasize that we do wanna be used to solving the systems of equations because with the system of equations, we can solve these partial fractions typically turn into a system of equations eventually, if not just starting from the beginning, and the system is usually not that hard to find. So like we mentioned earlier, if we're integrating x plus two over x cubed minus two x squared plus x dx, by our partial fraction decomposition, we found out the following. We found out that the A over x became a two over x dx. We can do that one. Then we had a negative integral of two over x minus one dx, followed up finally with an integral of three over x minus one squared dx. And like I said, the reason we chose the template the way we did is because this should lead to a simple anti-derivative. The first two are ones we've seen before. This, that is the way we've seen the type before, two over x, its anti-derivative will be two times the natural log of x, absolute value of x. The second one's negative two times the natural log of x minus one. A basic U substitution works there. But it turns out a U substitution also works on the last one. If we take U to be x minus one, and then du will just equal dx, this thing would look like the integral of three over U squared du, or you probably prefer it as three times the integral of U to the negative two du. We can use the power rule. And by the power rule, we would raise the power to be negative one. We have to divide by that power. So we're gonna get negative three. I'm gonna write as a fraction here. So we're gonna get negative three over x minus one plus a constant. So with a nice U substitution, we can get some anti-derivatives who are natural logs. We get one that is just a power rule, which isn't so bad at all. And so if you have a repeated factor, you have to be a little more careful on your template. For every power in the denominator, you'd have a fraction there. So in this case, we had a square. So we had a first power and a second power. If you had to take something to the fourth power, you'd have a partial fraction for the first, second, third and fourth powers. You get all of those. So then once you find the template, once you're probably gonna have to solve using systems of linear equations, or you could try to use this technique of annihilation. Whereas you're trying to solve this and find this partial fraction decomposition, that is, I should say, when you have the partial fraction decomposition, the anti-derivatives are gonna be pretty simple. Those fractions which have a linear denominator, their anti-derivatives will be natural logs. Those with a repeated root U substitution just will give us the power rule, in which case we get another rational function like that. And so once you have the partial fraction decomposition, the anti-derivatives pretty slick to find. The hard part as you see in these videos is actually finding the partial fraction decomposition, which uses these techniques from algebra, either solving systems of linear equations or this annihilation technique of some kind. That brings us to the end of lecture 14, but that will not be the end of our discussion of partial fraction decompositions. I wanna do some more examples in the next lecture about some different templates because as the template changes, it can dramatically change the algebraic calculation, and there are a few more subtleties we're gonna wanna see in the next lecture. Stay tuned for that one, and I'll see you then.