When you are integrating a function in the form of a fraction, it helps to find a way to break apart the expression.
- [Voiceover] Try to evaluate the following integral. So assuming you've had a go at it, so let's work through this together. And if at any point you get inspired, always feel free to pause the video and continue on with it on your own. So the first thing that might have jumped out at you we have a rational expression. The degree in the numerator is the same as the degree in the nominator, so maybe a little bit of algebraic long division is called for. So let's do that. Let's take X-squared minus one and divide it into X-squared, put that in a different color, divide it into X-squared plus X minus five. So X-squared plus X minus five. And so let's look at the highest degree terms how many times does X-squared go into X-squared? It goes one time, let me write this in a new color. Goes one time. One times X-squared minus one is just going to be X-squared minus one. Now you subtract this green expression from this mauve expression or I could just add the negative on it, so let me just take the negative of it. So it's going to be negative X-squared plus one and we're going to get the X-squared's X-square minus X-square is zero, so those cancel out and we're going to be left with X and the negative five plus one is negative four. So we have X minus four left over. So we can rewrite the expression that we're trying to find the antiderivative of. We can rewrite it as one plus X minus four over X-squared minus one. Maybe I'll do that in that purple color since I already used it as the purple. Over X-squared minus one. So we did one thing, now we have a lower degree in the numerator than we have in the denominator. And obviously this is fairly straight forward, take the antiderivative of, but what do we do now? It's not clear if we look at X-squared minus one it's derivative would be two-X, which is the same degree as this, but it's not X minus four, so it doesn't look like you u-substitution it's going to help us with this. So what can we do now? Now we can take out another tool in our algebraic tool kit, we will do partial fraction expansion. Which is essentially writing this as the sum of two rational expressions that have a lower degree in the denominator. So what do I mean by that? So this term right over here, X minus four over X-squared minus one, we can rewrite that as X minus four over, instead of X-squared minus one, we can factor this. This is X plus one times X minus one. So let's write that, this is X plus one times X minus one. When we think about partial fraction expansion we say okay, can we write this as the sum of something, let's call that A, over X plus one, plus something else, let's call that B, plus B over X minus one. Can we do that? And to attempt to do that, if we had just add these two things, what would we get? Well we would find a common denominator, which would be X plus one times X minus one, and so you would have, if any of this looks unfamiliar I encourage you to review the videos on partial fraction expansion, because that's exactly what we're doing right over here. But this would be equal to if you were to add the two your common denominator would be the product. So it would be X plus one times X minus one. So the first term I would multiply the numerator and the denominator times X minus one. So it would be A times X minus one plus B, the second term I'll multiply the numerator and the denominator times X plus one. And so what do we get? This is going to be equal to AX, maybe I'll do this all in one color. This is going to be equal to AX minus A plus BX plus B and then all of that over this stuff we keep writing over and over again. Actually, let me just copy and paste this. So copy and paste, I can use that over and over again. So we have that over that. So let's see, now we can group the X terms. So we can rewrite this as, so if we take AX plus BX that's going to be A plus B times X. Then we have a negative A and a B. So plus B minus A, and I'll just put parenthesis around that just so I kind of group these constant terms. Then all of that's going to be divided by, good thing I copied and pasted that, X plus one times X minus one. So now this is the crux of partial fraction expansion. We say, okay we kind of went through this whole exercise on the thesis that we could do this, that there is some A and B for which this is true. So if there is some A and B for which this is true, then A plus B must be the coefficient of the X term right over here. So A plus B must be equal to one, must be equal to this coefficient. And B minus A must be equal to the constant, must be equal to negative four. Or if they are then we will found an A and a B, so let's do that. I'll do it up here since I have a little bit of real estate. A plus B is going to be equal to one, and B minus A or I could write that as negative A plus B is equal to negative four. We could add the left hand sides and add the right hand sides and then the A's would disappear. We would get two B is equal to negative three or B is equal to negative three halves. We know that A is equal to one minus B, which would be equal to one plus three halves, since B is negative three halves, which is equal to five halves. A is equal to five halves. B is equal to negative three halves. And just like that we can rewrite this whole integral in a way that is a little bit easier to take the anti or this whole expression so it's easier to integrate. So it's going to be the integral of one plus A over X plus one. A is five halves and so I could just write that as, let me write it this way, five halves times one over X plus one. I wrote it that way because it's very straight forward to take the antiderivative of this. Then plus B over X minus one. Which is going to be negative three halves. So I'll just write it as minus three halves times one over X minus one. That was this right over here, DX. Notice all I did is I took this expression right over here and I did a little bit of partial fraction expansion into these two, I guess you could say, expressions or terms right over there. It's fairly straight forward to integrate this. Antiderivative of one, it's just going to be X. Antiderivative of five halves, one over X plus one, is going to be plus five halves, the natural log of the absolute value of X plus one. We're able to do that because the derivative of X plus one is just one, so the derivative is there so that we can take the antiderivative with respect to X plus one. You could also do u-substitution like we've done in previous examples, U is equal to X plus one. And over here, this is going to be minus three halves times the natural log of the absolute value of X minus one, by the same exact logic with how we were able to take the antiderivative there. And of course we cannot forget our constant. And there we have it. We've been able to integrate, we were able to evaluate this expression.