You are on page 1of 26

# FIRST YEAR CALCULUS

W W L CHEN
c W W L Chen, 1994, 2008.
This chapter is available free to all individuals, on the understanding that it is not to be used for nancial gain,
and may be downloaded and/or photocopied, with or without permission from the author.
However, this document may not be kept on any information storage and retrieval system without permission
from the author, unless such system is not accessible to any individuals other than its owners.
Chapter 10
TECHNIQUES OF INTEGRATION
10.1. Integration by Substitution
In this section, we discuss how we can use the Chain rule in dierentiation to help solve problems in
integration. This technique is usually called integration by substitution. As we shall not prove any result
here, our discussion will be only heuristic.
We emphasize that the technique does not always work. First of all, we have little or no knowledge of
the antiderivatives of many functions. Secondly, there is no simple routine that we can describe to help
us nd a suitable substitution even in the cases where the technique works. On the other hand, when
the technique does work, there may well be more than one suitable substitution!
Occasionally, the possibility of substitution may not be immediately obvious, and a certain amount of
trial and error does occur. The fact that one substitution does not appear to work does not mean that
the method fails. It may very well be the case that we have used a bad substitution.
INTEGRATION BY SUBSTITUTION VERSION 1. If we make a substitution x = g(u), then
dx = g

## (u) du, and

_
f(x) dx =
_
f(g(u))g

(u) du.
Example 10.1.1. Consider the indenite integral
_
1

1 x
2
dx.
If we make a substitution x = sinu, then dx = cos udu, and
_
1

1 x
2
dx =
_
cos u
_
1 sin
2
u
du =
_
du = u + C = sin
1
x + C.
Chapter 10 : Techniques of Integration page 1 of 26
First Year Calculus c W W L Chen, 1994, 2008
On the other hand, if we make a substitution x = cos v, then dx = sinv dv, and
_
1

1 x
2
dx =
_
sinv

1 cos
2
v
dv =
_
dv = v + C = cos
1
x + C.
Example 10.1.2. Consider the indenite integral
_
1
1 + x
2
dx.
If we make a substitution x = tanu, then dx = sec
2
udu, and
_
1
1 + x
2
dx =
_
sec
2
u
1 + tan
2
u
du =
_
du = u + C = tan
1
x + C.
On the other hand, if we make a substitution x = cot v, then dx = csc
2
v dv, and
_
1
1 + x
2
dx =
_
csc
2
v
1 + cot
2
v
dv =
_
dv = v + C = cot
1
x + C.
Example 10.1.3. Consider the indenite integral
_
x

x + 1 dx.
If we make a substitution x = u
2
1, then dx = 2udu, and
_
x

x + 1 dx =
_
2(u
2
1)u
2
du = 2
_
u
4
du 2
_
u
2
du
=
2
5
u
5

2
3
u
3
+ C =
2
5
(x + 1)
5/2

2
3
(x + 1)
3/2
+ C.
On the other hand, if we make a substitution x = v 1, then dx = dv, and
_
x

x + 1 dx =
_
(v 1)v
1/2
dv =
_
v
3/2
dv
_
v
1/2
dv
=
2
5
v
5/2

2
3
v
3/2
+ C =
2
5
(x + 1)
5/2

2
3
(x + 1)
3/2
+ C.
We can conrm that the indenite integral is correct by checking that
d
dx
_
2
5
(x + 1)
5/2

2
3
(x + 1)
3/2
+ C
_
= x

x + 1.
INTEGRATION BY SUBSTITUTION VERSION 2. Suppose that a function f(x) can be
written in the form f(x) = g(h(x))h

## (x) dx, and

_
f(x) dx =
_
g(h(x))h

(x) dx =
_
g(u) du.
Remark. Note that in Version 1, the variable x is initially written as a function of the new variable u,
whereas in Version 2, the new variable u is written as a function of x. The dierence, however, is
minimal, as the substitution x = g(u) in Version 1 has to be invertible to enable us to return from the
new variable u to the original variable x at the end of the process.
Chapter 10 : Techniques of Integration page 2 of 26
First Year Calculus c W W L Chen, 1994, 2008
Example 10.1.4. Consider the indenite integral
_
x
2
e
x
3
dx.
Note rst of all that the derivative of the function x
3
is equal to 3x
2
, so it is convenient to make the
substitution u = x
3
. Then du = 3x
2
dx, and
_
x
2
e
x
3
dx =
1
3
_
3x
2
e
x
3
dx =
1
3
_
e
u
du =
1
3
e
u
+ C =
1
3
e
x
3
+ C.
A somewhat more complicated alternative is to note that the derivative of the function e
x
3
is equal to
3x
2
e
x
3
, so it is convenient to make the substitution v = e
x
3
. Then dv = 3x
2
e
x
3
dx, and
_
x
2
e
x
3
dx =
1
3
_
3x
2
e
x
3
dx =
1
3
_
dv =
1
3
v + C =
1
3
e
x
3
+ C.
Example 10.1.5. Consider the indenite integral
_
x(x
2
+ 3)
4
dx.
Note rst of all that the derivative of the function x
2
+ 3 is equal to 2x, so it is convenient to make the
substitution u = x
2
+ 3. Then du = 2xdx, and
_
x(x
2
+ 3)
4
dx =
1
2
_
2x(x
2
+ 3)
4
dx =
1
2
_
u
4
du =
1
10
u
5
+ C =
1
10
(x
2
+ 3)
5
+ C.
Example 10.1.6. Consider the indenite integral
_
1
xlog x
dx.
Note rst of all that the derivative of the function log x is equal to 1/x, so it is convenient to make the
substitution u = log x. Then du = (1/x) dx, and
_
1
xlog x
dx =
_
1
u
du = log |u| + C = log | log x| + C.
Example 10.1.7. Consider the indenite integral
_
tan
3
xsec
2
xdx.
Note rst of all that the derivative of the function tanx is equal to sec
2
x, so it is convenient to make
the substitution u = tanx. Then du = sec
2
xdx, and
_
tan
3
xsec
2
xdx =
_
u
3
du =
1
4
u
4
+ C =
1
4
tan
4
x + C.
Chapter 10 : Techniques of Integration page 3 of 26
First Year Calculus c W W L Chen, 1994, 2008
Example 10.1.8. Consider the indenite integral
_
sin
3
xcos
3
xdx.
Note rst of all that the derivative of the function sinx is equal to cos x, so it is perhaps convenient to
make the substitution u = sinx. Then du = cos xdx, and
_
sin
3
xcos
3
xdx =
_
u
3
(1 u
2
) du =
_
(u
3
u
5
) du =
u
4
4

