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
q Table of contents
q 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 dierentiate a product of two functions of x, one uses the product
rule:
d
dx
(uv) = u
dv
dx
+
du
dx
v
where u = u(x) and v = v (x) are two functions of x. A slight
rearrangement of the product rule gives
u
dv
dx
=
d
dx
(uv)
du
dx
v
Now, integrating both sides with respect to x results in
_
u
dv
dx
dx = uv
_
du
dx
v 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
be
dv
dx
(on the right-hand-side only v appears i.e. the other factor
integrated with respect to x).
Toc
Back
Section 2: Usage 4
2. Usage
We highlight here four dierent types of products for which integration
by parts can be used (as well as which factor to label u and which one
to label
dv
dx
). These are:
(i)
_
x
n

_
_
_
sinbx
or
cos bx
_
_
_
dx (ii)
_
x
n
e
ax
dx

u
dv
dx
u
dv
dx
(iii)
_
x
r
ln(ax) dx (iv)
_
e
ax

_
_
_
sinbx
or
cos bx
_
_
_
dx

dv
dx
u u
dv
dx
where a, b and r are given constants and n is a positive integer.
Toc
Back
Section 3: Exercises 5
3. Exercises
Click on Exercise links for full worked solutions (there are 14 exer-
cises in total)
Exercise 1.
_
xcos x dx
Exercise 2.
_
x
2
sinx dx
Exercise 3.
_
xe
x
dx
Exercise 4.
_
x
2
e
4x
dx
Exercise 5.
_
x
2
lnx dx
q Theory q Integrals q Final solutions q Tips q Notation
Toc
Back
Section 3: Exercises 6
Exercise 6.
_
(x + 1)
2
ln3x dx
Exercise 7.
_
e
2x
cos x dx
Exercise 8.
_
e
x
sin4x dx
Exercise 9.
1/2
_
0
xe
2x
dx
Exercise 10.
/4
_
0
xsin2x dx
q Theory q Integrals q Final solutions q Tips q Notation
Toc
Back
Section 3: Exercises 7
Exercise 11.
1
_
1/2
x
4
ln2x dx
Exercise 12.

_
0
3x
2
cos
_
x
2
_
dx
Exercise 13.
_
x
3
e
x
dx
Exercise 14.
_
e
3x
cos x dx
q Theory q Integrals q Final solutions q Tips q Notation
Toc
Back
Section 4: Final solutions 8
4. Final solutions
1. xsinx + cos x + C ,
2. x
2
cos x + 2xsinx + 2 cos x + C ,
3. (x 1) e
x
+ C ,
4.
1
32
e
4x
_
8x
2
4x + 1
_
+ C ,
5.
1
9
x
3
(3 lnx 1) + C ,
6.
1
3
(x + 1)
3
ln3x
1
9
x
3

1
2
x
2
x
1
3
lnx + C ,
7.
1
5
e
2x
(sinx + 2 cos x) + C ,
Toc
Back
Section 4: Final solutions 9
8.
1
17
e
x
(4 cos 4x sin4x) + C ,
9.
1
4
,
10.
1
4
,
11.
1
5
ln2
31
800
,
12. 6
_

2
8
_
,
13. e
x
_
x
3
3x
2
+ 6x 6
_
+ C ,
14.
1
10
e
3x
(sinx + 3 cos x) + C .
Toc
Back
Section 5: Standard integrals 10
5. Standard integrals
f (x)
_
f(x)dx f (x)
_
f(x)dx
x
n x
n+1
n+1
(n = 1) [g (x)]
n
g

(x)
[g(x)]
n+1
n+1
(n = 1)
1
x
ln|x|
g

(x)
g(x)
ln|g (x)|
e
x
e
x
a
x a
x
ln a
(a > 0)
sinx cos x sinhx coshx
cos x sinx coshx sinhx
tanx ln|cos x| tanhx lncoshx
cosec x ln

tan
x
2

cosechx ln

tanh
x
2

sec x ln|sec x + tanx| sechx 2 tan


