<<

Integration

INTEGRATION BY PARTS

Graham S McDonald

A self-contained Tutorial Module for learning the technique of integration by parts

● Table of contents ● Begin Tutorial

c 2003 [email protected] Table of contents 1. Theory 2. Usage 3. Exercises 4. Final solutions 5. Standard 6. Tips on using solutions 7. Alternative notation Full worked solutions Section 1: Theory 3 1. Theory To differentiate a product of two functions of x, one uses the : d dv du (uv) = u + v dx dx dx where u = u (x) and v = v (x) are two functions of x. A slight rearrangement of the product rule gives dv d du u = (uv) − v dx dx dx Now, integrating both sides with respect to x results in Z dv Z du u dx = uv − v dx dx dx This gives us a rule for integration, called INTEGRATION BY PARTS, that allows us to integrate many products of functions of x. We take one factor in this product to be u (this also appears on du the right-hand-side, along with dx ). The other factor is taken to dv be dx (on the right-hand-side only v appears – i.e. the other factor integrated with respect to x). Toc JJ II J I Back Section 2: Usage 4 2. Usage We highlight here four different types of products for which integration by parts can be used (as well as which factor to label u and which one dv to label dx ). These are:    sin bx  (i) R xn· or dx (ii) R xn·eaxdx  cos bx  ↑ ↑ ↑ ↑ dv dv u dx u dx    sin bx  (iii) R xr· ln (ax) dx (iv) R eax · or dx  cos bx  ↑ ↑ ↑ ↑ dv dv dx u u dx where a, b and r are given constants and n is a positive integer.

Toc JJ II J I Back Section 3: Exercises 5 3. Exercises Click on Exercise links for full worked solutions (there are 14 exer- cises in total)

Z Exercise 1. x cos x dx Z Exercise 2. x2 sin x dx Z Exercise 3. xexdx Z Exercise 4. x2e4xdx Z Exercise 5. x2 ln x dx

● Theory ● Integrals ● Final solutions ● Tips ● Notation Toc JJ II J I Back Section 3: Exercises 6 Z Exercise 6. (x + 1)2 ln 3x dx Z Exercise 7. e2x cos x dx Z Exercise 8. e−x sin 4x dx

1/2 Z Exercise 9. xe2x dx 0

π/4 Z Exercise 10. x sin 2x dx 0

● Theory ● Integrals ● Final solutions ● Tips ● Notation Toc JJ II J I Back Section 3: Exercises 7 1 Z Exercise 11. x4 ln 2x dx

1/2 π Z x Exercise 12. 3x2 cos dx 2 0 Z Exercise 13. x3ex dx Z Exercise 14. e3x cos x dx

● Theory ● Integrals ● Final solutions ● Tips ● Notation

Toc JJ II J I Back Section 4: Final solutions 8 4. Final solutions

1. x sin x + cos x + C ,

2. −x2 cos x + 2x sin x + 2 cos x + C ,

3. (x − 1) ex + C ,

1 4x 2  4. 32 e 8x − 4x + 1 + C ,

1 3 5. 9 x (3 ln x − 1) + C ,

1 3 1 3 1 2 1 6. 3 (x + 1) ln 3x − 9 x − 2 x − x − 3 ln x + C ,

1 2x 7. 5 e (sin x + 2 cos x) + C ,

Toc JJ II J I Back Section 4: Final solutions 9 1 −x 8. − 17 e (4 cos 4x − sin 4x) + C ,

1 9. 4 ,

1 10. 4 ,

1 31 11. 5 ln 2 − 800 ,

12. 6 π2 − 8 ,

13. ex x3 − 3x2 + 6x − 6 + C ,

1 3x 14. 10 e (sin x + 3 cos x) + C .

Toc JJ II J I Back Section 5: Standard integrals 10 5. Standard integrals

f (x) R f(x)dx f (x) R f(x)dx n+1 n xn+1 n 0 [g(x)] x n+1 (n 6= −1) [g (x)] g (x) n+1 (n 6= −1) 1 g0(x) x ln |x| g(x) ln |g (x)| x x x ax e e a ln a (a > 0) sin x − cos x sinh x cosh x cos x sin x cosh x sinh x tan x − ln |cos x| tanh x ln cosh x x x cosec x ln tan 2 cosech x ln tanh 2 sec x ln |sec x + tan x| sech x 2 tan−1 ex sec2 x tan x sech2 x tanh x cot x ln |sin x| coth x ln |sinh x| 2 x sin 2x 2 sinh 2x x sin x 2 − 4 sinh x 4 − 2 2 x sin 2x 2 sinh 2x x cos x 2 + 4 cosh x 4 + 2

Toc JJ II J I Back Section 5: Standard integrals 11

f (x) R f (x) dx f (x) R f (x) dx

