You are on page 1of 39

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 g.s.mcdonald@salford.ac.uk
Table of contents
1. Theory
2. Usage
3. Exercises
4. Final solutions
5. Standard integrals
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 product
rule:
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 Z
dv 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
the right-hand-side, along with du 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
xn xn eax dx
R R
(i) or dx (ii)
cos bx


dv dv
u dx u dx

sin bx
xr ln (ax) dx eax
R R
(iii) (iv) 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. xex dx
Z
Exercise 4. x2 e4x dx
Z
Exercise 5. x2 ln x dx

Theory Integrals Final solutions Tips Notation


Toc JJ II J I Back
Section 3: Exercises 6
Z
2
Exercise 6. (x + 1) ln 3x dx
Z
Exercise 7. e2x cos x dx
Z
Exercise 8. ex sin 4x dx

Z1/2
Exercise 9. xe2x dx
0

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

Theory Integrals Final solutions Tips Notation


Toc JJ II J I Back
Section 3: Exercises 7
Z1
Exercise 11. x4 ln 2x dx
1/2

Z x
Exercise 12. 3x2 cos dx
2
0
Z
Exercise 13. x3 ex 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

4. 32 e 8x2 4x + 1 + C ,

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

1 3
6. 3 (x + 1) ln 3x 19 x3 12 x2 x 1
3 ln x + C ,