1
e
x
sec
2
x tanx sech
2
x tanhx
cot x ln|sinx| cothx ln|sinhx|
sin
2
x
x
2

sin 2x
4
sinh
2
x
sinh 2x
4

x
2
cos
2
x
x
2
+
sin 2x
4
cosh
2
x
sinh 2x
4
+
x
2
Toc
Back
Section 5: Standard integrals 11
f (x)
_
f (x) dx f (x)
_
f (x) dx
1
a
2
+x
2
1
a
tan
1 x
a
1
a
2
x
2
1
2a
ln

a+x
ax

(0<|x| <a)
(a > 0)
1
x
2
a
2
1
2a
ln

xa
x+a

(|x| > a>0)


1

a
2
x
2
sin
1 x
a
1

a
2
+x
2
ln

x+

a
2
+x
2
a

(a > 0)
(a < x < a)
1

x
2
a
2
ln

x+

x
2
a
2
a

(x>a>0)

a
2
x
2
a
2
2
_
sin
1
_
x
a
_
a
2
+x
2
a
2
2
_
sinh
1
_
x
a
_
+
x

a
2
+x
2
a
2
_
+
x

a
2
x
2
a
2
_

x
2
a
2
a
2
2
_
cosh
1
_
x
a
_
+
x

x
2
a
2
a
2
_
Toc
Back
Section 6: Tips on using solutions 12
6. Tips on using solutions
q 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
q 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
q Try to make less use of the full solutions as you work your way
through the Tutorial
Toc
Back
Section 7: Alternative notation 13
7. Alternative notation
In this Tutorial, we express the rule for integration by parts using the
formula:
_
u
dv
dx
dx = uv
_
du
dx
v dx
But you may also see other forms of the formula, such as:
_
f(x)g(x)dx = F(x)g(x)
_
F(x)
dg
dx
dx
where
dF
dx
= f(x)
Of course, this is simply dierent notation for the same rule. To see
this, make the identications: u = g(x) and v = F(x).
Toc
Back
Solutions to exercises 14
Full worked solutions
Exercise 1. We evaluate by integration by parts:
_
xcos xdx = x sinx
_
(1) sinxdx, i.e. take u = x
giving
du
dx
= 1 (by dierentiation)
and take
dv
dx
= cos x
giving v = sinx (by integration),
= xsinx
_
sinxdx
= xsinx (cos x) + C, where C is an arbitrary
= xsinx + cos x + C constant of integration.
Return to Exercise 1
Toc
Back
Solutions to exercises 15
Exercise 2.
_
x
2
sinxdx = x
2
(cos x)
_
(2x) (cos x) dx ,
i.e. take u = x
2
giving
du
dx
= 2x
and take
dv
dx
= sinx
giving v = cos x ,
= x
2
cos x + 2
_
xcos xdx
. .
we need to use integration
by parts again!
Toc
Back
Solutions to exercises 16
= x
2
cos x + 2
_
xsinx
_
(1) sinxdx
_
,
as in question 1,
= x
2
cos x + 2xsinx 2
_
sinxdx
= x
2
cos x + 2xsinx 2 (cos x) + C
= x
2
cos x + 2xsinx + 2 cos x + C .
Return to Exercise 2
Toc
Back
Solutions to exercises 17
Exercise 3.
_
xe
x
dx = x e
x

_
(1) e
x
dx, i.e. take u = x
giving
du
dx
= 1
and take
dv
dx
= e
x
giving v = e
x
,
= xe
x

_
e
x
dx
= xe
x
e
x
+ C
= (x 1) e
x
+ C .
Return to Exercise 3
Toc
Back
Solutions to exercises 18
Exercise 4.
_
x
2
e
4x
dx = x
2

1
4
e
4x

_
2x
1
4
e
4x
dx ,
i.e. take u = x
2
du
dx
= 2x
dv
dx
= e
4x
v =
1
4
e
4x
,
=
1
4
x
2
e
4x

1
2
_
xe
4x
dx
. .
now use integration by parts again
Toc
Back
Solutions to exercises 19
=
1
4
x
2
e
4x