u
6
6
+ C =
sin
4
x
4

sin
6
x
6
+ C.
Alternatively, note that the derivative of the function cos x is equal to sinx, so it is convenient to make
the substitution v = cos x. Then dv = sinxdx, and
_
sin
3
xcos
3
xdx =
_
(1 v
2
)v
3
dv =
_
(v
5
v
3
) dv =
v
6
6

v
4
4
+ C

=
cos
6
x
6

cos
4
x
4
+ C

.
It can be checked that
sin
4
x
4

sin
6
x
6
=
cos
6
x
6

cos
4
x
4
+
1
12
.
Example 10.1.9. Recall Example 10.1.1. Since
_
1

1 x
2
dx = sin
1
x + C,
we have
_
1/2
0
1

1 x
2
dx =
_
sin
1
x
_
1/2
0
= sin
1
1
2
sin
1
0 =

6
.
Note that we have in fact used the substitution x = sinu to show that
_
1

1 x
2
dx =
_
du = u + C,
followed by an inverse substitution u = sin
1
x. Here, we need to make the extra step of substituting the
values x = 0 and x = 1/2 to the indenite integral sin
1
x. Observe, however, that with the substitution
x = sinu, the variable x increases from 0 to 1/2 as the variable u increases from 0 to /6. But then
_
/6
0
du =
_
u
_
/6
0
=

6
=
_
1/2
0
1

1 x
2
dx,
so it appears that we do not need the inverse substitution u = sin
1
x. Perhaps we can directly substitute
u = 0 and u = /6 to the indenite integral u.
DEFINITE INTEGRAL BY SUBSTITUTION VERSION 1. Suppose that a substitution
x = g(u) satises the following conditions:
(a) There exist , R such that g() = A and g() = B.
(b) The derivative g

Then dx = g

## (u) du, and

_
B
A
f(x) dx =
_

f(g(u))g

(u) du.
Chapter 10 : Techniques of Integration page 4 of 26
First Year Calculus c W W L Chen, 1994, 2008
Remark. If condition (b) above is replaced by the condition that the derivative g

## (u) < 0 for every u

satisfying < u < , then the same conclusion holds if we adopt the convention that
_

f(g(u))g

(u) du =
_

f(g(u))g

(u) du.
Example 10.1.10. To calculate the denite integral
_
1
0
1
1 + x
2
dx,
we can use the substitution x = tanu, so that dx = sec
2
udu. Note that tan0 = 0 and tan(/4) = 1,
and that sec
2
u > 0 whenever 0 < u < /4. It follows that
_
1
0
1
1 + x
2
dx =
_
/4
0
sec
2
u
1 + tan
2
u
du =
_
/4
0
du =
_
u
_
/4
0
=

4
0 =

4
.
We can compare this to rst observing Example 10.1.2, so that
_
1
0
1
1 + x
2
dx =
_
tan
1
x
_
1
0
= tan
1
1 tan
1
0 =

4
0 =

4
.
Example 10.1.11. To calculate the denite integral
_
3
0
x

x + 1 dx,
we can use the substitution x = g(u) = u
2
1, so that dx = 2udu. Note that g(1) = 0 and g(2) = 3,
and that g

## (u) = 2u > 0 whenever 1 < u < 2. It follows that

_
3
0
x

x + 1 dx =
_
2
1
2(u
2
1)u
2
du =
_
2
5
u
5

2
3
u
3
_
2
1
=
_
64
5

16
3
_

_
2
5

2
3
_
=
62
5

14
3
=
116
15
.
DEFINITE INTEGRAL BY SUBSTITUTION VERSION 2. Suppose that a substitution
u = h(x) satises the following conditions:
(a) There exists a function g(u) such that f(x) = g(h(x))h

## (x) for every x [A, B].

(b) The derivative h

Then du = h

## (x) dx, and

_
B
A
f(x) dx =
_
B
A
g(h(x))h

(x) dx =
_
h(B)
h(A)
g(u) du.
Remark. If condition (b) above is replaced by the condition that the derivative h

## (x) < 0 for every x

satisfying A < x < B, then the same conclusion holds if we adopt the convention that
_
h(B)
h(A)
g(u) du =
_
h(A)
h(B)
g(u) du.
Chapter 10 : Techniques of Integration page 5 of 26
First Year Calculus c W W L Chen, 1994, 2008
Example 10.1.12. To calculate the denite integral
_
1
0
x(x
2
+ 3)
4
dx,
we can use the substitution u = h(x) = x
2
+ 3, so that du = 2xdx. Note that h(0) = 3 and h(1) = 4,
and that h

## (x) = 2x > 0 whenever 0 < x < 1. It follows that

_
1
0
x(x
2
+ 3)
4
dx =
1
2
_
4
3
u
4
dx =
1
2
_
u
5
5
_
4
3
=
1
2
_
1024
5

243
5
_
=
781
10
.
We can compare this to rst observing Example 10.1.4, so that
_
1
0
x(x
2
+ 3)
4
dx =
_
1
10
(x
2
+ 3)
5
_
1
0
=
1024
10

243
10
=
781
10
.
Example 10.1.13. To calculate the denite integral
_
4
2
1
xlog x
dx,
we can use the substitution u = h(x) = log x, so that du = h

## (x) = 1/x > 0 whenever

2 < x < 4. Note also that h(2) = log 2 and h(4) = log 4. It follows that
_
4
2
1
xlog x
dx =
_
log 4
log 2
1
u
du =
_
log |u|
_
log 4
log 2
= log log 4 log log 2 = log
_
log 4
log 2
_
= log 2.
10.2. Integration by Parts
Recall the Product rule for dierentiation, that
(uv)

= uv

+ vu

.
Integrating with respect to x, we obtain
_
(uv)

dx =
_
uv

dx +
_
vu

