Notes for Thurs 8 Sept Calculus II Fall 2005 New York University Instructor: Tyler Neylon Scribe: Kelsey Williams 8.2 Integration by Parts This section is primarily about the formula R R u dv = uv − v du (∗) which is essentially the integral version of the product rule. Theorem 1 (Fundamental Theorem of Calculus (part of it, anyway)) b Z f 0 (x)dx = f (b) − f (a) a Ry As a quick example, if f (0) = 0 then 0 f 0 (x)dx = f (y). So now let’s prove that integration by parts really works. Start with the product rule: (f · g)0 = f 0 g + f g 0 Rb and apply a ·dx to both sides. We get Z b Z b (f g)0 dx = (f 0 g + f g 0 )dx (∗∗) a a b The left-hand side is just f g a , which is a special notation for f (b)g(b) − f (a)g(a). The right-hand side we can split into the sum of two integrals, as Rb 0 Rb f g dx + a f g 0 dx. So really equation (∗∗) is the same as a b Z b Z b fg = f 0 g dx + f g 0 dx a a a which, moving the terms around, is equivalent to b Z b Z b f g 0 dx = f g − f 0 g dx, a a a which is just another form of the standard integration by parts formula (∗) — to see this, just set u = f (x) and v = g(x), so that du = f 0 (x)dx and dv = g 0 (x)dx. Example 1 R Find xex dx. Let u=x dv = ex dx du = dx v = ex so that R xex dx = xex − R ex dx = xex − ex + C. 1 Example 2 R Find x2 e−x dx. Let u = x2 dv = e−x dx du = 2x dx v = −e−x so that our integral becomes −x2 e−x + Z 2xe−x dx. Well, we can’t just integrate the last bit directly, but it does look simpler than it was before, so let’s try ye olde integration by parts one more time: u = 2x du = 2 dx dv = e−x dx v = −e−x and our expression for the original integral is now Z 2 −x −x = −x e − 2xe + 2e−x dx = −x2 e−x − 2xe−x − 2e−x + C. Example 3 R Find x5 cos(x3 ) dx. In this example, the trick is to pick a dv which is easy to integrate. If we just pick dv = cos(x3 ), then how do we find v? It’s not easy. But the following choice, made specifically so that v is findable, works well: u = x3 dv = x2 cos(x3 ) dx 2 du = 3x dx v = 31 sin(x3 ). The integral is now 1 3 x sin(x3 ) − 3 Z x2 sin(x3 ) dx. Notice that the integrand looks much simpler. At this point we can finish off by using a substitution: u = x3 du = 3x2 dx. Then we have 1 1 3 x sin(x3 ) − 3 3 Z sin(u) du = 1 3 x sin(x3 ) + cos(x3 ) + C. 3 Example 4 R Find ln(x) dx. In this case, it might be tricky to see how to “split up” the integrand since there isn’t even a multiplication in there to split up! However, there’s nothing about integration by parts which says that u or dv must be 2 “obvious” parts of a product in the integrand. This is one example where we have to do something that at first might seem a little nonobvious, which is setting dv = 1 · dx. This is perfectly legal, since really ln(x) = ln(x) · 1. In general, we could have even chosen something crazy like dv = ex dx and then said u = e−x ln(x). Integration by parts still works! But that last crazy choice of u and dv wouldn’t help us solve the original integral – it would just make things more complex. So we’ll proceed with u = ln(x) dv = dx du = dx/x v = x. From this we see that Z Z 1 ln(x) dx = x ln(x) − x · dx = x ln(x) − x + C. x 8.6 Rationalizing Substitutions (aka “Dirty Tricks”) This section is all about turning some complicated-looking integrands into what is called a rational function, for which there is a fixed set of rules to integrate. A rational function is a function f (x) of the form polynomial . polynomial √ So x5 /(1 − x) is a rational function, but x is not. Any polynomial still counts as a rational function, since we could just think of the denominator as being = 1 (and the number 1 by itself still counts as a polynomial). Once we’ve used substitution to turn an integrand into a rational function, here is the strategy to use: 1. If you see immediately how to solve it, do so; otherwise go on: f (x) = 2. Perform long division on the fraction of polynomials 3. Find a partial fraction decomposition of the remaining fraction (if there is one) If you follow these steps correctly, you should be able to integrate any rational function whatsoever. But if you follow them incorrectly... well, that’s not as good. For more about how to integrate rational functions, check out §8.5 in the book. We’ll see how to do this “turning-into-a-rational-function” by some illustrative examples. 3 Example 5 R Find 1+dx√x . In cases like this, it is often a good idea to make a substitution of the form um = x, where m is some common multiple of the level of roots in the integrand. So in this case we’ll use √ u2 = x u= x 2u du = dx, which turns the problem into Z Z 2u du 1 =2 du. 1− 1+u 1+u We can arrive at that last equality by using long division. From here we can finish: Z Z √ √ du = 2 1 du − 2 = 2u − 2 ln |1 + u| + C = 2 x − 2 ln |1 + x| + C. 1+u Example 6 R dx√ Find √ 3 x+ x . In this case, we have a third root and a square (“second”) root, so the least common multiple between these is six: u6 = x 6u5 du = dx gives us the new integral Z 6u5 du =6 u2 + u3 Z u3 du. 1+u Now do some long division, Z =6 =6 Finally plug back in u2 − u + 1 − 1 1+u du 1 3 1 2 u − u + u − ln |1 + u| + C. 3 2 √ 6 x for u: √ √ √ √ = 2 x − 3 3 x + 6 6 x − 6 ln |1 + 6 x| + C. Now it’s time to explore the wonderful world of trigonometric functions and the substitutions who help them. Basically, there’s only one substitution we’ll study here. The really cool part is that this single substitution can turn any function built out of sin, cos, tan, and the 4 basic operators (+, −, ×, /) into a rational function which we can then integrate. Let’s do a running example to see how everything works out. We’ll try to integrate Z dx 3 sin x − 4 cos x 4 The substitution itself is u = tan(x/2). Solve for x to see that x = 2 tan−1 (u) so that dx = 2du/(1 + u2 ). Ok, so far so good. But now we have something a little complex-looking (and not very rational-function-looking): 2du 1+u2 Z 3 sin(2 tan−1 (u)) − 4 cos(2 tan−1 (u)) Ick! It does not appear that this substitutuion was any good at all. But wait! Actually, we can really simplify the sin and cos bits. Let’s notice a few trig equalities: cos(x/2) = 1 1 1 =p 2 =√ sec(x/2) 1 + u2 tan (x/2) + 1 and sin(x/2) = cos(x/2) tan(x/2) = √ u . 1 + u2 From here we can use the double-angle formulae sin(2θ) = 2 sin(θ) cos(θ) and cos(2θ) = cos2 (θ) − sin2 (θ) with θ = x/2 so see that sin(x) = 2u 1 + u2 and cos(x) = 1 − u2 . 1 + u2 Now we are in a position to really simplify our integral: Z Z 2 1 + u2 dx = · du 3 sin x − 4 cos x 1 + u2 6u − 4 + 4u2 Z Z Z Z du du 2 du 1 du = = = − . 2 2u + 3u − 2 (2u − 1)(u + 2) 5 2u − 1 5 u+2 To find that last expression, we used a partial fraction decomposition. Almost done: 1 1 = ln |2u − 1| − ln |u + 2| + C 5 5 1 2u − 1 = ln +C 5 u+2 1 2 tan(x/2) − 1 = ln + C. 5 tan(x/2) + 2 Good work! 5 As a summary of this type of substitution, here is a table of the important equalities to remember: u = tan x2 2du dx = 1+u 2 x = 2 tan−1 (u) sin(x) = 2u 1+u2 cos(x) = 6 1−u2 1+u2