1 2x
7. 5e (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
R R
f (x) f (x)dx f (x) f (x)dx
n xn+1 n 0 [g(x)]n+1
x n+1 (n 6= 1) [g (x)] g (x) n+1 (n 6= 1)
1 g 0 (x)
x ln |x| g(x) ln |g (x)|
x ax
e ex a x
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
cosec x ln tan x2 cosech x ln tanh x2
sec x ln |sec x + tan x| sech x 2 tan1 ex
sec2 x tan x sech2 x tanh x
cot x ln |sin x| coth x ln |sinh x|
sin2 x x
2
sin 2x
4 sinh2 x sinh 2x
4 x2
cos2 x x
2 + sin 2x
4 cosh2 x sinh 2x
4 + x2

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

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

1 1
tan1 x 1 1 a+x
a2 +x2 a a a2 x2 2a ln ax (0 < |x| < a)

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


2 2
1 sin1 x 1 ln x+ aa +x (a > 0)

a2 x2 a a2 +x2

2 2
(a < x < a) 1 ln x+ xa a (x > a > 0)

x2 a2

a2
a2
h i
sinh1 x a2 +x2
 1 x
 x

a2 x2 2 sin a a2 +x2 2 a + a2

i h i
a2
a2 x2
cosh1
2 2
+x x
+ x xa2a

a2 x2 a2 2 a

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 Z
dv 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 constant of integration.
Return to Exercise 1

Toc JJ II J I Back
Solutions to exercises 15

Exercise 2.
Z Z
2 2
x sin x dx = x ( 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
2
= x 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 e dx = x e (1) ex dx, i.e. take u = x
x x

du
giving =1
dx
dv
and take = ex
dx
giving v = ex ,
Z
x
= xe ex dx

= 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 Z
2 1 4x 1
x e dx = x e 2x e4x dx ,
2 4x
4 4
i.e. take u = x2
du
= 2x
dx
dv
= e4x
dx
1
v = e4x ,
Z 4
1 1
= x2 e4x x e4x dx
4 2
| {z }
, now use integration by parts again

Toc JJ II J I Back
Solutions to exercises 19

 Z 
1 2 4x 1 1 1
= x e x e4x 1 e4x dx ,
4 2 4 4
i.e. this time u = x
du
=1
dx
dv
= e4x
dx
1
v = e4x ,
  Z 4
1 2 4x 1 4x 1 1
= x e xe e4x dx
4 8 2 4
Z
1 1 4x 1
= x2 e4x xe + e4x dx
4 8 8
1 1 4x 1 1 4x
= x2 e4x xe + e +C
4 8 8 4

Toc JJ II J I Back
Solutions to exercises 20

8 2 4x 4 1
= x e x e4x + e4x + C
32 32 32
1 4x
8x2 4x + 1 + C .

= e
32
Return to Exercise 4

Toc JJ II J I Back
Solutions to exercises 21

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

Exercise 6.

Z   Z
2 1 3 1 1 3
(x + 1) ln 3x dx = (ln 3x) (x + 1) (3) (x + 1) dx
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 chain rule, and dx = (x + 1) gives v = 1 3 ,

where we have used the result that if


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

Toc JJ II J I Back
Solutions to exercises 23

Z Z 3
2 1 3 1 (x + 1)
(x + 1) ln 3x dx = (x + 1) ln 3x dx
3 3 x
Z 3
1 3 1 x + 3x2 + 3x + 1
= (x + 1) ln 3x dx ,
3 3 x
where we have used the binomial theorem,
3
or just multiplied out (x + 1) ,
Z
1 3 1 1
= (x + 1) ln 3x x2 + 3x + 3 + dx
3 3 x
 3 
1 3 1 x 3
= (x + 1) ln 3x + x2 + 3x + ln x +C
3 3 3 2
3
1 3 x 1 1
= (x + 1) 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

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

Let I = e2x cos x dx , since we will eventually get I on the right-


R

hand-side for this type of integral

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


R

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


R

dv
Use integration by parts again, with u = e2x 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) 2e2x ( cos x) dx
R

i.e. I = e2x sin x 2 e2x cos x + 2 e2x cos x dx
R
Z
i.e. I = e sin x + 2e cos x 4 e2x cos dx
2x 2x

| {z }
=4I

i.e. 5I = e2x sin x + 2e2x cos x + C1


I = 15 e2x (sin x + 2 cos x) + C , where C = 15 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
arbitrary constants arising from each du
R
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
ex sin 4x dx. u = ex , giving = ex ,
dx
dv 1
= sin 4x, giving v = ( cos 4x)
dx 4
1
i.e. v = cos 4x ,
4

Z
Let I= ex sin 4x dx
  Z  
x 1 x
 1
i.e. I = e cos 4x e cos 4x dx
4 4

Toc JJ II J I Back
Solutions to exercises 27
Z
i.e. I = 14 ex cos 4x 1
4 ex cos 4x dx
| {z }

u = ex , du
dx = ex
dv 1
dx = cos 4x , v= 4 sin 4x ,

i.e. I = 14 ex cos 4x 14 ex 1
sin 4x (ex ) 1
  R 
4 4 sin 4x dx

Toc JJ II J I Back
Solutions to exercises 28

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

Toc JJ II J I Back
Solutions to exercises 29

Exercise 9.
Z1/2   1/2 Z1/2  
2x 1 2x 1 2x
xe dx = x e 1 e dx, i.e. u = x
2 0 2
0 0
du
=1
dx
dv
= e2x
dx
1
v = e2x ,
2
Z1/2
1  2x 1/2 1
= xe 0 e2x dx
2 2
0
 1/2
1  2x 1/2 1 1 2x
= xe 0 e
2 2 2 0

Toc JJ II J I Back
Solutions to exercises 30

 
11 2 1 1 h 2 1 i
= e 2 0.e0 e 2 e0
22 4
11 1 1 1 1 0
= e e + e
22 4 4
1 0 1
=0+ e = .
4 4
Return to Exercise 9

Toc JJ II J I Back
Solutions to exercises 31

Exercise 10.
Z/4   /4 Z/4  
1 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 Z/4
1 1
= 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 /4 1 /4
= [x cos 2x]0 + [sin 2x]0
2 4
1 n o 1n 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 logarithm function is involved then


we choose that factor to be u.
Z1   5 1 Z1    5 
4 x 1 x
i.e. x ln 2x dx = (ln 2x) dx
5 1/2 x 5
1/2 1/2

Z1
1 5 1 1
= x ln 2x 1/2 x4 dx
5 5
1/2
 1
1 5 1 1 x5
= x ln 2x 1/2
5 5 5 1/2
1 5
 1 1  5 1
= x ln 2x 1/2 x 1/2
5( 25 ) (
 5  5 )
1 1 1 1
= (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
R the limits to the final result. We will do that here. So, to work
out 0 3x2 cos x2 dx, we will consider the indefinite integral first:


Z ! !
x 1 x Z 1 x
3x2 cos dx = 3x2 1
 sin 6x 1 sin 2
 dx
2 2
2 2
x Z x
= 6x2 sin 12 x sin dx
2 2
(use integration by parts, again)
x    x  Z x 
2
= 6x 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  x i
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 n   o2
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
x e dx = x e 3x2 ex dx
3 x 3 x

 Z 
3 x 2 x x
= x e 3 x e 2xe dx , using integration by parts,
Z
= x3 ex 3x2 ex + 6 xex dx
 Z 
= x3 ex 3x2 ex + 6 xex ex dx ,using integration by parts,

= x3 ex 3x2 ex + 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 
3x 3x 3x
= e sin x 3 e ( cos x) 3e ( cos x) dx
Z
= e3x sin x + 3e3x cos x 9 e3x cos x dx

= e3x sin x + 3e3x cos x 9I


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

Toc JJ II J I Back

You might also like