dx.
Now the indenite integral on the left hand side is of the form uv. Rewriting this equation, we have
_
uv

dx = uv
_
vu

dx. (1)
Equation (1) is called the formula for integration by parts for indenite integrals. It is very useful if the
indenite integral
_
vu

## dx is much easier to calculate than the indenite integral

_
uv

dx.
Example 10.2.1. Consider the indenite integral
_
xe
x
dx.
Writing u = x and v

= e
x
, we have
_
uv

dx =
_
xe
x
dx.
Chapter 10 : Techniques of Integration page 6 of 26
First Year Calculus c W W L Chen, 1994, 2008
Furthermore, v = e
x
and u

= 1. It follows that
uv
_
vu

dx = xe
x

_
e
x
dx = xe
x
e
x
+ C.
Hence
_
xe
x
dx = xe
x
e
x
+ C.
Example 10.2.2. Consider the indenite integral
_
log xdx.
Writing u = log x and v

= 1, we have
_
uv

dx =
_
log xdx.
Furthermore,
v = x and u

=
1
x
.
It follows that
uv
_
vu

dx = xlog x
_
x
1
x
dx = xlog x x + C.
Hence
_
log xdx = xlog x x + C.
Example 10.2.3. Consider the indenite integral
_
e
x
sinxdx.
Writing u = e
x
and v

= sinx, we have
_
uv

dx =
_
e
x
sinxdx.
Furthermore, v = cos x and u

= e
x
. It follows that
uv
_
vu

dx = e
x
cos x +
_
e
x
cos xdx.
Hence
_
e
x
sinxdx = e
x
cos x +
_
e
x
cos xdx. (2)
We now need to study the indenite integral
_
e
x
cos xdx.
Chapter 10 : Techniques of Integration page 7 of 26
First Year Calculus c W W L Chen, 1994, 2008
Writing u = e
x
and v

= cos x, we have
_
uv

dx =
_
e
x
cos xdx.
Furthermore, v = sinx and u

= e
x
. It follows that
uv
_
vu

dx = e
x
sinx
_
e
x
sinxdx.
Hence
_
e
x
cos xdx = e
x
sinx
_
e
x
sinxdx. (3)
It looks like we are back to the same old problem. However, if we combine (2) and (3), then we obtain
_
e
x
sinxdx = e
x
cos x + e
x
sinx
_
e
x
sinxdx,
so that
2
_
e
x
sinxdx = e
x
sinx e
x
cos x = e
x
(sinx cos x).
Adding an arbitrary constant, which we may in view of Proposition 9C, we have
_
e
x
sinxdx =
1
2
e
x
(sinx cos x) + C.
Example 10.2.4. Consider the indenite integral
_
x
3
cos xdx.
Writing u = x
3
and v

= cos x, we have
_
uv

dx =
_
x
3
cos xdx.
Furthermore, v = sinx and u

= 3x
2
. It follows that
uv
_
vu

dx = x
3
sinx 3
_
x
2
sinxdx.
Hence
_
x
3
cos xdx = x
3
sinx 3
_
x
2
sinxdx. (4)
We now need to study the indenite integral
_
x
2
sinxdx.
Writing u = x
2
and v

= sinx, we have
_
uv

dx =
_
x
2
sinxdx.
Chapter 10 : Techniques of Integration page 8 of 26
First Year Calculus c W W L Chen, 1994, 2008
Furthermore, v = cos x and u

## = 2x. It follows that

uv
_
vu

dx = x
2
cos x + 2
_
xcos xdx.
Hence
_
x
2
sinxdx = x
2
cos x + 2
_
xcos xdx. (5)
Combining (4) and (5), we have
_
x
3
cos xdx = x
3
sinx + 3x
2
cos x 6
_
xcos xdx. (6)
We now need to study the indenite integral
_
xcos xdx.
Writing u = x and v

= cos x, we have
_
uv

dx =
_
xcos xdx.
Furthermore, v = sinx and u

= 1. It follows that
uv
_
vu

dx = xsinx
_
sinxdx.
Hence
_
xcos xdx = xsinx
_
sinxdx. (7)
Combining (6) and (7), we have
_
x
3
cos xdx = x
3
sinx + 3x
2
cos x 6xsinx + 6
_
sinxdx
= x
3
sinx + 3x
2
cos x 6xsinx 6 cos x + C.
The technique is also valid for denite integrals, in view of the rst Fundamental theorem of integral
calculus. For denite integrals over the interval [A, B], we have
_
B
A
uv

dx =
_
uv
_
x=B
x=A

_
B
A
vu

dx. (8)
Equation (8) is called the formula for integration by parts for denite integrals.
Example 10.2.5. Consider the denite integral
_
/2
0
x
3
cos xdx.
Writing u = x
3
and v

= cos x, we have
_
/2
0
uv

dx =
_
/2
0
x
3
cos xdx.
Chapter 10 : Techniques of Integration page 9 of 26
First Year Calculus c W W L Chen, 1994, 2008
Furthermore, v = sinx and u

= 3x
2
. It follows that
_
uv
_
x=/2
x=0

_
/2
0
vu

dx =
_
x
3
sinx
_
/2
0
3
_
/2
0
x
2
sinxdx.
Hence
_
/2
0
x
3
cos xdx =
_
x
3
sinx
_
/2
0
3
_
/2
0
x
2
sinxdx =

3
8
3
_
/2
0
x
2
sinxdx. (9)
We now need to study the denite integral
_
/2
0
x
2
sinxdx.
Writing u = x
2
and v

= sinx, we have
_
/2
0
uv

dx =
_
/2
0
x
2
sinxdx.
Furthermore, v = cos x and u

## = 2x. It follows that

_
uv
_
x=/2
x=0

_
/2
0
vu

dx =
_
x
2
cos x
_
/2
0
+ 2
_
/2
0
xcos xdx.
Hence
_
/2
0
x
2
sinxdx =
_
x
2
cos x
_
/2
0
+ 2
_
/2
0
xcos xdx = 2
_
/2
0
xcos xdx. (10)
Combining (9) and (10), we have
_
/2
0
x
3
cos xdx =

3
8
6
_
/2
0
xcos xdx. (11)
We now need to study the denite integral
_
/2
0
xcos xdx.
Writing u = x and v