1
2
_
x
1
4
e
4x

_
1
1
4
e
4x
dx
_
,
i.e. this time u = x
du
dx
= 1
dv
dx
= e
4x
v =
1
4
e
4x
,
=
1
4
x
2
e
4x

1
8
xe
4x

1
2

_

1
4
_

_
e
4x
dx
=
1
4
x
2
e
4x

1
8
xe
4x
+
1
8
_
e
4x
dx
=
1
4
x
2
e
4x

1
8
xe
4x
+
1
8

1
4
e
4x
+ C
Toc
Back
Solutions to exercises 20
=
8
32
x
2
e
4x

4
32
xe
4x
+
1
32
e
4x
+ C
=
1
32
e
4x
_
8x
2
4x + 1
_
+ C .
Return to Exercise 4
Toc
Back
Solutions to exercises 21
Exercise 5.
_
x
2
lnxdx = (lnx)
_
1
3
x
3
_

_
1
x

_
1
3
x
3
_
dx , i.e. u = lnx
du
dx
=
1
x
dv
dx
= x
2
v =
1
3
x
3
,
=
1
3
x
3
lnx
1
3
_
x
2
dx
=
1
3
x
3
lnx
1
3

_
1
3
x
3
_
+ C
=
1
3
x
3
lnx
1
9
x
3
+ C
=
1
9
x
3
(3 lnx 1) + C .
Return to Exercise 5
Toc
Back
Solutions to exercises 22
Exercise 6.
_
(x + 1)
2
ln3xdx = (ln3x)
_
1
3
_
(x + 1)
3

_
1
3x
(3)
1
3
(x + 1)
3
dx
i.e. u = ln 3x gives
du
dx
=
1
3x

d
dx
(3x) =
1
3x
(3),
using the chain rule, and
dv
dx
= (x + 1)
2
gives v =
1
1

(x+1)
3
3
,
where we have used the result that if
dv
dx
= (ax + b)
n
then v =
1
a
(ax+b)
n+1
(n+1)
,
Toc
Back
Solutions to exercises 23

_
(x + 1)
2
ln3xdx =
1
3
(x + 1)
3
ln3x
1
3
_
(x + 1)
3
x
dx
=
1
3
(x + 1)
3
ln3x
1
3
_
x
3
+ 3x
2
+ 3x + 1
x
dx,
where we have used the binomial theorem,
or just multiplied out (x + 1)
3
,
=
1
3
(x + 1)
3
ln3x
1
3
_
x
2
+ 3x + 3 +
1
x
dx
=
1
3
(x + 1)
3
ln3x
1
3
_
x
3
3
+
3
2
x
2
+ 3x + lnx
_
+C
=
1
3
(x + 1)
3
ln3x
x
3
9

