 Welcome back to our lecture series Math 1220, Calculus II for students at Southern Utah University. As usual, I'm your professor today, Dr. Andrew Misseldine. Now, in this lecture 15, we're going to continue our discussion of partial fraction decompositions, and now we can use this to evaluate integrals of rational functions, such as in section 7.4 of Stuart's textbook here. Now, in this lecture, we're going to look at some more serious examples of partial fraction decompositions. What I mean by that is, we're going to take what seems like a very, very tame anti-derivative. Let's try to calculate the anti-derivative 3x minus 5 over x cubed minus 1 with respect to x. Now, this one doesn't seem so bad at first, like it is a proper fraction, the top which is linear is less than the cubic on the bottom. The problem starts to come up when you factor this thing. x cubed minus 1, the denominator, if you factor this, it is a difference of cubes. You get x minus 1, and then the other factor is x squared plus x plus 1. If you try to factor this quadratic, you're going to find out that it has no real roots. We often say this is an irreducible quadratic, which is somewhat of a misnomer. Just by saying it's irreducible, it means we cannot factor it more using real numbers. But if we're willing to use complex numbers, which are perfectly good numbers, we actually could factor this into three linear factors, for which then the anti-derivative would be actually quite, quite a cinch. And I'll say some more about this at the end. But for reasons that almost seem arbitrary to us, we're actually going to require we only use real numbers in this situation. Again, that might seem to the viewer here, it's like, why would you want to use complex numbers? And it's kind of like, well, if you're Superman, wouldn't you want to use super speed, super sight, super flight to save the people who are crashing in the airplane, as opposed to regular people who have no superpowers? Of course we would pick a superpower if we could, which the complex numbers offer us those superpowers, but we're going to arbitrarily tie some kryptonite to us and not allow us to proceed. Now, because we have this irreducible quadratic here, this x squared plus x plus one, this is going to affect our template. Three x minus five over x cubed minus one. We're going to get a factor, a partial fraction for each factor. So we're going to get A over x minus one. And then the second one is going to be x squared plus x plus one in the denominator. But as this is a proper fraction, the numerator potentially could be a linear polynomial, Bx plus C. And unlike other situations, there's not a cool little trick we're going to do to simplify this thing. We're kind of have to be stuck with what we have here. If we cleared the denominators times both sides by x cubed minus one, we get three x minus five on the left. We're going to get A times x squared plus x plus one, because that's the factor the first fraction didn't have. And then the next one we're going to get Bx plus C times x minus one, like so. And so are there cool values we can choose to try to annihilate some things right here? Well, notice that we could take x equals one. That's pretty simple. And if we do that, we're going to get three minus five on the left, which is a negative two. On the right, we get A times one plus one plus one. And then that one got annihilated. That's why we chose one. And so we see that the left-hand side equals three A. And so A is going to equal negative two-thirds as our value right there, okay? In terms of annihilating by cool values, that's almost it. That's the only root that we could use because x minus one, we did its root. The other two roots, that is the roots of x squared plus x plus one are non-real complex numbers. If we're willing to use complex numbers, we could annihilate here and we'd be done really quickly. But without specifying what they are, we're going to have to stick with real numbers here. Now we could switch and use the number x equals zero. That has a little bit of convenience because of the following. If you plug in zero on the right-hand side, you get a negative five on the left-hand side. On the right-hand side, we know that A is negative two-thirds. So we'll stick with that. Plug it in zero, give you zero, zero and one. The advantage here is that zero will annihilate B and leave C behind. So we get C times negative one. Simplifying this at all, we get negative five plus two-thirds is equal to negative C. Of course, five can become 15 over three, like so. So you get negative 13-thirds, so C will become a positive 13-thirds, like so. It's doable. And now that we know A and C, we can plug those in and find B if we just plug in a different number. I'm gonna plug in, say negative one, just because hopefully we'll have simple arithmetic. A negative one on the other side gives us a negative eight. So we get negative two-thirds. If you plug in negative one, you're gonna get one, minus one just cancels, which also gives you a one right there. This time for B, you're gonna get negative B plus C, which is a 13-thirds, and then you're gonna get a negative two. I get as an example. If you don't like all the fractions floating around here, we could multiply the right side and the left side by three. I guess it's negative 24 on the left. This will give us negative two plus negative three B plus 13 times that by negative two, like so everything's even now I notice. So divide everything by, we'll just do negative two. That gives us 12 is equal to one minus three B plus 13. One and 13 together, of course, give us a 14. So track that from both sides of the equation. We end up with negative two is equal to negative three B, and therefore B equals two-thirds, like so. So we can find this by annihilation. It gets really cumbersome here. It's not so simple as other situations. So plugging those in for A, B, and C, A, remember, was a negative two-thirds. We see that right here. So we're gonna write that as negative two over three X minus one. For the next one, B turned out to be, what was it? It was a positive two-thirds. C turned out to be 13-thirds. So there's a three in the bottom of both of them. So we're gonna plug those in. So we have a two B, so X is, that is B is two. So we get two X plus 13 over three times X squared plus X plus one. So we were able to do it. Again, the annihilation technique didn't work out super amazingly because of the awkwardness, trying to avoid, because we only had one root. And we were able to kind of get away with X equals zero to help us out here, but that was, this is sort of like an ad hoc argument. It worked out, but kind of complicated. On this situation, I think the systems of equations works out really nicely. Because remember, our equation looks like three X minus five is equal to A times X squared plus X plus one plus BX plus C times X minus one. If you foil out this thing right here, you end up with BX squared minus BX plus CX minus C. And so combining like terms, you're gonna have a term associated to X squared. The left side would be a zero. The right side, you get an A plus a B. You have a coefficient associated to X. The left hand side gives us a three. The right hand side gives us an A. That gives us a negative B and plus C. And then lastly, for the constant, you get a negative five on the right. So on the left, excuse me, on the right, you get A minus C. It's a system of equations. Again, it's not the tamest of all, but really it's not gonna be much worse than we were before. We could solve this by substitution or elimination or anything like that. Let's see, I will just, I'm gonna take the first equation right here. That is, we're gonna take the first equation and we're gonna subtract from it the third equation. If we do that, we end up with, in that situation, the A's are gonna cancel. You get B minus C is equal to five. We get that and then, I guess I take that back. I wanna solve this one by substitution. Let's take the first equation. Let's take the first equation, solve it for A. That's the same thing as saying A is equal to negative B. This is gonna be a little bit cleaner here and then you can substitute that in for the A's and the other equations like so. So in the second equation, you're gonna get a negative B minus a B sets a negative two B plus C equals three. And then the last one, you're gonna get a negative B minus C is equal to negative five. And so in this situation, we can then eliminate C very nicely if you add the two equations together. You get negative three B is equal to negative two, therefore B equals two thirds. That's similar to what we saw above, right? You should still see it right here. B was two thirds. And then once you have that, you can start plugging that into the other equations. So plug it in right here. We get negative two thirds minus C equals negative five. That is to say C equals negative two thirds plus five, which that will give us 13 thirds like we saw before. And then you can plug that into say the first equation. Remember, so the first equation A plus B equals zero. If B equals two thirds, that means A equals negative two thirds. So in this one, I think the system of equations is a little bit cleaner. And I think in the long run, the linear systems will probably help you out here, but you can try the annihilation technique as well. Now this is sort of like the first half of the problem, right? We found the partial fraction decomposition. We're trying to integrate, remember what the original problem was, three X minus five over X cubed minus one DX. And we've now seen by this algebraic calculation that this is the same thing, where did it go? This will be the same thing as negative two thirds over three X minus one DX. And then the second one, you end up with two X plus 13 over three X squared plus X plus one DX. And so this first fraction isn't so bad, the negative two over three. I mean, we can factor out the coefficients. After out the coefficients, you get negative two thirds, the integral of DX over X minus one. The other one pull out of one third. So you get this two X plus 13 over X squared plus X plus one DX. The first one, we've seen this one a couple of times now, it's anti-derivative, it'll be negative two thirds, the natural log of X minus one. But what about the second one, right? This one's much more complicated, much, much more complicated, right? So what do we do to address this concern right here? How do you deal with that X squared plus X plus one on the bottom? There's a couple schools of thought that one could use here. And I'm gonna make one that's commonly taught in Calculus textbooks here. The idea is if we were to proceed with the U substitution, you would have to be X squared plus X plus one right here, in which case DU equals two X plus one DX, all right? In which case it's like, hmm, I have a two X, but I don't have a one, I have a 13, but 13 could be dissected into one and 12. In which case, if you did that, you could break this up to be one third, the integral of two X plus one over X squared plus X plus one DX. And then you have this one third 12 over X squared plus X plus one DX. And now, if you're gonna do this, if you're gonna break up the one and the 12, you have to make sure that the one third distributes onto both of them. Now for this one, three goes into 12 four times, so I'm just gonna factor that out. So we get a four that's sitting in front and one. And so now with the second integral we see right here, we know what to do with it. It's set up perfectly for a U substitution. So it looks like DU over U. And so it's anti-derivative much like the first one is gonna involve a natural log. We're gonna get one third, the natural log of X squared plus X plus one. Now on the second one, we actually don't need the absolute value because X squared plus X plus one for all real numbers is gonna be a positive number. So the absolute value is redundant in that situation. But then it comes to the issue is what the junk are we gonna do with this DX over X squared plus X plus one? We can kind of kick the can down the road so far. At some point we have to kind of deal with it. Now, this actually reminds me of something we've seen when we did trigonometric substitutions. We have a quadratic polynomial in the denominator X squared plus X plus one. How do we deal with that? Well, if it was like a sub square, that would be easy to deal with. We could do a tangent substitution. And it turns out that completing the square is what we have to do here. This X squared plus X plus one is equal to, if we try to complete the square, we take the X's and separate it from the constant plus one there. We identify our guest of honor. We take half of the middle coefficient, which is itself one half, and then square it. So we have to add one fourth, for which case we then subtract one fourth. Then the X squared plus X plus one fourth, it would factor as X plus a half quantity squared. And then you add to that three fourths like so. This is now the square completed. And this is supposed to help us get started for some type of U substitution, not U substitution trigonometric substitution, because we have a sum of squares, we would take X plus one half. This is gonna be a tangent substitution because we have a sum of squares. And this will X plus one half would be equal to square root of three over two times tangent theta. That's a lovely substitution, doable, yes, but a little complicated, right? And look some variations of this. If we solve for X, X would equal root three over two tangent theta minus one half. If we calculate DX, right, DX would equal root three over two secant square theta, d theta. And we should also make mention of the square root of X squared plus X plus one. This will equal root three over two secant theta. And you can derive that from the usual trigonometric equations or the usual, the triangle diagrams and things like that. But that's what we're gonna need that for our substitution at some point. And so if you take all of this, right, just looking at this portion of it for a moment, let's do this substitution going forward. This will then look like we have a DX on top, which becomes root three over two secant square theta, d theta. On the bottom, we had just X squared plus X plus one. So that's squaring this guy right here. That gives us a three over four secant theta, d theta. Not d theta, sorry, just secant squared this time. And so that should cancel some things kind of nicely. The secant squared's cancel. We have some cancellation, two goes into four, you get a two right there. Square root of three goes into square root of three, like so. And so when we simplify this, we end up with just the integral of two over the square root of three d theta, which anti-derivative will be two over root three theta plus a constant. Now we have to solve for theta, which using the equations we had above, solving for theta. Well, let's work that one out there. You're gonna get X plus, we're gonna get X plus two X plus one over two. You're gonna times that by two over the square root of three, the two will cancel. That equals tangent, so take arc tangent. We end up with two over root three times two X plus one over the square root of three. I'm sorry, this should all be inside arc tangent. So we have two over root three arc tangent, two X plus one over the square root of three plus a constant. So that's part of the anti-derivative. We didn't have to throw in the other things we had. And so in the end, we get something that looks like the following. We're gonna get, so the final answer, one third times the natural log of the absolute value of X squared plus X plus one. Whoops, I went out of order there. Oh well, minus two thirds the natural log of the absolute value of X minus one. Now remember this anti-derivative we found right here, we have to times it by four. There was a coefficient sitting in front of the integral. So we're gonna get two times four, which is eight over the square root of three times the arc tangent of two X plus one over the square root of three plus a constant, like so. And so that one was quite insidious, like I said. Not having that irreducible quadratic requires us to have to do some type of trigonometric substitute. It complicates what was already a very, very difficult exercise right here. Now I wanna say in comparison, original problem, right? The original problem we had was the integral of three X minus five over X cubed minus one DX. Recognizing that the denominator factors in the following way, right? You're gonna get a over X minus one, we know that. Then there's the X squared plus X plus one with two different quadratic roots. Let's call the first one, omega. And the second one, the root actually would be the complex conjugate omega bar. What if we allow those complex numbers as the following, right? You get a partial fraction decomposition looks like the following. A over X minus one, B over X minus omega and C over X minus omega bar. To find the antiderivative here, you're gonna get A times the natural log of the absolute value of X minus one. You're gonna get B times the natural log of the absolute value of X minus omega plus C times the natural log of X minus omega bar plus an arbitrary constant, you see twice there, whoops. Anyways, you get something like the following. This might not look like the proper answer, but it turns out using logarithmic properties when you combine this together, you're gonna get the natural log of X squared plus X plus one plus an arc tangent type of stuff. But the issue is why did we do this? Well, if we chose not to use these complex numbers because we didn't wanna deal with the arithmetic that would ensue, which in terms of the arithmetic is really not that painful. If we do a little bit of arithmetic with complex numbers, we go to avoid it a ton of arithmetic we saw above here. The other issue is that we have to accept that the natural log could have a complex coefficient, the complex entries I should say. It has one extend the natural log from the real numbers to the complex numbers. And there is an issue that has to be discussed there, but if one's willing to do that, it turns out that complex numbers can make this very hard problem become a very trivial problem. But it takes a little bit of development of doing complex variables. And in fact, we have a course at Southern Utah University and many universities have a very similar course of this about complex variables. How does one do calculus problems with complex values? And it turns out that it might not seem obvious because complex numbers aren't real, right? That's why we call them real numbers. Those are all misnumbers. But if we're willing to use some complex numbers we can dramatically simplify these calculations. Unfortunately for calculus two students we don't get to go down the easier path because we have to be trapped in this much more difficult path of having our real number blinders on. And so I wanted to present this to you because some of you in the future will learn some more about complex numbers or some of you might actually be interested in learning more about complex numbers because they do help us solve real life problems. It might seem counterintuitive, but imaginary numbers can help us solve real problems in a much easier way than real numbers alone can do.