= cos x, we have
_
/2
0
uv

dx =
_
/2
0
xcos xdx.
Furthermore, v = sinx and u

= 1. It follows that
_
uv
_
x=/2
x=0

_
/2
0
vu

dx =
_
xsinx
_
/2
0

_
/2
0
sinxdx.
Hence
_
/2
0
xcos xdx =
_
xsinx
_
/2
0

_
/2
0
sinxdx =

2

_
/2
0
sinxdx. (12)
Chapter 10 : Techniques of Integration page 10 of 26
First Year Calculus c W W L Chen, 1994, 2008
Combining (11) and (12), we have
_
/2
0
x
3
cos xdx =

3
8
3 + 6
_
/2
0
sinxdx =

3
8
3 + 6
_
cos x
_
/2
0
=

3
8
3 + 6.
10.3. Trigonometric Integrals
In this section, we consider integrals involving the six trigonometric functions sinx, cos x, tanx, cot x,
sec x and csc x. If we consider dierentiation formulas involving these functions, then we can divide
these into three groups: (a) sinx and cos x; (b) tanx and sec x; and (c) cot x and csc x. Note that the
derivative of any of these functions can be expressed in terms of the two functions in the group to which
it belongs. This division is also substantiated by integral formulas.
It follows that given any indenite integral
_
f(x) dx,
where the integrand f(x) involves trigonometric functions, it may be benecial to try rst to express
f(x) in terms of trigonometric functions from only one of these three groups.
Example 10.3.1. Consider the indenite integral
_
tanx + sec
3
xcot x
cos
2
x
dx =
_ _
tanx
cos
2
x
+
sec
3
xcot x
cos
2
x
_
dx
=
_ _
sinx
cos
3
x
+
sec
5
x
tanx
_
dx =
_
sinx
cos
3
x
dx +
_
sec
5
x
tanx
dx.
Note that we can also write
_
sinx
cos
3
x
dx =
_
tanxsec
2
xdx =
1
2
tan
2
x + C.
However, the indenite integral
_
sec
5
x
tanx
dx
does not appear to be so simple.
Let us consider rst integrals involving sinx and cos x. Consider an integral of the form
_
sin
m
xcos
n
xdx.
When m = 1, the integral is simple to evaluate. Clearly
_
sinxcos
n
xdx =
1
n + 1
cos
n+1
x + C if n = 1,
and
_
sinxcos
1
xdx = log | cos x| + C.
Chapter 10 : Techniques of Integration page 11 of 26
First Year Calculus c W W L Chen, 1994, 2008
When n = 1, the integral is also simple to evaluate. Clearly
_
sin
m
xcos xdx =
1
m + 1
sin
m+1
x + C if m = 1,
and
_
sin
1
xcos xdx = log | sinx| + C.
In the general case, we may use standard trigonometric formulas like
sin
2
x + cos
2
x = 1, (13)
sin2x = 2 sinxcos x, (14)
cos 2x = cos
2
x sin
2
x. (15)
Note also that combining (13) and (15), we have
cos 2x = 2 cos
2
x 1 = 1 2 sin
2
x. (16)
Example 10.3.2. Consider the indenite integral
_
sin
5
xdx.
Using (13), we can write
sin
5
x = sin
4
xsinx = (1 cos
2
x)
2
sinx = (1 2 cos
2
x + cos
4
x) sinx,
so that
_
sin
5
xdx =
_
(1 2 cos
2
x + cos
4
x) sinxdx
=
_
sinxdx 2
_
cos
2
xsinxdx +
_
cos
4
xsinxdx
= cos x +
2
3
cos
3
x
1
5
cos
5
x + C.
Example 10.3.3. Consider the indenite integral
_
sin
3
xcos
3
xdx.
Using (13), we can write
sin
3
xcos
3
x = cos
2
xsin
3
xcos x = (1 sin
2
x) sin
3
xcos x = sin
3
xcos x sin
5
xcos x,
so that
_
sin
3
xcos
3
xdx =
_
(sin
3
xcos x sin
5
xcos x) dx
=
_
sin
3
xcos xdx
_
sin
5
xcos xdx
=
1
4
sin
4
x
1
6
sin
6
x + C.
Chapter 10 : Techniques of Integration page 12 of 26
First Year Calculus c W W L Chen, 1994, 2008
Example 10.3.4. Consider the indenite integral
_
sin
4
4xdx.
Using (16), we can write
sin
4
4x =
1
4
(1 cos 8x)
2
=
1
4
(1 2 cos 8x + cos
2
8x)
=
1
4
_
1 2 cos 8x +
1
2
(1 + cos 16x)
_
=
3
8

1
2
cos 8x +
1
8
cos 16x,
so that
_
sin
4
4xdx =
_ _
3
8

1
2
cos 8x +
1
8
cos 16x
_
dx
=
3
8
_
dx
1
2
_
cos 8xdx +
1
8
_
cos 16xdx
=
3
8
x
1
16
sin8x +
1
128
sin16x + C.
Example 10.3.5. Consider the indenite integral
_
sin
2
xcos
4
xdx.
Using (14) and (16), we can write
sin
2
xcos
4
x = cos
2
x(sinxcos x)
2
=
1
8
(1 + cos 2x) sin
2
2x =
1
8
sin
2
2x +
1
8
cos 2xsin
2
2x
=
1
16
(1 cos 4x) +
1
8
cos 2xsin
2
2x =
1
16

1
16
cos 4x +
1
8
cos 2xsin
2
2x,
so that
_
sin
2
xcos
4
xdx =
_ _
1
16

