Calculus II (part 1): Techniques of Integration (by Evan Dummit, 2012, v. 1.25) Contents 5 Techniques of Integration 1 5.1 Basic Antiderivatives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 5.2 Substitution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 5.3 Integration by Parts 3 5.4 Trigonometric Substitution 5.5 Partial Fractions 5.6 The Weierstrass Substitution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 5.7 Improper Integration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Techniques of Integration We discuss a number standard techniques for computing integrals: substitution methods, integration by parts, partial fractions, and improper integrals. 5.1 • Basic Antiderivatives Here is a list of common indenite integrals that should already be familiar: ˆ xn dx = xn+1 + C, n 6= −1 n+1 x−1 dx ˆ ex dx = ln(x) + C ˆ = ex + C ˆ sin(x) dx = − cos(x) + C cos(x) dx = sin(x) + C sec2 (x) dx = tan(x) + C sec(x) tan(x) dx ˆ 1 √ dx 1 − x2 ˆ 1 dx 1 + x2 ˆ 1 √ dx x x2 − 1 = sec(x) + C = sin−1 (x) + C = tan−1 (x) + C = sec−1 (x) + C ˆ ˆ ˆ 1 • Here are some other slightly more dicult antiderivatives that crop up occasionally: ˆ ln(x) dx = x ln(x) − x + C ˆ tan(x) dx = − ln(cos(x)) + C sec(x) dx = csc(x) dx = − ln(csc(x) + cot(x)) + C cot(x) dx = ˆ ln(sec(x) + tan(x)) + C ˆ ˆ 5.2 ln(sin(x)) + C Substitution ˆ • f 0 (g(x)) · g 0 (x) dx = f (g(x)) + C The general substitution formula states that . It is just the Chain Rule, written in terms of integration via the Fundamental Theorem of Calculus. We generally don't use the formula written this way. To do a substitution, follow this procedure: ◦ Step 1: Choose a substitution ◦ Step 2: Compute the dierential ◦ Step 3: Rewrite the original integral in terms of ∗ ∗ ∗ u = g(x). du = g 0 (x) dx. u: 3a: Rewrite the integral to peel o what will become the new dierential 3b: Write the remaining portion of the integrand in terms of 3c: Find the new limits of integration in terms of limits are x=a and x = b, the new ones will be du. u. u, if the integral is a denite integral. [If the old u = g(a) and u = g(b). In a very concrete sense, these are the same points.] ∗ 3d: Write down the new integral. If the integral is indenite, substitute back in for the original variable. • Substitution is best learned by doing examples: • Example: Evaluate • ´3 0 2 2x ex dx. ◦ Step 1: The exponential has a 'complicated' argument ◦ Step 2: The dierential is ◦ Step 3a: We can rearrange the integral as ◦ Step 3b: The remaining portion of the integrand is ◦ Step 3c: We see that ◦ Step 3d: Putting it all together gives Example: Evaluate ◦ du = 2x dx. x=0 corresponds to ´9 0 ´3 0 x2 , so we try setting u = x2 . 2 ex · (2x dx). u = 02 ex 2 , which is just x=3 and eu . corresponds to eu du = eu |9u=0 = e9 − 1 u = 32 . . ´ e (ln(x))2 dx. 1 x Step 1: It might not look like any function has a 'complicated' argument, but if we think carefully we can see that the numerator is what we get if we plug in ln(x) to the squaring function. So we try setting u = ln(x). 1 dx. x ◦ Step 2: The dierential is ◦ Step 3a: We can rearrange the integral as du = ´3 0 2 [ln(x)] · 2 1 dx . x • ◦ Step 3b: The remaining portion of the integrand is ◦ Step 3c: We see that ◦ Step 3d: Putting it all together gives Example: Evaluate ◦ x=1 corresponds to ´1 0 2 [ln(x)] u = ln(1) = 0 u2 du = , which is just and x=e 1 1 31 u |u=0 = 3 3 u2 . corresponds to u = ln(e) = 1. . ´1 √ x 3x2 + 1 dx. 0 Step 1: Here we see that the square root function has the 'complicated' argument 3x2 + 1 so we try u = 3x2 + 1. ◦ Step 2: The dierential is ◦ Step 3a: We can rearrange the integral as 6· 0 3x2 + 1 · 1 · (6x dx). 6 √ Step 3b: The remaining portion of the integrand is ◦ Step 3c: We see that x=0 corresponds to Step 3d: Putting it all together gives Example: Evaluate ´3 2 u=1 and 3x2 + 1 · x=1 1 , 6 which is just corresponds to ´ 4 1 1/2 1 2 7 u du = · u3/2 |4u=1 = 1 6 6 3 9 1 1/2 u . 6 u = 4. . 2x dx. −1 x2 u = x2 − 1. ◦ Step 1: Try the denominator: ◦ Step 2: The dierential is ◦ Step 3a: We can rearrange the integral as ◦ Step 3b: ◦ Step 3c: ◦ Step 3d: ◦ Remark: It's possible to do this one without substitution, by using partial fractions to see that du = 2x dx. ´3 1 · (2x dx). x2 − 1 1 −1 The remaining portion of the integrand is , which is just u . x2 − 1 We see that x = 2 corresponds to u = 3 and x = 3 corresponds to u = 8. ´ 8 −1 Putting it all together gives u du = ln(u)|8u=3 = ln 8 − ln 3 . 3 This gives 2 Integration by Parts The integration by parts formula states ˆ f 0 · g dx = f · g − f · g 0 dx . It is just the Product Rule, re- arranged and rewritten in terms of integrals using the Fundamental Theorem of Calculus. integration by parts, all that is required is to pick a function f 0 (x) · g(x) • f (x) and a function g(x) To perform an such that the product is equal to the original integrand. Examples will make everything clear. Example: Evaluate ◦ • 2x = −1 x2 I = [ln(x + 1) + ln(x − 1)] |3x=2 = ln(4) + ln(2) − ln(3) = ln(8) − ln(3) as before. ˆ • Note that we introduced a factor of , which is okay since it's just multiplication by 1. 1 1 + . x+1 x−1 5.3 ´1√ ◦ ◦ • 1 6 du = 6x dx. ´1 0 x ex dx. x and ex should be f 0 . 1 2 0 x Since x gets more complicated if we take its antiderivative (since we'd get 2 x ) we try ´f = e and ´1 x 1 x 0 x 1 x g = x, to get f = e and g = 1. Plugging into the formula gives 0 x e dx = x e |x=0 − 0 1 · e dx = (x ex − ex )|1x=0 = 1 . The integrand Example: Evaluate x · ex ´e 1 is an obvious product, and so we need to decide which of 2 [ln(x)] dx. 3 ◦ 2 [ln(x)] = ln(x)·ln(x), but this doesn't help unless we remember the antiderivative of ln(x). 2 2 0 Instead we write the integrand as 1 · [ln(x)] , so as to take f = 1 and g = [ln(x)] . Then we get f = x 1 0 by the Chain Rule. So plugging in will yields and g = 2 · ln(x) · x ˆ e ˆ e 1 2 x · 2 ln(x) · dx [ln(x)] dx = x · ln(x)2 |e1 − x 1 1 ˆ e = e− 2 ln(x) 1 ˆ e 1 = e − 2x · ln x|e1 − 2x · dx (IBP again) x 1 = e − [2e − (2e − 2)] We can write = • Example: Evaluate ◦ We want g ´1 0 e−2 . (x2 − 2x + 2)e3x dx. to be the thing which gets simpler when we dierentiate. The polynomial much simpler if we dierentiate it, while the exponential g = x2 − 2x + 2 and f 0 = e3x , so that g 0 = 2x − 2 and x2 − 2x + 2 gets 3x e stays basically the same. So we should take f = 13 e3x . Then integrating by parts yields an expression which we can't evaluate directly we have to integrate by parts again: ˆ ˆ 1 1 3x 1 1 = (x − 2x + 2) · e |0 − (2x − 2) · e3x dx (IBP once) 3 3 0 ˆ 1 2 3 2 1 = e − − (2x − 2) · e3x dx 3 3 3 0 ˆ 1 2 3 2 1 3x 1 1 = e − (IBP again) − (2x − 2) · e |0 − 2 · e3x dx 3 3 9 9 0 2 3 2 2 2 3 2 = e − − − e − 3 3 9 27 27 1 2 (x − 2x + 2)e 3x 2 dx 0 = • Example: Evaluate ◦ ´ 20 3 26 . e − 27 27 x3 sin(x) dx. Here we just need to integrate by parts repeatedly. We get ˆ ˆ x3 sin(x) dx = −x3 cos(x) + 3x2 cos(x) dx (IBP once) ˆ = −x3 cos(x) + 3x2 sin(x) − 6x sin(x) dx (IBP again) ˆ 3 2 = −x cos(x) + 3x sin(x) − −6x cos(x) + 6 cos(x) dx (IBP = • Example: Find ´ again) −x3 cos(x) + 3x2 sin(x) + 6x cos(x) + 6 sin(x) + C x3 sin(x2 ) dx. u = x2 . The dierential is du = 2x dx, ´ 1 1 and we can rearrange the integral as x2 sin(x2 ) · · (2x dx) = u sin(u) · du. 2 2 ´ 1 1 1 ◦ Now we integrate by parts, to get − u cos(u) + cos(u) du = [−u cos(u) + sin(u)] + C . 2 2 2 1 2 ◦ Finally substitute back for x to get −x cos(x2 ) + sin(x2 ) + C . 2 ◦ First we look for a substitution. We try the argument of the sine: ´ 4 5.4 • Trigonometric Substitution Some kinds of integrals require a more clever sort of substitution to evaluate, one that's sort of 'backwards' from the usual way we try to do substitutions: instead of (trigonometric) function f. u = f (x) we try x = f (u) for some appropriate sin2 (x) + cos2 (x) = 1) The idea is to use one of the Pythagorean relations (e.g., to simplify something more complicated. As always, examples make everything clear. • ´√ Example: Evaluate 1 − x2 dx. ◦ Traditional substitution along the lines of ◦ Instead we try x = sin(u); ´q dx = cos(u) du. ´p ´ 1 − sin2 (u) · cos(u) du = cos2 (u) · cos(u) du = cos2 (u) du. ◦ So we get ◦ Remembering ◦ Finally substitute back for cos2 (u) = Example: Evaluate ◦ 1 + cos(2u) 2 ´ we can evaluate the integral to get u = sin−1 (x) ◦ √ sin−1 (x) x 1 − x2 + +C 2 2 . If desired, we can . 1 dx. (1 + x2 )2 x = tan(u). Then dx = sec2 (u) du. ´ · sec2 (u) du = cos2 (u) du. This time we think of the arctangent antiderivative and try We obtain ´ Finally substitute back for u = tan−1 (x) simplify this to the equivalent form • u sin(2u) + + C. 2 4 sin−1 (x) sin(2 sin−1 (x)) + +C 2 4 to obtain ´ 1 1 · sec2 (u) du = 2 4 2 sec (u) (1 + tan (u)) 1 + cos(2u) ◦ Remembering the identity cos2 (u) = we 2 ◦ doesn't work like we'd hope. then simplify this to the equivalent form • u = 1 − x2 Example: Evaluate ´ to obtain can evaluate the integral to get tan−1 (x) sin(2 tan−1 (u)) + +C 2 4 tan−1 (x) x + +C 2 2(1 + x2 ) u sin(2u) + + C. 2 4 . If desired, we can . 2−x √ dx. 4 − x2 √ x = sin(u) substitution again but it doesn't quite work, since then 4 − x2 isn't nice. q √ to try x = 2 sin(u), since then 4 − x2 = 4 − 4 sin2 (u) = 2 cos(u), and we're much ◦ We'd like to do the ◦ Instead we have happier. ◦ Then we have dx = 2 cos(u) du, so we get ´ 2 − 2 sin(u) ´ ·2 cos(u) du = [2 − 2 sin(u)] du = 2u+2 cos(u)+ 2 cos(u) C. ◦ 5.5 • Substituting back yields , or equivalently, 2 sin−1 (x) + 2 p 1 − x2 + C . Partial Fractions Generally, it is dicult to integrate rational functions without rearranging them in some way rst. nding the antiderivative of • 2 sin−1 (x) + 2 cos(sin−1 (x)) + C 2x x3 + x2 + x + 1 (Try directly.) There is a general technique for evaluating such integrals, called partial fraction decomposition (PFD): the idea is to break down rational functions into simpler parts which we know how to integrate. To nd partial fraction decompositions, follow these steps: 5 ◦ Step 1: Factor the denominator. ◦ Step 2: Find the form of the PFD: For each term ∗ For each non-factorable term ··· + ◦ (x + a)n ∗ Cn x + Dn . (x2 + ax + b)n Step 3: Solve for the coecients ∗ C2 Cn C1 + + ··· + . (x + a)n x + a (x + a)2 C1 x + D1 C2 x + D2 (x2 + ax + b)n , the PFD has terms 2 + + 2 (x + ax + b)2 x + ax + b the PFD has terms C1 , C2 , . . . , Cn . The best way is to clear all denominators and then substitute 'intelligent' values for x (e.g., the roots of the linear factors). ∗ Sometimes plugging in other values of x is necessary, in order to nd the coecients of the higher terms. ∗ ◦ One can also employ other more clever methods, such as taking derivatives. Step 4: Evaluate the integral. C can be integrated directly using the Power Rule. (x + a)n Cx + D E(2x + a) F ∗ Terms of the form 2 should be separated further as + 2 . n 2 n (x + ax + b) (x + ax + b) (x + ax + b)n 2 The rst term can then be integrated by substituting u = x + ax + b, and the second term can be # " 2 x+c 2 2 2 2 2 +1 , integrated by completing the square as (x + a/2) + (b − a /4) = (x + c) + d = d d x+c and then substituting tan(t) = . d ∗ Terms of the form • As ever, examples make the procedure clear. • Example: Evaluate ◦ • so we want to write 1 A B = + . x(x + 3) x x+3 1 = A(x + 3) + B(x). x = −3 to see that 1 = 3A and 1 = −3B . ´ ´ 1/3 1 1 1/3 1 dx = − dx = ln(x) − ln(x + 3) + C 2 x + 3x x x+3 3 3 Set Then x=0 and ´ . 1 dx. x3 + x2 We factor and get ∗ ∗ ∗ ∗ 1 x(x + 3) Clear denominators so that Example: Evaluate ◦ 1 dx. x2 + 3x We factor and get ∗ ∗ ◦ ´ 1 x2 (x + 1) so we want to write Clear denominators so that 1 A B D = + 2+ . x2 (x + 1) x x x+1 1 = Ax(x + 1) + B(x + 1) + Dx2 . x = 0 to get 1 = B . x = −1 to get 1 = D. Set x = 1 to get 1 = 2A + 2B + D so that A = −1. ´ ´ −1 1 1 1 1 ◦ Then dx = + + dx = − ln(x) − + ln(x + 1) + C x3 + x2 x x2 x+1 x • Set Set Example: Evaluate ◦ We want ´ 2x dx. (x + 1)(x2 + 1) 2x A Bx + D = + 2 . (x + 1)(x2 + 1) x+1 x +1 6 . 2x = A(x2 + 1) + (Bx + D)(x + 1). Set x = −1 to get −2 = 2A so that A = −1. 2 So we want x + 2x + 1 = (Bx + D)(x + 1) so we see that we need B = D = 1. ´ ´ 2x −1 x 1 1 ◦ Then dx = + + dx = − ln(x + 1) + ln(x2 + 1) + tan−1 (x) + C (x + 1)(x2 + 1) x + 1 x2 + 1 x2 + 1 2 ∗ ∗ ∗ 5.6 • Clear denominators so that The Weierstrass Substitution There is one additional substitution that deserves discussion. ◦ It is rarely covered at any length in modern textbooks, but it should be, since it allows one to integrate sin(x) any rational function in • . The substitution is t = tan x 2 and cos(x). , which is called the Weierstrass substitution, or, occasionally, the magic substitution, since it allows one to evaluate complicated trigonometric integrals. 1 − t2 2t , sin(t) = , 1 + t2 1 + t2 2 dt. 1 + t2 1 − t2 2t ˆ p , ´ p(sin(x), cos(x)) 2 1 + t2 1 + t2 ◦ Then as we can see, the trigonometric integral dx becomes the integral q(sin(x), cos(x)) 1 + t2 1 − t2 2t q , 1 + t2 1 + t2 which is a rational function of t (though complicated). ◦ With this denition, one can check that ◦ The magic substitution can also be used to reduce any problem involving trigonometric identities in rational multiples of a single variable x cos(x) = and dx = to a nite computation with rational functions. (In practice, this is not as useful as it might seem, because the polynomial algebra is usually harder than using other techniques like the angle-addition formulas.) • Example: Find ◦ We set ´ 1 dx. 2 + cos(x) t = tan x 2 , with ˆ 5.7 • cos(x) = 1 dx 2 + cos(x) ◦ In this new integral we set ◦ Substituting back for t 1 − t2 1 + t2 √ u = t/ 3 and then x and dx = 2 dt, 1 + t2 to obtain ˆ 2 1 2 · 1 + t2 dt 1−t 2+ 1 + t2 ˆ 2 dt = 2 2(1 + t ) + (1 − t2 ) ˆ ˆ 2 2 1 √ = dt = · dt 3 + t2 3 1 + (t/ 3)2 = with √ du = dt/ 3 √ ´ 2 2 3 · du = √ tan−1 (u) + C . 3 1 + u2 3 x 2 1 √ tan−1 √ tan +C . 2 3 3 to obtain yields the answer as Improper Integration Sometimes we like to integrate to innity, by which we mean, take the limit as a limit of integration becomes arbitrarily large. 7 ◦ • ´∞ In other words, we write a f (x) dx as shorthand for ´q q→∞ a f (x) dx. Other times, we like to integrate through a 'singularity' of a function that is, through a point where a function is undened because it blows up: for example, ◦ • lim ´1 1 dx 0 x Again, we will write as shorthand for x=0 lim+ q→0 for the function f (x) = 1/x. ´1 1 dx. q x Integrals with either of these two kinds of 'bad behaviors' are called improper integrals. (Perhaps the terminology stems from the fact that trying to evaluate such integrals is not something done in polite company.) • Typically we will be interested in asking (i) if the integral actually converges to a nite value, and (ii) if it does, what the value is. • There are roughly two ways to solve problems like this: ◦ Method 1: Find the indenite integral, and then evaluate the limit. If the limit is hard, try rewriting the function to simplify the limit. ◦ Method 2: Compare the integrand to another function whose integral is easier to evaluate. We are aided by the following theorem: ∗ Theorem (Comparison Test for Integrals): If a one or both of and b converges, then so does ∗ ´b a f (x) dx. The idea behind the theorem is to say that if f (x)-integral so if the Example: Evaluate ◦ • ´∞ 0 ´∞ 1 x2 ´∞ 0 q→∞ ◦ Now to take the limit as as ln in the interval ´b a ´b q→∞ . ´ x2 1 dx = ln(x) − ln(x + 1) + C . +x x → ∞ is not so easy, unless we notice that we can rewrite the indenite integral . ´∞ 1 x x 1 q ln dx = lim | = lim ln − ln( ) = ln(2) x=1 q→∞ q→∞ x2 + x x+1 x+1 2 Then we have ◦ If the problem had only asked about convergence, we could have observed that so [a, b] where ´b g(x) dx a If ´b f (x) dx < a g(x) dx, and a and conversely if the g(x)-integral then ◦ x, g(x) dx. 1 dx. +x We do partial fractions to see x x+1 x e−x dx = lim (−e−x )|qx=0 = lim −e−q + 1 = 1 ◦ 0 < f (x) < g(x) the g(x)-integral, all so does e−x dx. We just evaluate to see Example: Evaluate ∞ then so must f (x)-integral. goes to stays nite then so must the • 0 < f (x) < g(x) for ´b f (x) dx diverges, a can be innite, then if 1 1 1 < 2. 2 x +x x Then the Comparison Test would have said that, because converges, then so does ´∞ 1 1 dx. x2 + x . x2 + x > x2 for positive ´∞ 1 1 =1 dx = − |∞ 1 x2 x x=1 However, the Comparison Test doesn't help us in computing the actual value. • Example: Determine whether the integral ◦ ´∞ 0 1 dx (x + 1)(x + 2)(x + 3)(x + 4) Doing partial fractions is too much work (although it does give the correct answer, if the trick in the previous example is used repeatedly). ◦ converges. But it's easier to notice that 1 1 1 1 < < < . x+4 x+3 x+2 x+1 8 ◦ Then nite ◦ • ´q ´q 1 1 1 dx = − (x + 1)−3 |qx=0 . dx < 0 4 (x + 1)(x + 2)(x + 3)(x + 4) (x + 1) 4 1 (in fact, it is ). 4 0 Therefore this integral q→∞ this remains converges . Example: Determine whether the integral ´1 1 dx 0 x converges. ´1 1 dx = − ln(q). q x ◦ We integrate to get ◦ So as ◦ Therefore this integral q → 0+ As −∞. we see that this diverges to diverges to −∞ . Well, you're at the end of my handout. Hope it was helpful. Copyright notice: This material is copyright Evan Dummit, 2012-2015. You may not reproduce or distribute this material without my express permission. 9