Course Notes for Calculus 110.109, Spring 2015 Nishanth Gudapati In the previous course (Calculus 110.108) we introduced the notion of integration and a few basic techniques of integration like substitution etc. In the first part of this course we shall discuss more techniques of integration. For instance, let us say that we are interested in calculating an integral which looks as simple as follows xe x dx. (1) The above integral involves a product of two functions x and e x,soweneed to figure out a way to find the integral of a product of two functions. Firstly, we have the following formula from the product rule for di erentiation d dx (xex )=xe x + e x. (2) Noting that integration is the inverse process of di erentiation, we integrate the equation (2) with respect to x to get xe x = xe x dx + e x dx (3) = xe x dx + e x (4) which implies, xe x dx = xe x e x. (5) Therefore, we have been able to obtain a formula for xe x dx by using the product rule for di erentiation (2). This technique can be generalized to find the integral of the product of more general functions. The product rule (also called the Leibnitz rule) of two di erentiable functions f and h is as follows d dx (f(x) h(x)) = f(x)h0 (x)+h(x)f 0 (x) (6) 1
If we integrate the equation (6) with respect to x, we get f(x) h(x) = f(x)h 0 (x)dx + h(x)f 0 (x)dx (7) this means, f(x)h 0 (x) dx = f(x) h(x) h(x)f 0 (x)dx. (8) Let us assume that the function h is an antiderivative of g so that h 0 (x) = g(x) and h(x) = R g(x)dx, the equation (8) tranforms to f(x)g(x) dx = f(x) g(x) dx f 0 g(x) dx dx. (9) The formula (9) is the main formula for integration by parts of the product of two functions f(x) and g(x). Just so that we become more familiar with the formula, let us look into further examples. 1. R ln x, hereletustrywithf(x) =lnx and g(x) = 1, we have ln x 1dx =lnx dx (ln x) 0 dx dx 1 =lnx x x xdx =x ln x x + c (10) 2. R x sin xdx,letustrywithf(x) =x and g(x) =sinx, wehave x sin xdx= x sin xdx = x ( cos x) = x cos x +sinx + c (x) 0 1 ( cos x) dx sin xdx dx 3. R e x sin xdx, let us start by trying with f(x) =e x and g(x) =sinx, we have e x sin xdx=e x sin xdx (e x ) 0 sin xdx dx = e x cos x + e x cos xdx. (11) 2
However, we have arrived at an integral that is not immediately solvable, but if we observe carefully we can apply integration by parts to R e x cos xdx and get e x cos xdx= e x sin x e x sin xdx (12) If we now plug (12) in (11) we get e x sin xdx= e x cos x + e x sin x e x sin xdx (13) Now we can solve for R e x sin xdx, to get e x dx = 1 2 ex (sin x cos x)+c. (14) The integration by parts formula can be adapted for definite integrals: b a f(x)g(x) dx = f(x) Consider the example 1. R 1 0 tan 1 xdx,wehave g(x) dx b a b a f 0 g(x) dx dx. (15) 1 0 tan 1 x 1 dx =(tan 1 x) x = 4 Using a substitution u =1+x 2 we get R 1 0 1 0 x dx (16) 1+x2 x dx (17) 1+x2 x dx = 1 1+x 2 2 ln 2. Therefore, 1 0 tan 1 xdx= 4 1 ln 2. 2 Let us not move on to more complicated examples, consider R x 2 e x dx, then x 2 e x dx = x 2 e x dx 2 xe x dx. (18) We can now use the formula in (5) to get x 2 e x dx = x 2 e x 2(xe x e x ). (19) 3
This idea can be generalized to any general (positive integer) exponent: x n e x dx =x n e x dx n x n 1 e x dx =x n e x n x n 1 e x dx (20) Formulas such as (20) are called reduction formulae because the right hand side of (20) has the integral very similar to R x n e x dx, butwiththe reduced exponent of (n 1). Let us look into further examples of reduction formulae: 1. R (ln x) n dx (ln x) n 1 dx =(ln x) n dx n (ln x) n 1 1 xdx. (21) x Therefore the reduction formula for R (ln x) dx is (ln x) n dx =x (ln x) n n (ln x) n 1 dx. (22) 2. R (sin x) n dx, letustrybysplittingsinx n to sin x n 1 sin x (sin x) n 1 sin xdx= cos x sin n 1 x +(n 1) sin n 1 cos x cos xdx (23) But the cos 2 x term on the right hand side can be substituted by(1 sin 2 x), then (sin x) n dx = cos x sin n 1 x +(n 1) sin n 2 x(1 sin 2 x) dx = cos x sin n 1 x +(n 1) sin n 2 xdx+ sin n xdx (24) Now, taking the (n 1) R sin n xdx term to the left hand side, we get n (sin x) n dx = cos x sin n 1 x (n 1) sin n 1 xdx. (25) Consequently, the reduction formula for R sin n xdx is (sin x) n dx = 1 n cos x sinn 1 x + n 1 sin n 2 xdx (26) n 4
Similarly, reduction formula can be obtained for R cos n xdx cos n xdx= 1 n sin x cosn 1 x + n 1 cos n 2 xdx (27) n Specifically, if we were dealing with the case n = 3 we can evaluate the integral with substitution: cos 3 xdx= = cos 2 x cos xdx (28) (1 sin 2 x) cos xdx (29) now if we make the substitution u =sinx,i.e., du = cos xdx we get cos 3 xdx= (1 u 2 ) du = u u 3 /3+c =sinu sin 3 3 + c (30) In fact this technique also works for more complicated integrals such as sin 2 x cos 5 xdx. Proceeding as before, sin 2 x cos 5 xdx= sin 2 cos 4 x cos xdx (31) We can now make the substitution u =sinx, thendu = cos xdx. integral in (31) now becomes u 2 (1 u 2 ) 2 du = u 2 (1 2u 2 + u 4 ) du = u 2 2u 4 u 6 du The = u3 3 = sin3 x 3 2u 5 5 u 7 7 + c 2 sin 5 x 5 sin 7 x 7 + c. (32) Alternatively, if we had an odd power of sin x function in the integral, one may use u = cos x substitution instead, as illustrated below cos 4 x sin 3 xdx= cos 4 x sin 2 x sin xdx, (33) 5
now if we make the u = cos x substitution,i.e., du = sin xdx,wehave, u 4 (1 u 2 ) du = (u 4 u 6 ) dx = ( u5 5 = cos7 x 7 More generally, the technique can be summarized as follows, sin m x cos n xdx where m and n are positive integers. u 7 7 )+c cos 5 x + c. (34) 5 If the power of cos x is odd, that is if n is of the form n =2k +1 sin m x cos 2k+1 xdx= (sin m x cos 2k x) cos xdx (35) then use the substitution u =sinx, du = cos xdx and transform the cos 2k x term into (1 sin 2 x) k, to rewrite the integral as u m (1 u 2 ) k du, which can then be integrated by expanding (1 u 2 ) k. If the power of sin x is odd, that is if m is of the form m =2k+1 sin 2k+1 x cos n xdx= (sin 2k x cos n x)sinxdx (36) then use the substitution u = cos x, du = sin xdxand transform the sin 2k x term into (1 cos 2 x) k, to rewrite the integral as (1 u 2 ) k u n du. If m and n are both even then one may have to use the following double angle formula for cosine function. cos 2x = cos 2 x sin 2 x (37) =1 2 sin 2 x (38) =2 cos 2 x 1, (39) 6
where we used the formula cos 2 x +sin 2 x = 1 to obtain the equations (38) and (39) from the equation (37). Let us now consider an example to illustrate the case where m and n are both even. sin 2 xdx (40) in principle this integral can be calculated using the reduction formula discussed earlier (26). However, let us try a di erent approach now, from the equation (38) we have therefore, sin 2 x = 1 cos 2x, (41) 2 1 cos 2x sin 2 xdx= dx 2 = 1 1 dx cos 2xdx 2 2 = 1 2 x 1 2 1 sin 2x + c 2 = x sin 2x + c. (42) 2 4 Let us now move on to a higher degree example sin 4 xdx (43) proceeding as before, sin 4 x =(sin 2 x) 2 = expression can be rewritten as follows, 1 1 cos 2x 2. 2 However, this Hence, cos 2x 2 2 = 1 4 1 2 cos 2x + cos2 2x = 1 (1 + cos 4x) 1 2 cos 2x + 4 2 = 1 3 (cos 4x) 2 cos 2x + 4 2 2 (44) 1 3 sin 4 (cos 4x) xdx= 2 cos 2x + 4 2 2 = 3 1 dx cos 2xdx+ 1 cos 4xdx 8 2 8 = 3x 1 8 4 sin 2x + 1 sin 4x + c. (45) 32 7
Having considered the integrals of the kind R sin m x cos n xdx,letusnow move on to trigonometric integrals of the kind sin mx cos nx dx, m and n are positive integers and m 6= n. (46) It turns out that the integrals like (46) can be dealt simply by recalling the following formulas for sine and cosine functions sin A cos B = 1 (sin(a + B)+sin(A B)) (47) 2 sin A sin B = 1 (cos(a B) cos(a + B)) (48) 2 cos A cos B = 1 (cos(a B) + cos(a + B)). (49) 2 Thus, if we plug in A = mx and B = nx in (47) we have sin mx cos nx = 1 sin(m + n)x +sin(m n)x. 2 Consequently, sin mx cos nx dx = 1 sin(m + n)x +sin(m n)x dx 2 = 1 1 1 cos (m + n)x + cos (m n)x + c. 2 m + n m n (50) Likewise from (48) and (49), sin mx sin nx = 1 (cos(m n)x cos(m + n)x) (51) 2 cos mx cos nx = 1 (cos(m n)x + cos(m + n)x) (52) 2 then, sin mx sin nx dx = 1 (cos(m n)x cos(m + n)x) dx 2 = 1 1 2 m n sin(m n)x 1 sin(m + n)x m + n and cos mx cos nx dx = 1 (cos(m n)x + cos(m + n)x) dx 2 = 1 1 1 sin(m n)x + sin(m + n)x 2 m n m + n + c (53) + c. (54) 8
The equations (47), (48) and (49) can further be used to calculate the integrals like sin 4 x cos 2 xdx by observing that sin 4 x cos 2 x =(sin 2 x) 2 cos 2 x (1 cos 2x)2 1 + cos 2x = 4 2 = 1 8 1 cos2 2x (1 cos 2x) (55) = 1 (1 cos 4x)(1 cos 2x) (56) 16 = 1 (1 cos 2x cos 4x + cos 2x cos 4x). (57) 8 The integral can now be calculated for each term in (57) by noting that for the last term (54) can be used. We shall now move on to a di erent variant of trigonometric integrals: sec m x tan n xdx. (58) Integrals of the kind (58) can be tackled by recalling the following properties of secant and tangent functions sec 2 x tan 2 x =1 (59) d dx (tan x) =sec2 x (60) d (sec x) =secx tan x dx (61) Let us start with a simple case of R secx dx, wehave sec x + tan x sec xdx= sec x dx sec x + tan x sec 2 x +secxtan x = dx. (62) sec x + tan x Consider the substitution u =secx + tan x, whichimplies du dx =sec2 x + sec x tan x =) du =(sec 2 x +secxtan x) dx. Therefore, 1 sec xdx= du =ln u + c u =ln sec x + tan x + c. (63) If we go back the more general form (58), the strategy is dependent whether n is even or m is odd. 9
1. If n is even, let ssaywehave tan 4 x sec 6 xdx. tan 4 x sec 6 xdx= tan 4 x sec 4 x sec 2 xdx (64) (65) If we make the substitution u = tan x, thendu =sec 2 xdx. recalling that sec 2 x = 1 + tan 2 x,wehave tan 4 x sec 4 x sec 2 xdx= u 4 (1 + u 2 ) 2 du = (u 4 +2u 6 + u 8 ) du Now = u5 5 + 2u7 7 + u9 9 + c = tan5 x 5 + 2 tan7 x 7 + tan9 x 9 + c. (66) Note that the same technique can be used for any positive even n. 2. If m is odd, for example as in R sec 3 x tan 5 xdx,we proceed by pulling out a (sec x tan x) term as follows follows sec 3 x tan 5 xdx= (sec 2 x tan 4 x)(sec x tan x) dx. (67) Let us make the substitution u =secx =) du =secx tan xdx.since we started with an odd power of tan x we are left with an even power of tan x. Therefore, tan 4 x = (tan 2 x) 2 =(sec 2 x 1) 2 =(u 2 1) 2. Consequently, sec 3 x tan 5 xdx= u 2 (u 2 1) 2 du = u7 7 = sec7 x 7 2u 5 5 + u3 3 + c 2 sec 5 x 5 + sec3 x 3 + c. (68) Likewise, the reader may note that this technique works for any odd power of tan x. 10
Trigonometric Substitution Consider the integral dx x 2p 4 x 2, (69) Let us try substitution of the independent variable directly with x =2sin, 2 ( /2, /2). (Here we chose 2 ( domain) We have, /2, /2) because sin is a one-one function in this dx =2 cos d dx x 2p 4 x = 2 cos d 2 4 sin 2 2 cos. (70) Firstly, note that cos = cos in ( /2, /2) because cos > 0. Hence, dx x 2p 4 x =1 csc 2 d 2 4 = 1 cot + c. (71) 4 Observe that in (71) we have the answer in terms of, so we need to convert this back to x. consequently, cot = cos p sin 1 sin 2 = r sin 1 x 2 4 = dx x 2p 4 x 2 = x 2 (72) p 4 x 2 =, (73) x p 4 x 2 + c. (74) 4x Importantly, note that in (72) we used cos = p 1 sin 2 and not cos = p 1 sin 2 or cos = ± p 1 sin 2 because in the interval ( /2, /2), cos is strictly > 0. 11
Generally, we substitute an independent variable with a trigonometric function to exploit any one of the standard trigonometric formulas For instance, in the following example, dx (a 2 + x 2 ) 3/2, a > 0 cos sin =1 (75) sec 2 tan 2 =1 (76) csc 2 cot 2 =1. (77) a substitution x = a tan, 2 ( /2, /2) inspired from the formula (76), seems appropriate: (a 2 + x 2 ) 3/2 =(a 2 + a 2 tan 2 ) 3/2 =(a 2 (1 + tan 2 )) 3/2 = a 3 sec 3 dx (a 2 + x 2 ) 3/2 =a sec2 d a 3 sec 3. (78) Hence, dx (a 2 + x 2 ) 3/2 = 1 a 2 cos d (79) 1 = sin + c. (80) a2 However, tan = x p a =) sin 1 + tan 2 = x x a =) sin = p a 1+( x. a )2 Therefore, dx (a 2 + x 2 ) 3/2 = x a 2p a 2 + x + c. 2 Extending the spirit, in the integral dx p x 2 a, a > 0 2 we make the substitution, x = a sec for 2 (0, /2) [ (, 3 /2) p x 2 a 2 = p a 2 (sec 2 1) = a tan = a tan. Then, dx p x 2 a sec tan a = d 2 a tan = sec d =ln sec + tan + c. (81) 12
Noting that, in 2 (0, /2) [ (, 3 /2), tan > 0 Therefore, tan = r x 2 a 2 1= 1 a p x 2 a 2. dx p x 2 a 2 =ln x a + p x 2 a 2 a + c =ln x + p x 2 a 2 a + c =ln x + p x 2 a 2 ln a + c =ln x + p x 2 a 2 + c, (82) where we absorbed the constant ln a into a generic constant c. Themeth- ods of trigonometric substitution can be summarized as follows 1. If the integrand involves p (a 2 x 2 ), we use the substitution x = a sin, 2 ( /2, /2) 2. If the integrand involves p (a 2 + x 2 ), we use the substitution x = a tan, 2 ( /2, /2) 3. If the integrand involves p (x 2 a 2 ), we use the substitution x = a sec, 2 (0, /2) [ (, 3 /2). Integration of Rational Functions Using Partial Fraction Decomposition Recall that that rational numbers are those which can be represented in the form of p, where p, q 2 and p, q 6= 0 q For instance 5 2, 7 9 are rational numbers and p 2, are not. Rational numbers with p>qare called improper and using the long division we can obtain a proper rational number (with p<q): p q = w + r q, where w is the quotient and r is the remainder (r <q) For instance, 5 2 =2+1 2 13
and 9 7 =1+2 7. Analogously, we can also define rational functions using polynomials. Let p(x) and q(x) be polynomials with degrees m and n respectively. Then a quantity p(x) q(x) is called a rational function. It is called improper if m>n. Similar to the rational numbers, we can convert an improper rational function to a proper one using long division p(x) q(x) = w(x)+r(x) q(x). It follows that w(x) and r(x) are also polynomials, in particular degree of r(x) <n. The focus of this section is to find a systematic way to find the integrals of rational functions p(x) dx. (83) q(x) If the rational function p(x) is improper, the we start by converting it into q(x) a proper rational function w(x) + r(x) q(x). Consequently, the proper rational function r(x) q(x) allows itself to be split into partial fractions in various ways. In particular, we may encounter four possbile scenarios 1. q(x) can be split into n distinct linear factors (q(x) has n real roots) q(x) =(a 1 x + b 1 )(a 2 x + b 2 ) (a n x + b n ), then there is a theorem which says that r(x) q(x) can be split as follows r(x) q(x) = A 1 + A 2 A n +, (84) a 1 x + b 1 a 2 x + b 2 a n x + b n where A 1,A 2, A n are n real numbers to be determined. We can find the values of A 1,A 2, A n by multiplying (84) with (a 1 x + b 1 )(a 2 x + b 2 ) (a n x+b n ) and either by comparing the coe cients on both sides b 1 b 2 b n or by plugging in the roots of q(x) i.e.,,,, Let us a 1 a 2 a n. illustrate this using an example. 1 x 3 +2x 2 14 3x dx.
Firstly note that the integrand in the above integral is a proper rational function and x 3 +2x 2 3x = x(x 2 +2x 3) = x(x 1)(x + 3). Therefore, the partial fraction decomposition is 1 x(x 1)(x + 3) = A 1 x + A 2 x 1 + A 3 x +3, (85) If we multiply both sides of (85) with x(x 1)(x + 3) we get 1=A 1 (x 1)(x + 3) + A 2 x(x + 3) + A 3 x(x 1) =(A 1 + A 2 + A 3 )x 2 +(2A 1 +3A 2 A 3 )x 3A 1 (86) Since the left and right hand sides of (86) are equal we equate the coe cients of x 2, x and constants respectively. A 1 + A 2 + A 3 =0 (87) 2A 1 +3A 2 A 3 =0 (88) 3A 1 =1 (89) From (89), we have A 1 = get 1 3 and if we plug this in (87) and (88), we A 2 + A 3 = 1 3 3A 2 A 3 = 2 3 (90) (91) which we can solve explicitly to get A 2 = 1 4 and A 3 = 1 12. Alternatively, we can also plug in the values x = 0,x = 1 and x = 3 in (86) to get the values of A 1, A 2 and A 3 respectively. Subsequently, we can now calculate the original integral 1 1 x 3 +2x 2 3x dx = 3x + 1 4(x 1) + 1 dx (92) 12(x + 3) = 1 3 ln x + 1 1 ln x 1 + ln x +3 + c. 4 12 2. q(x) is a product of repeated linear factors i.e., for instance q(x) =(a 1 x + b 1 ) r (a n x + b n ). then the contributing partial fraction of (a 1 x + b) r is A 1 a 1 x + b + A 2 (a 1 x + b) 2 + A 3 (a 1 x + b) 2 A r (a 1 x + b) r 15
A 1 instead of just a 1 x + b. For instance, consider the following integral as an example x 4 2x 2 +4x +1 x 3 x 2 x +1 dx. (93) Firstly, it may be noted that the integrand is an improper rational function, therefore we need to reduce it to a proper one using long division and x 4 2x 2 +4x +1 x 3 x 2 x +1 = x +1+ 4x x 3 x 2 x +1, (94) x 3 x 2 x +1=x 2 (x 1) (x 1) = (x 1) 2 (x + 1). which has repeated linear factor (x 1) 2. Consequently, 4x x 3 x 2 x +1 = A 1 x 1 + A 2 (x 1) 2 + A 3 x +1. Multiplying the above equation with (x 1) 2 (x + 1), we get 4x =(x 1)(x + 1)A 1 +(x + 1)A 2 +(x 1) 2 A 3. We can now solve for A 1,A 2 anda 3 either by comparing the coe cients on both sides or by plugging in suitable values of x. For instance, with x = 1 we get A 2 = 2, with x = 1 we get A 3 = 1 and x = 0 gives A 1 = 1. 3. q(x) has a quadratic factor with no real roots i.e., ax 2 + bx + c with b 2 4ac < 0. Then the contributing term in the partial fraction decomposition is Ax + b ax 2 + bx + c. In the integral x 2 x +6 x 3 +3x the denominator of the integrand x 3 +3x = x(x 2 + 3) has a quadratic factor x 2 + 3 which does not have real roots. Therefore, the paritial fraction decomposition is dx, x 2 x +6 x 3 +3x = A 1 x + A 2x + A 3 x 2 +3. 16
Again, by multiplying the above equation with x(x 2 + 3) gives x 2 x +6=(x 2 + 3)A 1 + x(a 2 x + A 3 )=(A 1 + A 2 )x 2 + A 3 x +3A. By comparing the coe cients we obtain A 1 + A 2 = 1 (95) A 3 = 1 (96) A 1 =2, (97) which gives A 1 =2,A 2 = 1,A 3 = 1. x 2 x +6 2 x 3 +3x dx = x =2 ln x x +1 x 2 +3 dx 1 2 ln(x3 + 3) 1 xp p arctan. (98) 3 3 4. If q(x) has repeated quadratic factors with no real roots i.e., (ax 2 + bx + c) r,withb 2 4ac < 0. In this case, the contributing term in the partial fraction decomposition has the following form A 1 x + B 1 ax 2 + bx + c + A 2 x + B 2 (ax 2 + bx + c) 2 + A r x + B r (ax 2 + bx + c) r (99). For instance, in the integral the integrand can be split as dx x(x 2 + 4) 3, 1 x(x 2 + 4) 3 = A 1 x + A 2x + B 2 x 2 + A 3x + B 3 +4 (x 2 + 4) 2 + A 4x + B 4 (x 2 + 4) 3. Proceeding like in previous examples we can compute the values of A 1, A 4 and B 1, B 3. 17