1
16
cos 4x +
1
8
cos 2xsin
2
2x
_
dx
=
1
16
_
dx
1
16
_
cos 4xdx +
1
8
_
cos 2xsin
2
2xdx
=
1
16
x
1
64
sin4x +
1
48
sin
3
2x + C.
Let us consider next integrals involving tanx and sec x. Consider an integral of the form
_
tan
m
xsec
n
xdx.
When m = 1, the integral is simple to evaluate. Clearly
_
tanxsec
n
xdx =
1
n
sec
n
x + C if n = 0,
and
_
tanxdx = log | cos x| + C.
Chapter 10 : Techniques of Integration page 13 of 26
First Year Calculus c W W L Chen, 1994, 2008
When n = 2, the integral is also simple to evaluate. Clearly
_
tan
m
xsec
2
xdx =
1
m + 1
tan
m+1
x + C if m = 1,
and
_
tan
1
xsec
2
xdx = log | tanx| + C.
In the general case, we may use standard trigonometric formulas like
1 + tan
2
x = sec
2
x. (17)
Example 10.3.6. Consider the indenite integral
_
tan
3
xdx.
Using (17), we can write
tan
3
x = tan
2
xtanx = (sec
2
x 1) tanx = sec
2
xtanx tanx,
so that
_
tan
3
xdx =
_
(sec
2
xtanx tanx) dx
=
_
sec
2
xtanxdx
_
tanxdx
=
1
2
tan
2
x + log | cos x| + C.
Example 10.3.7. Consider the indenite integral
_
tan
4
xdx.
Using (17), we can write
tan
4
x = tan
2
xtan
2
x = (sec
2
x 1) tan
2
x = sec
2
xtan
2
x tan
2
x = sec
2
xtan
2
x sec
2
x + 1,
so that
_
tan
4
xdx =
_
(sec
2
xtan
2
x sec
2
x + 1) dx
=
_
sec
2
xtan
2
xdx
_
sec
2
xdx +
_
dx
=
1
3
tan
3
x tanx + x + C.
Chapter 10 : Techniques of Integration page 14 of 26
First Year Calculus c W W L Chen, 1994, 2008
Example 10.3.8. Consider the indenite integral
_
sec
3
xdx.
Writing u = sec x and v

= sec
2
x, we have
_
uv

dx =
_
sec
3
xdx.
Furthermore, v = tanx and u

## = tanxsec x. It follows that

uv
_
vu

dx = sec xtanx
_
tan
2
xsec xdx.
Hence
_
sec
3
xdx = sec xtanx
_
tan
2
xsec xdx. (18)
We now need to study the indenite integral
_
tan
2
xsec xdx.
Using (17), we can write
tan
2
xsec x = (sec
2
x 1) sec x = sec
3
x sec x,
so that
_
tan
2
xsec xdx =
_
(sec
3
x sec x) dx =
_
sec
3
xdx
_
sec xdx. (19)
Combining (18) and (19), we have
_
sec
3
xdx = sec xtanx
_
sec
3
xdx +
_
sec xdx,
so that
_
sec
3
xdx =
1
2
sec xtanx +
1
2
_
sec xdx =
1
2
sec xtanx +
1
2
log | sec x + tanx| + C.
Example 10.3.9. Consider the indenite integral
_
tan
2
xsec
3
xdx.
Writing u = tan
2
sec x and v

= sec
2
x, we have
_
uv

dx =
_
tan
2
xsec
3
xdx.
Furthermore, v = tanx and u

= 2 tanxsec
3
x + tan
3
xsec x. It follows that
uv
_
vu

dx = tan
3
xsec x
_
(2 tan
2
xsec
3
x + tan
4
xsec x) dx.
Chapter 10 : Techniques of Integration page 15 of 26
First Year Calculus c W W L Chen, 1994, 2008
Hence
_
tan
2
xsec
3
xdx = tan
3
xsec x
_
(2 tan
2
xsec
3
x + tan
4
xsec x) dx
= tan
3
xsec x 2
_
tan
2
xsec
3
xdx
_
tan
4
xsec xdx. (20)
We now need to study the indenite integral
_
tan
4
xsec xdx.
Using (17), we can write (the reader should check this)
tan
4
xsec x = tan
2
xsec
3
x sec
3
x + sec x,
so that
_
tan
4
xsec xdx =
_
tan
2
xsec
3
xdx
_
sec
3
xdx +
_
sec xdx. (21)
Combining (20) and (21), we have
_
tan
2
xsec
3
xdx =
1
4
tan
3
xsec x +
1
4
_
sec
3
xdx
1
4
_
sec xdx
=
1
4
tan
3
xsec x +
1
8
tanxsec x
1
8
log | tanx + sec x| + C.
Occasionally, it may be necessary to convert an expression involving tanx and sec x to one involving
Example 10.3.10. Consider the indenite integral
_
tan
4
7x
sec
5
7x
dx.
Here the identity (17) does not help very much. However, we have
tan
4
7x
sec
5
7x
= sin
4
7xcos 7x,
so that
_
tan
4
7x
sec
5
7x
dx =
_
sin
4
7xcos 7xdx =
1
35
sin
5
7x + C.
Let us consider nally integrals involving cot x and csc x. Consider an integral of the form
_
cot
m
xcsc
n
xdx.
When m = 1, the integral is simple to evaluate. Clearly
_
cot xcsc
n
xdx =
1
n
csc
n
x + C if n = 0,
Chapter 10 : Techniques of Integration page 16 of 26
First Year Calculus c W W L Chen, 1994, 2008
and
_
cot xdx = log | sinx| + C.
When n = 2, the integral is also simple to evaluate. Clearly
_
cot
m
xcsc
2
xdx =
1
m + 1
cot
m+1
x + C if m = 1,
and
_
cot
1
xcsc
2
xdx = log | cot x| + C.
The details are similar to the case of tanx and sec x.
10.4. Trigonometric Substitutions
In this section, we shall consider techniques to handle integrals involving square roots of the form

a
2
b
2
x
2
,

a
2
+ b
2
x
2
or

b
2
x
2
a
2
. Without loss of generality, assume that a, b > 0.
Let us consider rst the case

a
2
b
2
x
2
. If we use the substitution
x =
a
b
sin,
then
_
a
2
b
2
x
2
=
_
a
2
(1 sin
2
) =

a
2
cos
2
= a| cos |,
while
dx =
a
b
cos d.
Example 10.4.1. Consider the indenite integral
_
1

4 x
2
dx.
If we use the substitution x = 2 sin, then
_
4 x
2
= 2| cos | and dx = 2 cos d,
so that
_
1

4 x
2
dx =
_
1
2| cos |
2 cos d.
Suppose that cos > 0. Then
_
1