1
2
x
2
x
1
3
lnx+C .
Return to Exercise 6
Toc
Back
Solutions to exercises 24
Exercise 7.
_
e
2x
cos xdx
Set u = e
2x
and
dv
dx
= cos x , to give
du
dx
= 2e
2x
and v = sinx.
Let I =
_
e
2x
cos x dx , since we will eventually get I on the right-
hand-side for this type of integral
i.e. I = e
2x
sinx
_
2e
2x
sinxdx
i.e. I = e
2x
sinx 2
_
e
2x
sinxdx.
Use integration by parts again, with u = e
2x
and
dv
dx
= sinx , giving
du
dx
= 2e
2x
and v = cos x
Toc
Back
Solutions to exercises 25
i.e. I = e
2x
sinx 2
_
e
2x
(cos x)
_
2e
2x
(cos x) dx
_
i.e. I = e
2x
sinx 2
_
e
2x
cos x + 2
_
e
2x
cos xdx
_
i.e. I = e
2x
sinx + 2e
2x
cos x 4
_
e
2x
cos dx
. .
=4I
i.e. 5I = e
2x
sinx + 2e
2x
cos x + C
1
I =
1
5
e
2x
(sinx + 2 cos x) + C , where C =
1
5
C
1
(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
dx
v dx (indenite) integra-
tion and these would add up to give a single arbitrary constant in the
nal answer. Return to Exercise 7
Toc
Back
Solutions to exercises 26
Exercise 8.
_
e
x
sin4xdx. u = e
x
, giving
du
dx
= e
x
,
dv
dx
= sin4x, giving v =
1
4
(cos 4x)
i.e. v =
1
4
cos 4x ,
Let I =
_
e
x
sin4xdx
i.e. I = e
x

1
4
cos 4x
_

_
_
e
x
_

1
4
cos 4x
_
dx
Toc
Back
Solutions to exercises 27
i.e. I =
1
4
e
x
cos 4x
1
4
_
e
x
cos 4xdx
. .

u = e
x
,
du
dx
= e
x
dv
dx
= cos 4x , v =
1
4
sin4x ,
i.e. I =
1
4
e
x
cos 4x
1
4
_
e
x

_
1
4
sin4x
_

_
(e
x
)
_
1
4
sin4x
_
dx
_
Toc
Back
Solutions to exercises 28
I =
1
4
e
x
cos 4x
1
4
_
1
4
e
x
sin4x +
1
4
_
e
x
sin4xdx
_
i.e. I =
1
4
e
x
cos 4x
1
16
e
x
sin4x
1
16
I
i.e.
_
1 +
1
16
_
I =
1
4
e
x
cos 4x
1
16
e
x
sin4x
_
17
16
_
I =
1
4
e
x
cos 4x
1
16
e
x
sin4x
i.e. I =
4
17
e
x
cos 4x
1
17
e
x
sin4x
=
1
17
e
x
(4 cos 4x sin4x) + C .
Return to Exercise 8
Toc
Back
Solutions to exercises 29
Exercise 9.
1/2
_
0
xe
2x
dx =
_
x
_
1
2
e
2x
__
1/2
0

1/2
_
0
1
_
1
2
e
2x
_
dx, i.e. u = x
du
dx
= 1
dv
dx
= e
2x
v =
1
2
e
2x
,
=
1
2
_
xe
2x

1/2
0

1
2
1/2
_
0
e
2x
dx
=
1
2
_
xe
2x

1/2
0

1
2
_
1
2
e
2x
_
1/2
0
Toc
Back
Solutions to exercises 30
=
1
2
_
1
2
e
2
1
2
0.e
0
_

1
4
_
e
2
1
2
e
0
_
=
1
2

1
2
e
1

1
4
e
1
+
1
4
e
0
= 0 +
1
4
e
0
=
1
4
.
Return to Exercise 9
Toc
Back
Solutions to exercises 31
Exercise 10.
/4
_
0
xsin2xdx =
_
x
_

1
2
cos 2x
__
/4
0

/4
_
0
1.
_

1
2
cos 2x
_
dx,
u = x
dv
dx
= sin2x
du
dx
= 1
v =
1
2
cos 2x ,
=
_

1
2
xcos 2x
_
/4
0
+
1
2
/4
_
0
cos 2xdx
Toc
Back
Solutions to exercises 32
=
1
2
[xcos 2x]
/4
0
+
1
2
_
1
2
sin2x
_
/4
0
=
1
2
[xcos 2x]
/4
0
+
1
4
[sin2x]
/4
0
=
1
2
_

4
cos

2
0 cos 0
_
+
1
4
_
sin

2
sin0
_
=
1
2
{0 0} +
1
4
{1 0} , since cos

2
= 0,
=
1
4
. sin

2
= 1,
and sin0 = 0,
Return to Exercise 10
Toc
Back
Solutions to exercises 33
Exercise 11. Note that if a logarithm function is involved then
we choose that factor to be u.
i.e.
1
_
1/2
x
4
ln2xdx =
_
(ln2x)
_
x
5
5
__
1
1/2

1
_
1/2
_
1
x
_

_
x
5
5
_
dx
=
1
5
_
x
5
ln2x

1
1/2

1
5
1
_
1/2
x
4
dx
=
1
5
_
x
5
ln2x

1
1/2

1
5
_
x
5
5
_
1
1/2
=
1
5
_
x
5
ln2x

1
1/2

1
25
_
x
5

1
1/2
=
1
5
_
(1 ln2)
_
1
2
_
5
ln1
_

1
25
_
1
5

_
1
2
_
5
_
Toc
Back
Solutions to exercises 34
=
1
5
ln2
1
25
_
1
1
32
_
, since ln1 = 0 and 2
5
= 32,
=
1
5
ln2
1
25

31
32
=
1
5
ln2
31
800
.
Return to Exercise 11
Toc
Back
Solutions to exercises 35
Exercise 12. For denite integrals, we can either use integration by
parts in the form:
_
b
a
u
dv
dx
dx = [uv]
b
a

_
b
a
du
dx
v dx
or we can work out
_
u
dv
dx
dx, i.e. without the limits, rst and then
apply the limits to the nal result. We will do that here. So, to work
out
_

0
3x
2
cos
_
x
2
_
dx, we will consider the indenite integral rst:
_
3x
2
cos
_
x
2
_
dx = 3x
2
_
1
_
1
2
_
_
sin
_
x
2
_

_
6x
_
1
_
1
2
_
sin
_
x
2
_
_
dx
= 6x
2
sin
_
x
2
_
12
_
xsin
_
x
2
_
dx
(use integration by parts, again)
= 6x
2
sin
_
x
2
_
12
_
x
_
2 cos
_
x
2
__

_
2 cos
_
x
2
_
dx
_
Toc
Back
Solutions to exercises 36
= 6x
2
sin
_
x
2
_
12
_
2xcos
_
x
2
_
+2
_
cos
_
x
2
_
dx
_
i.e.
_
3x
2
cos
_
x
2
_
dx = 6x
2
sin
_
x
2
_
+ 24xcos
_
x
2
_
24
_
cos
_
x
2
_
dx
= 6x
2
sin
_
x
2
_
+ 24xcos
_
x
2
_
24 2 sin
_
x
2
_
+ C.
On the next page, we will evaluate the denite integral . . .
Toc
Back
Solutions to exercises 37
So,
_

0
3x
2
cos
_
x
2
_
dx =
_
6x
2
sin
_
x
2
_
+ 24xcos
_
x
2
_
48 sin
_
x
2
__

0
=
_
6
2
sin
_

2
_
0
_
+24
_
cos
_

2
_
0
_
48
_
sin
_

2
_
0
_
,
since sin0 = 0,
= 6
2
48, since sin
_

2
_
= 1 and cos
_

2
_
= 0,
= 6
_

2
8
_
.
Return to Exercise 12
Toc
Back
Solutions to exercises 38
Exercise 13.
_
x
3
e
x
dx = x
3
e
x

_
3x
2
e
x
dx
= x
3
e
x
3
_
x
2
e
x

_
2xe
x
dx
_
, using integration by parts, again
= x
3
e
x
3x
2
e
x
+ 6
_
xe
x
dx
= x
3
e
x
3x
2
e
x
+ 6
_
xe
x

_
e
x
dx
_
,using integration by parts, again,
= x
3
e
x
3x
2
e
x
+ 6xe
x
6e
x
+ C
= e
x
_
x
3
3x
2
+ 6x 6
_
+ C.
Return to Exercise 13
Toc
Back
Solutions to exercises 39
Exercise 14.
Let I =
_
e
3x
cos xdx
= e
3x
sinx
_
3e
3x
sinx dx
= e
3x
sinx 3
_
e
3x
sinxdx
= e
3x
sinx 3
_
e
3x
(cos x)
_
3e
3x
(cos x) dx
_
= e
3x
sinx + 3e
3x
cos x 9
_
e
3x
cos x dx
= e
3x
sinx + 3e
3x
cos x 9I
i.e. 10I = e
3x
sinx + 3e
3x
cos x + C
1
i.e. I =
1
10
e
3x
(sinx + 3 cos x) + C, where C =
C
1
10
.
Return to Exercise 14
Toc
Back

You might also like