1 1 tan−1 x 1 1 ln a+x (0<|x|

(a > 0) 1 1 ln x−a (|x| > a>0) x2−a2 2a x+a

√ 2 2 √ 1 sin−1 x √ 1 ln x+ a +x (a > 0) a2−x2 a a2+x2 a √ 2 2 (−a < x < a) √ 1 ln x+ x −a (x>a>0) x2−a2 a

√ √ 2 √ 2 h i 2 2 a  −1 x  2 2 a −1 x  x a2+x2 a − x 2 sin a a +x 2 sinh a + a2 √ √ i √ 2 h i x a2−x2 2 2 a −1 x  x x2−a2 + a2 x −a 2 − cosh a + a2

Toc JJ II J I Back Section 6: Tips on using solutions 12 6. Tips on using solutions

● When looking at the THEORY, INTEGRALS, FINAL SOLU- TIONS, TIPS or NOTATION pages, use the Back button (at the bottom of the page) to return to the exercises

● Use the solutions intelligently. For example, they can help you get started on an exercise, or they can allow you to check whether your intermediate results are correct

● Try to make less use of the full solutions as you work your way through the Tutorial

Toc JJ II J I Back Section 7: Alternative notation 13 7. Alternative notation In this Tutorial, we express the rule for integration by parts using the formula: Z dv Z du u dx = uv − v dx dx dx But you may also see other forms of the formula, such as: Z Z dg f(x)g(x)dx = F (x)g(x) − F (x) dx dx where dF = f(x) dx Of course, this is simply different notation for the same rule. To see this, make the identifications: u = g(x) and v = F (x).

Toc JJ II J I Back Solutions to exercises 14 Full worked solutions Exercise 1. We evaluate by integration by parts: Z Z x cos x dx = x · sin x− (1) · sin x dx, i.e. take u = x du giving = 1 (by differentiation) dx dv and take = cos x dx giving v = sin x (by integration), Z = x sin x − sin x dx

= x sin x − (− cos x) + C, where C is an arbitrary = x sin x + cos x + C . Return to Exercise 1

Toc JJ II J I Back Solutions to exercises 15 Exercise 2. Z Z x2 sin x dx = x2 · (− cos x) − (2x) · (− cos x) dx ,

i.e. take u = x2 du giving = 2x dx dv and take = sin x dx giving v = − cos x , Z = −x2 cos x + 2 x cos x dx | {z } ,→ we need to use integration by parts again!

Toc JJ II J I Back Solutions to exercises 16

 Z  = −x2 cos x + 2 x sin x − (1) · sin x dx ,

as in question 1, Z = −x2 cos x + 2x sin x − 2 sin x dx

= −x2 cos x + 2x sin x − 2 · (− cos x) + C = −x2 cos x + 2x sin x + 2 cos x + C. Return to Exercise 2

Toc JJ II J I Back Solutions to exercises 17 Exercise 3. Z Z x exdx = x · ex − (1) · exdx, i.e. take u = x du giving = 1 dx dv and take = ex dx giving v = ex, Z = x ex − exdx

= x ex − ex + C = (x − 1) ex + C. Return to Exercise 3

Toc JJ II J I Back Solutions to exercises 18 Exercise 4. Z 1 Z 1 x2 e4xdx = x2 · e4x − 2x · e4xdx , 4 4 i.e. take u = x2 du = 2x dx dv = e4x dx 1 v = e4x , 4 1 1 Z = x2e4x − x e4xdx 4 2 | {z } ,→ now use integration by parts again

Toc JJ II J I Back Solutions to exercises 19

1 1  1 Z 1  = x2e4x − x · e4x − 1 · e4xdx , 4 2 4 4 i.e. this time u = x du = 1 dx dv = e4x dx 1 v = e4x, 4 1 1 1  1 Z = x2e4x − xe4x − · − · e4xdx 4 8 2 4 1 1 1 Z = x2e4x − xe4x + e4xdx 4 8 8 1 1 1 1 = x2e4x − xe4x + · e4x + C 4 8 8 4

Toc JJ II J I Back Solutions to exercises 20

8 4 1 = x2e4x − xe4x + e4x + C 32 32 32 1 = e4x 8x2 − 4x + 1 + C. 32 Return to Exercise 4

Toc JJ II J I Back Solutions to exercises 21 Exercise 5. Z 1  Z 1 1  x2 ln x dx = (ln x) · x3 − · x3 dx , i.e. u = ln x 3 x 3 du 1 = dx x dv = x2 dx 1 v = x3 , 3 1 1 Z = x3 ln x − x2dx 3 3 1 1 1  = x3 ln x − · x3 + C 3 3 3 1 1 = x3 ln x − x3 + C 3 9 1 = x3 (3 ln x − 1) + C. 9 Return to Exercise 5 Toc JJ II J I Back Solutions to exercises 22 Exercise 6.

Z 1 Z 1 1 (x + 1)2 ln 3x dx = (ln 3x) · (x + 1)3 − · (3) · (x + 1)3dx 3 3x 3

du 1 d 1 i.e. u = ln 3x gives dx = 3x · dx (3x) = 3x · (3),

dv 2 1 (x+1)3 using the , and dx = (x + 1) gives v = 1 · 3 , where we have used the result that if

dv n 1 (ax+b)n+1 dx = (ax + b) then v = a (n+1) ,

Toc JJ II J I Back Solutions to exercises 23

Z 1 1 Z (x + 1)3 (x + 1)2 ln 3x dx = (x + 1)3 ln 3x − dx ∴ 3 3 x 1 1 Z x3 + 3x2 + 3x + 1 = (x + 1)3 ln 3x − dx , 3 3 x where we have used the , or just multiplied out (x + 1)3, 1 1 Z 1 = (x + 1)3 ln 3x− x2 + 3x + 3 + dx 3 3 x 1 1 x3 3  = (x + 1)3 ln 3x− + x2 + 3x + ln x +C 3 3 3 2 1 x3 1 1 = (x + 1)3 ln 3x − − x2 − x − ln x+C. 3 9 2 3 Return to Exercise 6

Toc JJ II J I Back Solutions to exercises 24 Exercise 7. Z e2x cos x dx

2x dv du 2x Set u = e and dx = cos x , to give dx = 2e and v = sin x.

Let I = R e2x cos x dx , since we will eventually get I on the right- hand-side for this type of

i.e. I = e2x · sin x − R 2e2x · sin x dx

i.e. I = e2x sin x − 2 R e2x sin x dx.

2x dv Use integration by parts again, with u = e and dx = sin x , giving du 2x dx = 2e and v = − cos x

Toc JJ II J I Back Solutions to exercises 25 i.e. I = e2x sin x − 2 e2x · (− cos x) − R 2e2x · (− cos x) dx i.e. I = e2x sin x − 2 −e2x cos x + 2 R e2x cos x dx Z i.e. I = e2x sin x + 2e2x cos x − 4 e2x cos dx | {z } =4I

2x 2x i.e. 5I = e sin x + 2e cos x + C1 1 2x 1 ∴ I = 5 e (sin x + 2 cos x) + C , where C = 5 C1 (another arbi- trary constant). Note It is customary to introduce the arbitrary constant after the last integration is performed, though strictly one could accommodate R du arbitrary constants arising from each dx · v dx (indefinite) integra- tion and these would add up to give a single arbitrary constant in the final answer. Return to Exercise 7

Toc JJ II J I Back Solutions to exercises 26 Exercise 8. Z du e−x sin 4x dx. u = e−x , giving = −e−x , dx dv 1 = sin 4x, giving v = · (− cos 4x) dx 4 1 i.e. v = − cos 4x , 4

Z Let I = e−x sin 4x dx

 1  Z  1  i.e. I = e−x · − cos 4x − −e−x · − cos 4x dx 4 4

Toc JJ II J I Back Solutions to exercises 27 Z 1 −x 1 −x i.e. I = − 4 e cos 4x − 4 e cos 4x dx | {z } ↓ −x du −x u = e , dx = −e

dv 1 dx = cos 4x , v = 4 sin 4x ,

1 −x 1  −x 1  R −x 1  i.e. I = − 4 e cos 4x− 4 e · 4 sin 4x − (−e ) · 4 sin 4x dx

Toc JJ II J I Back Solutions to exercises 28

1 1 1 1Z  I = − e−x cos 4x − e−x sin 4x + e−x sin 4x dx ∴ 4 4 4 4 1 1 1 i.e. I = − e−x cos 4x − e−x sin 4x − I 4 16 16  1  1 1 i.e. 1 + I = − e−x cos 4x − e−x sin 4x 16 4 16 17 1 1 I = − e−x cos 4x − e−x sin 4x 16 4 16 4 1 i.e. I = − e−x cos 4x − e−x sin 4x 17 17 1 = − e−x (4 cos 4x − sin 4x) + C. 17 Return to Exercise 8

Toc JJ II J I Back Solutions to exercises 29 Exercise 9. 1/2 1/2 Z  1 1/2 Z 1  xe2xdx = x · e2x − 1 · e2x dx, i.e. u = x 2 0 2 0 0 du = 1 dx dv = e2x dx 1 v = e2x, 2 1/2 1 1/2 1 Z = xe2x − e2xdx 2 0 2 0  1/2 1  2x1/2 1 1 2x = xe 0 − e 2 2 2 0

Toc JJ II J I Back Solutions to exercises 30

  1 1 2· 1 0 1 h 2· 1 0i = e 2 − 0.e − e 2 − e 2 2 4 1 1 1 1 = · e1 − e1 + e0 2 2 4 4 1 1 = 0 + e0 = . 4 4 Return to Exercise 9

Toc JJ II J I Back Solutions to exercises 31 Exercise 10. π/4 π/4 Z   1 π/4 Z  1  x sin 2x dx = x · − cos 2x − 1. − cos 2x dx, 2 0 2 0 0 u = x dv = sin 2x dx du = 1 dx 1 v = − cos 2x , 2 π/4  1 π/4 1 Z = − x cos 2x + cos 2x dx 2 0 2 0

Toc JJ II J I Back Solutions to exercises 32

 π/4 1 π/4 1 1 = − [x cos 2x]0 + sin 2x 2 2 2 0 1 1 = − [x cos 2x]π/4 + [sin 2x]π/4 2 0 4 0 1 nπ π o 1 n π o = − · cos − 0 · cos 0 + sin − sin 0 2 4 2 4 2 1 1 π = − {0 − 0} + {1 − 0} , since cos = 0, 2 4 2 1 π = . sin = 1, 4 2 and sin 0 = 0, Return to Exercise 10

Toc JJ II J I Back Solutions to exercises 33 Exercise 11. Note that if a is involved then we choose that factor to be u. 1 1 Z  x5 1 Z  1  x5  i.e. x4 ln 2x dx = (ln 2x) · − · dx 5 1/2 x 5 1/2 1/2 1 1 1 1 Z = x5 ln 2x − x4dx 5 1/2 5 1/2  5 1 1  5 1 1 x = x ln 2x 1/2 − 5 5 5 1/2 1 1 1 1 = x5 ln 2x − x5  5 1/2 25 1/2 ( ) ( ) 1 15 1 15 = (1 · ln 2) − · ln 1 − 15 − 5 2 25 2

Toc JJ II J I Back Solutions to exercises 34

1 1  1  = ln 2 − 1 − , since ln 1 = 0 and 25 = 32, 5 25 32 1 1 31 = ln 2 − · 5 25 32 1 31 = ln 2 − . 5 800 Return to Exercise 11

Toc JJ II J I Back Solutions to exercises 35 Exercise 12. For definite integrals, we can either use integration by parts in the form: Z b Z b dv b du u dx = [uv]a − · v dx a dx a dx R dv or we can work out u dx dx, i.e. without the limits, first and then apply the limits to the final result. We will do that here. So, to work R π 2 x  out 0 3x cos 2 dx, we will consider the indefinite integral first: Z ! Z ! 2 x 2 1 x 1 x 3x cos dx = 3x 1  sin − 6x · 1  sin dx 2 2 2 2 2 x Z x = 6x2 sin −12 x sin dx 2 2 (use integration by parts, again) x   x Z x  = 6x2 sin −12 x −2 cos − −2 cos dx 2 2 2

Toc JJ II J I Back Solutions to exercises 36

x  x Z x  = 6x2 sin − 12 −2x cos +2 cos dx 2 2 2 Z x x x Z x i.e. 3x2 cos dx = 6x2 sin + 24x cos − 24 cos dx 2 2 2 2 x x x = 6x2 sin + 24x cos − 24 · 2 · sin + C. 2 2 2

On the next page, we will evaluate the definite integral . . .

Toc JJ II J I Back Solutions to exercises 37 So, Z π x h x x xiπ 3x2 cos dx = 6x2 sin + 24x cos − 48 sin 0 2 2 2 2 0 n π  o n π  o = 6π2 sin −0 +24 π cos −0 2 2 n π  o − 48 sin −0 , 2 since sin 0 = 0, π  π  = 6π2 − 48, since sin = 1 and cos = 0, 2 2 = 6 π2 − 8 . Return to Exercise 12

Toc JJ II J I Back Solutions to exercises 38 Exercise 13. Z Z x3exdx = x3ex − 3x2exdx  Z  = x3ex − 3 x2ex − 2xexdx , using integration by parts, again Z = x3ex − 3x2ex + 6 xexdx  Z  = x3ex − 3x2ex + 6 xex − exdx ,using integration by parts, again,

= x3ex − 3x2ex + 6xex − 6ex + C = ex x3 − 3x2 + 6x − 6 + C. Return to Exercise 13

Toc JJ II J I Back Solutions to exercises 39 Exercise 14. Z Let I = e3x cos x dx Z = e3x sin x − 3e3x sin x dx Z = e3x sin x − 3 e3x sin x dx  Z  = e3x sin x − 3 e3x · (− cos x) − 3e3x · (− cos x) dx Z = e3x sin x + 3e3x cos x − 9 e3x cos x dx

= e3x sin x + 3e3x cos x − 9I 3x 3x i.e. 10I = e sin x + 3e cos x + C1 1 C i.e. I = e3x (sin x + 3 cos x) + C, where C = 1 . 10 10 Return to Exercise 14

Toc JJ II J I Back