4 x
2
dx =
_
d = + C = sin
1
_
x
2
_
+ C.
Chapter 10 : Techniques of Integration page 17 of 26
First Year Calculus c W W L Chen, 1994, 2008
Example 10.4.2. Consider the indenite integral
_
x
3
_
9 4x
2
dx.
If we use the substitution x =
3
2
sin, then
_
9 4x
2
= 3| cos | and dx =
3
2
cos d.
Suppose that cos > 0. Then
_
x
3
_
9 4x
2
dx =
243
16
_
sin
3
cos
2
d
=
243
16
_
(1 cos
2
) sin cos
2
d
=
243
16
_
sin cos
2
d
243
16
_
sin cos
4
d
=
81
16
cos
3
+
243
80
cos
5
+ C.
Next, note that cos
2
= 1 sin
2
= 1
4
9
x
2
, so that
_
x
3
_
9 4x
2
dx =
81
16
_
1
4
9
x
2
_
3/2
+
243
80
_
1
4
9
x
2
_
5/2
+ C.
Let us consider next the case

a
2
+ b
2
x
2
. If we use the substitution
x =
a
b
tan,
then
_
a
2
+ b
2
x
2
=
_
a
2
(1 + tan
2
) =

a
2
sec
2
= a| sec |,
while
dx =
a
b
sec
2
d.
Example 10.4.3. Consider the indenite integral
_
x
2
_
1 + x
2
dx.
If we use the substitution x = tan, then
_
1 + x
2
= | sec | and dx = sec
2
d.
Suppose that sec > 0. Then
_
x
2
_
1 + x
2
dx =
_
tan
2
sec
3
d.
We have shown earlier that
_
tan
2
sec
3
d =
1
4
tan
3
sec +
1
8
tan sec
1
8
log | tan + sec | + C.
Chapter 10 : Techniques of Integration page 18 of 26
First Year Calculus c W W L Chen, 1994, 2008
Next, note that sec
2
= 1 + tan
2
= 1 + x
2
, so that
_
x
2
_
1 + x
2
dx =
1
4
x
3
(1 + x
2
)
1/2
+
1
8
x(1 + x
2
)
1/2

1
8
log |x + (1 + x
2
)
1/2
| + C.
Let us consider nally the case

b
2
x
2
a
2
. If we use the substitution
x =
a
b
sec ,
then
_
b
2
x
2
a
2
=
_
a
2
(sec
2
1) =
_
a
2
tan
2
= a| tan|,
while
dx =
a
b
tan sec d.
Example 10.4.4. Consider the indenite integral
_

x
2
4
x
dx.
If we use the substitution x = 2 sec , then
_
x
2
4 = 2| tan| and dx = 2 tan sec d.
Suppose that tan > 0. Then
_

x
2
4
x
dx = 2
_
tan
2
d = 2
_
(sec
2
1) d = 2
_
sec
2
d 2
_
d = 2 tan 2 + C.
Next, note that
tan
2
= sec
2
1 =
1
4
x
2
1 and = sec
1
_
x
2
_
,
so that
_

x
2
4
x
dx = 2
_
1
4
x
2
1
_
1/2
2 sec
1
_
x
2
_
+ C =
_
x
2
4 2 sec
1
_
x
2
_
+ C.
10.5. Completing Squares
In this section, we shall consider techniques to handle integrals involving square roots of the form
_
x
2
+ x + , where = 0. Our task is to show that such integrals can be reduced to integrals
discussed in the previous section.
Note that
x
2
+ x + =
_
x
2
+

x +

_
=
_
x
2
+

x +

2
4
2
_
+
_

b
2
4
_
=
_
x +

2
_
2
+
_

2
4
_
.
Chapter 10 : Techniques of Integration page 19 of 26
First Year Calculus c W W L Chen, 1994, 2008
Suppose rst of all that we use a substitution
y = x +

2
.
Then dy = dx and
x
2
+ x + = y
2
+ ,
where
=

2
4
.
It now follows that
_
x
2
+ x + is of the form
_
_
_
_
a
2
b
2
y
2
if < 0 and > 0,
_
a
2
+ b
2
y
2
if > 0 and > 0,
_
b
2
y
2
a
2
if > 0 and < 0.
Example 10.5.1. Consider the indenite integral
_
1

3 2x x
2
dx.
We have
3 2x x
2
= (x
2
+ 2x 3) = (x
2
+ 2x + 1) + 4 = (x + 1)
2
+ 4 = y
2
+ 4,
where we use the substitution y = x + 1. Note that = 1 < 0 and = 4 > 0. Then
_
1

3 2x x
2
dx =
_
1
_
4 y
2
dx.
We have shown earlier that
_
1
_
4 y
2
dy = sin
1
_
y
2
_
+ C.
It follows that
_
1

3 2x x
2
dx = sin
1
_
x + 1
2
_
+ C.
Example 10.5.2. Consider the indenite integral
_

x
2
4x
x 2
dx.
We have
x
2
4x = (x
2
4x + 4) 4 = (x 2)
2
4 = y
2
4,
where we use the substitution y = x 2. Note that = 1 > 0 and = 4 < 0. Then
_

x
2
4x
x 2
dx =
_
_
y
2
4
y
dy.
Chapter 10 : Techniques of Integration page 20 of 26
First Year Calculus c W W L Chen, 1994, 2008
We have shown earlier that
_
_
y
2
4
y
dy =
_
y
2
4 2 sec
1
_
y
2
_
+ C.
It follows that
_

x
2
4x
x 2
dx =
_
(x 2)
2
4 2 sec
1
_
x 2
2
_
+ C =
_
x
2
4x 2 sec
1
_
x 2
2
_
+ C.
10.6. Partial Fractions
In this section, we shall consider techniques to handle integrals of the form
_
p(x)
q(x)
dx,
where p(x) and q(x) are polynomials in x.
If the degree of p(x) is not smaller than the degree of q(x), then we can always nd polynomials a(x)
and r(x) such that
p(x)
q(x)
= a(x) +
r(x)
q(x)
,
where r(x) = 0 or has degree smaller than the degree of q(x).
Example 10.6.1. Consider the indenite integral
_
x
5
+ 2x
4
+ 4x
3
+ x + 1
x
2
+ x + 1
dx.
Note that
x
5
+ 2x
4
+ 4x
3
+ x + 1
x
2
+ x + 1
= (x
3
+ x
2
+ 2x 3) +
2x + 4
x
2
+ x + 1
,
so that
_
x
5
+ 2x
4
+ 4x
3
+ x + 1
x
2
+ x + 1
dx =
_
(x
3
+ x
2
+ 2x 3) dx +
_
2x + 4
x
2
+ x + 1
dx.
It does not take a genius to work out the indenite integral
_
(x
3
+ x
2
+ 2x 3) dx.
We can therefore restrict our attention to the case when the polynomial p(x) is of lower degree than
the polynomial q(x).
The rst step is to factorize the polynomial q(x) into a product of irreducible factors. It is a funda-
mental result in algebra that a real polynomial q(x) can be factorized into a product of irreducible linear
factors and quadratic factors with real coecients.
Chapter 10 : Techniques of Integration page 21 of 26
First Year Calculus c W W L Chen, 1994, 2008
Example 10.6.2. Suppose that q(x) = x
4
4x
3
+ 5x
2
4x + 4. Then q(x) can be factorized into a
product of irreducible linear factors in the form (x 2)
2
(x
2
+ 1).
Suppose that a linear factor (ax +b) occurs n times in the factorization of q(x). Then we write down
a decomposition
A
1
ax + b
+
A
2
(ax + b)
2
+ . . . +
A
n
(ax + b)
n
,
where the constants A
1
, . . . , A
n
will be determined later. Suppose that a quadratic factor (ax
2
+bx+c)
occurs n times in the factorization of q(x). Then we write down a decomposition
A
1
x + B
1
ax
2
+ bx + c
+
A
2
x + B
2
(ax
2
+ bx + c)
2
+ . . . +
A
n
x + B
n
(ax
2
+ bx + c)
n
,
where the constants A
1
, . . . , A
n
and B
1
, . . . , B
n
will be determined later. We proceed to add all the
decompositions and equate their sum to
p(x)
q(x)
,
and then calculate all the constants by equating coecients.
Example 10.6.3. Suppose that
p(x)
q(x)
=
2x
3
11x
2
+ 17x 16
x
4
4x
3
+ 5x
2
4x + 4
=
2x
3
11x
2
+ 17x 16
(x 2)
2
(x
2
+ 1)
.
We now write
2x
3
11x
2
+ 17x 16
(x 2)
2
(x
2
+ 1)
=
c
1
x 2
+
c
2
(x 2)
2
+
c
3
x + c
4
x
2
+ 1
.
Now
c
1
x 2
+
c
2
(x 2)
2
+
c
3
x + c
4
x
2
+ 1
=
c
1
(x 2)(x
2
+ 1) + c
2
(x
2
+ 1) + (c
3
x + c
4
)(x 2)
2
(x 2)
2
(x
2
+ 1)
,
so that
c
1
(x 2)(x
2
+ 1) + c
2
(x
2
+ 1) + (c
3
x + c
4
)(x 2)
2
= 2x
3
11x
2
+ 17x 16.
Note now that
c
1
(x 2)(x
2
+ 1) + c
2
(x
2
+ 1) + (c
3
x + c
4
)(x 2)
2
= c
1
(x
3
2x
2
+ x 2) + c
2
(x
2
+ 1) + c
3
(x
3
4x
2
+ 4x) + c
4
(x
2
4x + 4)
= (c
1
+ c
3
)x
3
+ (2c
1
+ c
2
4c
3
+ c
4
)x
2
+ (c
1
+ 4c
3
4c
4
)x + (2c
1
+ c
2
+ 4c
4
).
Equating coecients, we have
c
1
+ c
3
= 2,
2c
1
+ c
2
4c
3
+ c
4
= 11,
c
1
+ 4c
3
4c
4
= 17,
2c
1
+ c
2
+ 4c
4
= 16.
Chapter 10 : Techniques of Integration page 22 of 26
First Year Calculus c W W L Chen, 1994, 2008
This system has solution c
1
= 1, c
2
= 2, c
3
= 1 and c
4
= 3. Hence
2x
3
11x
2
+ 17x 16
x
4
4x
3
+ 5x
2
4x + 4
=
1
x 2

2
(x 2)
2
+
x 3
x
2
+ 1
,
so that
_
2x
3
11x
2
+ 17x 16
x
4
4x
3
+ 5x
2
4x + 4
dx =
_
1
x 2
dx
_
2
(x 2)
2
dx +
_
x 3
x
2
+ 1
dx.
We shall calculate the three indenite integrals on the right hand side later.
To calculate the indenite integrals that arise, note that these indenite integrals are of the form
_
A
(ax + b)
k
dx, (22)
or
_
Ax + B
(ax
2
+ bx + c)
k
dx, (23)
where A and B are constants and k is a positive integer. The integral (22) is simple. If k = 1, then we
have
_
A
(ax + b)
k
dx =
A
(k 1)a(ax + b)
k1
+ C.
On the other hand, we have
_
A
ax + b
dx =
A
a
log |ax + b| + C.
The integral (23) is a bit more complicated. Note that
_
Ax + B
(ax
2
+ bx + c)
k
dx =
A
2a
_
2ax + b
(ax
2
+ bx + c)
k
dx +
_
B
Ab
2a
__
1
(ax
2
+ bx + c)
k
dx.
The rst integral on the right hand side is simple. If k = 1, then we have
_
2ax + b
(ax
2
+ bx + c)
k
dx =
1
(k 1)(ax
2
+ bx + c)
k1
+ C.
On the other hand, we have
_
2ax + b
ax
2
+ bx + c
dx = log |ax
2
+ bx + c| + C.
It remains to study the integral
_
1
(ax
2
+ bx + c)
k
dx.
To do this, we may try the technique of completing squares as described in the previous section, and
then use a trigonometric substitution to nd the integral.
Chapter 10 : Techniques of Integration page 23 of 26
First Year Calculus c W W L Chen, 1994, 2008
Example 10.6.4. Let us continue the discussion of Example 10.6.3. Note that
_
1
x 2
dx = log |x 2| + C and
_
1
(x 2)
2
dx =
1
x 2
+ C.
On the other hand, we have
_
x 3
x
2
+ 1
dx =
1
2
_
2x
x
2
+ 1
dx 3
_
1
x
2
+ 1
dx.
Clearly
_
2x
x
2
+ 1
dx = log |x
2
+ 1| + C.
Using the substitution x = tan, we have
_
1
x
2
+ 1
dx =
_
sec
2

1 + tan
2

d =
_
d = + C = tan
1
x + C.
It follows that
_
2x
3
11x
2
+ 17x 16
x
4
4x
3
+ 5x
2
4x + 4
dx =
_
1
x 2
dx
_
2
(x 2)
2
dx +
_
x 3
x
2
+ 1
dx
= log |x 2| +
2
x 2
+
1
2
log |x
2
+ 1| 3 tan
1
x + C.
Example 10.6.5. Consider the indenite integral
_
x
2
+ x 3
x
3
2x
2
x + 2
dx.
Note rst of all that
x
3
2x
2
x + 2 = (x 2)(x + 1)(x 1),
so we consider partial fractions of the form
x
2
+ x 3
(x 2)(x + 1)(x 1)
=
c
1
x 2
+
c
2
x + 1
+
c
3
x 1
=
c
1
(x + 1)(x 1) + c
2
(x 2)(x 1) + c
3
(x 2)(x + 1)
(x 2)(x + 1)(x 1)
.
It follows that
c
1
(x + 1)(x 1) + c
2
(x 2)(x 1) + c
3
(x 2)(x + 1) = x
2
+ x 3. (24)
We may equate coecients and solve for c
1
, c
2
, c
3
. Alternatively, substituting x = 2, 1, 1 into equation
(24), we get respectively 3c
1
= 3, 6c
2
= 3 and 2c
3
= 1, so that c
1
= 1, c
2
= 1/2 and c
3
= 1/2.
Hence
_
x
2
+ x 3
x
3
2x
2
x + 2
dx =
_
1
x 2
dx
1
2
_
1
x + 1
dx +
1
2
_
1
x 1
dx
= log |x 2|
1
2
log |x + 1| +
1
2
log |x 1| + C.
Chapter 10 : Techniques of Integration page 24 of 26
First Year Calculus c W W L Chen, 1994, 2008
Example 10.6.6. Consider the indenite integral
_
x
6
2
x
4
+ x
2
dx.
Note that
x
6
2
x
4
+ x
2
= x
2
1 +
x
2
2
x
4
+ x
2
,
so that
_
x
6
2
x
4
+ x
2
dx =
_
(x
2
1) dx +
_
x
2
2
x
4
+ x
2
dx =
1
3
x
3
x +
_
x
2
2
x
4
+ x
2
dx. (25)
Next, we study the integral
_
x
2
2
x
4
+ x
2
dx.
Note rst of all that
x
4
+ x
2
= x
2
(x
2
+ 1),
so we consider partial fractions of the form
x
2
2
x
2
(x
2
+ 1)
=
c
1
x
+
c
2
x
2
+
c
3
x + c
4
x
2
+ 1
=
c
1
x(x
2
+ 1) + c
2
(x
2
+ 1) + (c
3
x + c
4
)x
2
x
2
(x
2
+ 1)
.
It follows that
c
1
x(x
2
+ 1) + c
2
(x
2
+ 1) + (c
3
x + c
4
)x
2
= x
2
2.
Equating coecients, we have
c
1
+ c
3
= 0,
c
2
+ c
4
= 1,
c
1
= 0,
c
2
= 2.
This system has solution c
1
= 0, c
2
= 2, c
3
= 0 and c
4
= 3. Hence
_
x
2
2
x
4
+ x
2
dx = 2
_
1
x
2
dx + 3
_
1
x
2
+ 1
dx =
2
x
+ 3 tan
1
x + C. (26)
Combining (25) and (26), we obtain
_
x
6
2
x
4
+ x
2
dx =
1
3
x
3
x +
2
x
+ 3 tan
1
x + C.
Chapter 10 : Techniques of Integration page 25 of 26
First Year Calculus c W W L Chen, 1994, 2008
Problems for Chapter 10
1. Evaluate each of the following indenite integrals:
a)
_
sinxcos 7xdx b)
_
e
2x
cos 3xdx c)
_
x
2
log xdx
d)
_
cos 2x
1 sin2x
dx e)
_
1

16 3x + x
2
dx f)
_
xsec
2
xdx
g)
_
1
x
2
+ 4x 4
dx h)
_
x
2
x
3
+ 3x
2
+ 3x + 1
dx i)
_

cot xcsc
4
xdx
j)
_
x
2
+ 3x 1
x
4
+ x
3
+ x
2
+ x
dx k)
_
log(x
6
) dx l)
_
sin
2
3xdx
m)
_
1
x
2
5x + 4
dx n)
_
e
2x
cos xdx o)
_
(x
3
+

x) dx
p)
_
x
4
+ x

x + 1
x
dx q)
_
x
2

x 1 dx r)
_
x
_
x
2
+ 4 dx
s)
_
e
4x+2
dx t)
_
xe
x
2
dx u)
_
log x
x
dx
v)
_
(log x)
5
x
dx w)
_
2x + 3
x
2
+ 3x 4
dx x)
_
sin
1
x

1 x
2
dx
y)
_
1

a
2
x
2
dx z)
_
(

x + 1)
10

x
dx aa)
_
1
x
2
+ a
2
dx
bb)
_
x
5
e
x
dx cc)
_
1
x
2
4x + 3
dx dd)
_
xe
x
dx
ee)
_
x 4
(x
2
+ 4)(x + 1)
dx
2. Evaluate each of the following denite integrals:
a)
_
3
2
x(1 + 2x
2
)
4
dx b)
_
4
1
_
x + 1

x
_
dx c)
_
2
1
x
2
+ 1
(x + 1)
4
dx
d)
_
/4
0
cos x
(1 + sinx)
2
dx e)
_
1
0
x
_
x
2
+ 1 dx f)
_
4
1
e

x
dx
g)
_
/4
0
cos
2
2xdx h)
_
/2
0

2 2 cos xdx i)
_
/4
0
xcos 2xdx
j)
_
1/2
0
x

1 x
2
dx
Chapter 10 : Techniques of Integration page 26 of 26