Chapter 6: Integration: Partial Fractions and Improper Integrals
Chapter 6: Integration: Partial Fractions and Improper Integrals
Chapter 6: Integration: Partial Fractions and Improper Integrals
integrals
Course 1S3, 200607
April 5, 2007
These are just summaries of the lecture notes, and few details are included. Most of what we
include here is to be found in more detail in Anton.
6.1 Remark. Here is a quick reminder of the basics of integration, before we move on to partial
fractions.
6.2 Remark. Unlike differentiation where we can differentiate almost anything we can write
down using the basic rules (including the chain rule, product rule and quotient rule), with inte-
gration it is easy to come across simple-looking things we will not be able to do. One example
is
_
sin x
2
dx.
For each differentiation formula, we have a corresponding integration formula.
Derivative formula Integration formula
d
dx
x
n
= nx
n1
_
x
n
dx =
1
n + 1
x
n+1
+ C if n = 1
d
dx
e
x
= e
x
_
e
x
dx = e
x
+ C
d
dx
sin x = cos x
_
cos x dx = sin x + C
d
dx
cos x = sin x
_
sin x dx = cos x + C
d
dx
tan x = sec
2
x
_
sec
2
x dx = tan x + C
d
dx
sec x = sec x tan x
_
sec x tan x dx = sec x + C
We already see a gap and we need
_
1
x
dx = ln |x| +C. One way to dene the natural logarithm
is
ln x =
_
x
1
1
t
dt (x > 0)
and then the fact that its derivative is 1/x (for x > 0) is an immediate consequence of the
Fundamental theorem. Essentially the antiderivative of 1/x is newthing (much more complicated
1
2 1S3 200607 R. Timoney
than 1/x) and there is almost no limit to the new functions we can come across this way new
in the sense that they cannot be written in terms of familiar functions. The natural logarithm
function is a useful thing in many ways.
Apart from these basic integrals, there are integration formulae that follow from the chain
rule for differentiation and the product rule for differentiation. Essentially, when we rearrange
the integral of the two formulae, we get the method of substitution and integration by parts.
Aside from these there are no real methods but there is a compendium of what are essen-
tially tricks to make the methods useful in given situations. Included amongst these are ways
of integrating (many) combinations of trigonometric functions (evaluated at x, or maybe ax for a
constant a rather than at more complicated expressions) and inverse trigonometric substitutions.
These latter have the effect of introducing trigonometry into integration problems that seem to
be unrelated to trigonometry.
A lot of this was covered in 1S1. If in doubt look in Anton, or at the appendix to this part
of the notes. Not all of the trigonometric and inverse trigonometric (and inverse hyperbolic)
substitutions were done in 1S1 and so we ll in the gaps here.
6.3 Trigonometric Integrals. For the rst 3 items we are just listing them for context. (They
were covered in 1S1 and also you can nd more detail in the appendix below.)
(i) Powers of sin x times powers of sin x with one power odd
Method: For
_
sin
n
x cos
m
x dx
if n = the power of sin x is odd, substitute u = cos x
if m = the power of cos x is odd, substitute u = sin x
(ii) Powers of sin x times powers of sin x with both powers even
Method: use the trigonometric identities
sin
2
x =
1
2
(1 cos 2x), cos
2
x =
1
2
(1 + cos 2x)
(iii) Powers of sin x and cos x
Method: Use the previous two methods treating
_
sin
n
x dx =
_
sin
n
x(cos x)
0
dx
and similarly for
_
cos
m
x dx (that is treat the second power as the zeroth power).
There is another way to do these problems, and it is given in the book by Anton. Possibly
also some of you know it already.
Chapter 6 Techniques of Integration 3
Alternative method: Use the reduction formulae
_
sin
n
x dx =
1
n
sin
n1
x cos x +
n 1
n
_
sin
n2
x dx
_
cos
m
x dx =
1
m
cos
m1
x sin x +
m1
m
_
cos
m2
x dx
(valid for n 2 and m 2) to express the integrals of a power in terms of integrals where
the power is reduced by 2. Using the formula enough times, will get down to power 1 or
zero eventually.
(iv) Powers of tan x
The rst power
_
tan x dx
We can work this out using the odd powers of sin x method.
_
tan x dx =
_
sin x
cos x
dx
Let u = cos x du = sin x dx
=
_
sin x
u
du
sin x
=
_
1
u
du
= ln |u| + C
= ln | cos x| + C
Usually this is rewritten using
ln | cos x| = ln
1
| cos x|
= ln
1
cos x
= ln | sec x|
and the result is
_
tan x dx = ln | sec x| + C
The second power
_
tan
2
x dx
This is really quite easy if we recall the identity 1 + tan
2
x = sec
2
x. We get
_
tan
2
x dx =
_
sec
2
x 1 dx = tan x x + C
Higher powers
_
tan
n
x dx (n 3)
4 1S3 200607 R. Timoney
What we do here is to split off two powers (that is tan
2
x = sec
2
x 1)
_
tan
n
x dx =
_
tan
n2
x tan
2
x dx
=
_
tan
n2
x(sec
2
x 1) dx
=
_
tan
n2
x sec
2
x dx
_
tan
n2
x dx
In the rst integral, substitute
u = tan x
du = sec
2
x dx
=
_
u
n2
du
_
tan
n2
x dx
=
1
n 1
u
n1
_
tan
n2
x dx
=
1
n 1
tan
n1
x
_
tan
n2
x dx
This is a reduction method. It expresses
_
tan
n
x dx in terms of a similar integral with
the power reduced by 2. For example
_
tan
5
x dx =
1
5 1
tan
51
x
_
tan
52
x dx
=
1
4
tan
4
x
_
tan
3
x dx
=
1
4
tan
4
x
_
1
3
tan
2
x
_
tan x dx
_
and we know
_
tan x dx.
(v) Powers of sec x
The rst power:
_
sec x dx
There is no really nice way to nd this out. What we do is write down the answer
_
sec x dx = ln | sec x + tan x| + C
and show that it works. That is we check that the right hand side is an antiderivative
for sec x:
d
dx
ln | sec x + tan x| =
1
sec x + tan x
(sec x tan x + sec
2
x)
=
sec x(tan x + sec x)
sec x + tan x
= sec x
Chapter 6 Techniques of Integration 5
The second power:
_
sec
2
x dx
This is a basic formula
_
sec
2
x dx = tan x + C
Higher powers:
_
sec
n
x dx (n 3)
What we do here is split off two powers (sec
2
x) and use integration by parts
_
sec
n
x dx =
_
sec
n2
x sec
2
x dx
Let u = sec
n2
x dv = sec
2
x dx
du = (n 2) sec
n3
x sec x tan x dx v = tan x
=
_
udv
= uv
_
v du
= sec
n2
x tan x
_
tan x(n 2) sec
n3
x sec x tan x dx
= sec
n2
x tan x (n 2)
_
sec
n2
x tan
2
x dx
= sec
n2
x tan x (n 2)
_
sec
n2
x(sec
2
x 1) dx
= sec
n2
x tan x (n 2)
_
sec
n
x dx + (n 2)
_
sec
n2
x dx
We can solve this equation for our unknown integral
_
sec
n
x dx
(n 1)
_
sec
n
x dx = sec
n2
x tan x + (n 2)
_
sec
n2
x dx
_
sec
n
x dx =
1
n 1
sec
n2
x tan x +
n 2
n 1
_
sec
n2
x dx
This is a reduction formula and can be used as the other reduction formulae were used.
6.4 Recap about inverse trigonometric and hyperbolic functions. In 1S1 you learned about
inverse functions. Here we will review the basic ideas briey and spell out some details about
inverses of trigonometric and hyperbolic functions.
Recall that the inverse of a function y = f(x) is a rule that nds what x must be when you
know y. That is, the inverse function applied to y, which we write f
1
(y), is the value of x with
f(x) = y. So f
1
(y) = x should be equivalent to y = f(x).
Another way to say it is that the inverse function should exactly undo whatever the function
does (thinking of f(x) as the rule f doing something to x).
6 1S3 200607 R. Timoney
A snag that arises is that there is often no way to nd x just knowing y. For example, in the
simple case y = f(x) = x
2
, we cannot nd x exactly if we know y = 4. The equation f(x) = 4
(or x
2
= 4) has two solutions x = 2 and x = 2. Since a function can only have one value,
there is no good way to dene f
1
(4). What we always do in this example is to dene
y (for
y 0) to be the positive square root of y, so that
y)
2
= y, but
x
2
= |x| is the same as x only when x 0.
What we can do is consider a (somewhat articially) restricted version of the function y =
f(x) = x
2
where we allow only x 0. Also the values in this case are y 0 and we can say we
are considering the function
f : [0, ) [0, )
f(x) = x
2
where the target set (or co-domain set) on the right is adjusted to be equal to the range. Then
we will be able to nd x unambiguously from knowing y = f(x). It will be right then that the
inverse function
f
1
: [0, ) [0, )
f
1
(y) =
y.
The graph of y = f
1
(x) is sort of the same as the graph x = f
1
(y) but it is not really
the same because the axes are swopped. The graph x = f
1
(y) is really identical with the graph
y = f(x) but the graph y = f
1
(x) is related to it by taking a reection in the line y = x.
Here are the graphs of y = x
2
(x 0) and y =
x
and here are the two graphs together and with the line y = x, showing that one graph is the
refelection of the other in the line y = x
Chapter 6 Techniques of Integration 7
From the picture and the fact that the tangent line to the graph y = f(x) becomes the tangent
line to the graph y = f
1
(x) of the inverse function when you reect in the line y = x, it is not
hard to see that the slope of one tangent line is the reciprocal of the slope of the other. Since
the slope is got by m =
y
2
y
1
x
2
x
2
for two points (x
1
, y
1
) and (x
2
, y
2
) on the line, you can see that
interchanging x and y (which is what happens wnen you reect in the line y = x) turns the
fraction for the slope upside down.
The Liebniz
dy
dx
notation for derivatives also suggests the same fact. If we write y = f(x) and
x = f
1
(y), then
dy
dx
= f
(x) and
dx
dy
= (f
1
)
(x) exists
and is not zero then the dreivative of the inverse function will exists and will be given by
(f
1
)
(y) =
dx
dy
=
1
_
dy
dx
_
In the case of the f(x) = x
2
(with x 0) we have f
y is
(f
1
)
(y) =
dx
dy
=
1
_
dy
dx
_ =
1
2x
The only snag with this is that we have got
d
dy
y =
1
2x
and usually we want
d
dy
y = f
1
(y) here and so we
get the expected formula
d
dy
y =
1
2x
=
1
2
y
.
8 1S3 200607 R. Timoney
Finally, there is one more trick. The y = f(x) = x
2
and x = f
1
(y) =
y =
1
2
y
and get
d
dx
x =
1
2
x
We now run through the inverse trig functions briey, using the same approach as what we
had above for the square root example.
sin
1
: The function x = sin certainly does not have an inverse because sin = sin( + 2) =
sin( ) and so knowing only x = sin we cannot know .
To get an inverse function, by convention we articially restrict to lie in the range
2
2
and consider the function
f :
_
2
,
2
_
[1, 1]
x = f() = sin
The inverse function of this does make sense and is sometimes called arcsin x to emphasise
that is is not the inverse of the ordinary sin function, rather a restricted version of sin .
However we will write is as sin
1
x (another convention that is used at least as often).
1
In summary, sin
1
x only makes sense if 1 x 1 and
sin
1
x = means x = sin and
2
2
To work out the derivative, we have for x = sin ,
dx
d
= cos
and so
d
dx
=
d
dx
sin
1
x =
1
cos
.
To get the answer in terms of x we use cos
2
+ sin
2
= 1, hence cos
2
= 1 sin
2
=
1 x
2
. Since
2
2
we have cos 0 and so cos =
1 x
2
. Thus we get
nally
d
dx
sin
1
x =
1
1 x
2
(1 < x < 1).
1
Mathematica uses ArcSin[x] for this function.
Chapter 6 Techniques of Integration 9
(We have to rule out x = 1 and x = 1 to avoid division by zero.)
The integration version of this is
_
1
1 x
2
dx = sin
1
x + C
Here are the graphs of y = sin (/2 x /2) and y = sin
1
x (1 x 1)
tan
1
x: Since tan( +) = tan we have a similar problem with nding knowing x = tan
and we solve the problem by restrictiing to be in the range /2 < < /2.
That is, we consider the function
f :
_
2
,
2
_
R
x = f() = tan
The inverse function of this does make sense and is sometimes called arctan x but we will
use the alternative tan
1
x. In summary
tan
1
x = means x = tan and
2
< <
2
.
Here are the graphs of y = tan (/2 < x < /2) and y = tan
1
x
We can work out the derivative
d
dx
tan
1
x =
1
1 + x
2
10 1S3 200607 R. Timoney
in a similar way to the method used for the derivative of sin
1
x. The corresponding
integration formula is
_
1
1 + x
2
dx = tan
1
x + C.
cosh
1
x: Recall that cosh x = (e
x
e
x
)/2. (We introduced it in the appendix to Chapter 2, in
connection with parametric plotting of a hyperbola.)
We could point out that, now we know
d
dx
e
x
= e
x
from 1S1, we can say
d
dt
cosh t =
d
dt
e
t
+ e
t
2
=
e
t
e
t
2
= sinh t
(This differs by a sign from
d
d
cos = sin . It is easy to check that
d
dt
sinh t = cosh t,
which looks the same as the familiar
d
d
sin = cos .)
Also cosh(t) = cosh t is easy to see and so we cannot hope to nd t knowing only
x = cosh t. However, if we restrict to t 0 we can solve for t in terms of x as long as x is
in the range of cosh t (which means x 1). One way to see cosh t 1 always is to notice
cosh
2
t sinh
2
t = 1 so that cosh
2
t 1 must be true.
So cosh
1
x only makes sense if x 1 and
t = cosh
1
x means cosh t = x and t 0.
Here are the graphs of y = cosh t (t 0) and y = cosh
1
x (x 1)
We can work out the derivative
d
dx
cosh
1
x =
1
x
2
1
in a similar way to the method used for the derivative of sin
1
x and tan
1
x. The corre-
sponding integration formula is
_
1
x
2
1
dx = cosh
1
x + C.
Chapter 6 Techniques of Integration 11
A new feature of the function cosh
1
x is that we can write a formula for it using the natural
logarithm. (Maybe this is not totally surprising since cosh t is described by exponentials.)
The idea is that we can solve
x = cosh t =
e
t
+ e
t
2
=
e
t
+
1
e
t
2
for e
t
as follows:
2x = e
t
+
1
e
t
2xe
t
= (e
t
)
2
+ 1
0 = (e
t
)
2
2xe
t
+ 1
(e
t
)
2
2xe
t
+ 1 = 0
This is a quadratic equation for e
t
and so
e
t
=
2x
4x
2
4
2
= x
x
2
1
Since e
t
e
0
= 1 and x 1 we must have the plus sign
e
t
= x +
x
2
1
and this says
t = ln(x +
x
2
1)
So we end up with
cosh
1
x = ln(x +
x
2
1)
sinh
1
x: The function y = sinh t is genuinely invertible (no need to introduce any restrictions
on the domain) and the range is all of R. So
t = sinh
1
x just means exactly sinh t = x
Here are the graphs of y = sinh t and y = sinh
1
x
12 1S3 200607 R. Timoney
We can work out the derivative
d
dx
sinh
1
x =
1
x
2
+ 1
in a similar way to the method used previously. The corresponding integration formula is
_
1
x
2
+ 1
dx = sinh
1
x + C.
We can also solve x = sinh t for t in terms of x in a way rather similar to that used for
cosh t above and get
sinh
1
x = ln(x +
x
2
+ 1)
6.5 Inverse trigonometric substitutions. We now consider a class of substitutions which seem
quite counter intuitive. They are related to the derivative formulae for the inverse trigonometric
and inverse hyperbolic functions.
Here are the derivative formulae from above summarised:
d
dx
sin
1
x =
1
1 x
2
d
dx
tan
1
x =
1
1 + x
2
d
dx
cosh
1
x =
1
x
2
1
d
dx
sinh
1
x =
1
x
2
+ 1
The corresponding substitution methods are:
integrals involving
1 x
2
, substitute x = sin .
More generally, integrals involving
a
2
u
2
(with a constant) try substituting u =
a sin
integrals involving
1
a
2
+ u
2
try substituting u = a tan
integrals involving
u
2
a
2
try substituting u = a cosh t
integrals involving
u
2
+ a
2
try substituting u = a sinh t
Examples:
(i)
_
1
4 x
2
dx
Chapter 6 Techniques of Integration 13
Solution: According the the method described (since
4 x
2
=
2
2
x
2
=
a
2
u
2
with a = 2 and u = x) we should try substituting
u = a sin that is x = 2 sin
Notice that this looks backwards compared to other substitutions we have done. x is the
orignal variable and is the new one but we are expressing the old in terms of the new.
Normally we express the new in terms of the old. Indeed, this is what is happening here,
but we have not expressed it totally clearly. We can rewrite x = 2 sin as
x
2
= sin
and the way to say what is in a way that is not ambiguous, or to say what we really intend,
is to have
= sin
1
_
x
2
_
Nevertheless, the way we started is very convenient for substitution. We have
x = 2 sin
dx = 2 cos d
_
1
4 x
2
dx =
_
1
_
4 (2 sin )
2
2 cos d
=
_
1
_
4 4 sin
2
2 cos d
=
_
1
_
4(1 sin
2
)
2 cos d
=
_
1
4 cos
2
2 cos d
=
_
1
2 cos
2 cos d
=
_
1 d
The point of the substitution (and the reason it is often advantageous) is that we get rid of
the square root. In this example, everything is very simple, but getting rid of the square
root is the essential thing.
We get
_
1
4 x
2
dx = + C = sin
1
(x/2) + C
using the earlier expression for with the inverse function.
14 1S3 200607 R. Timoney
(ii)
_
_
9 4(x + 2)
2
dx
Solution: In this case, we have
a
2
u
2
with a
2
= 9, a = 3, u = 2(x + 2) and so our
method says to try u = a sin or
2(x + 2) = 3 sin
2 dx = 3 cos d
dx =
3 cos
2
d
_
_
9 4(x + 2)
2
dx =
_
_
9 9 sin
2
3 cos
2
d
=
_
9 cos
2
3 cos
2
d
=
_
3 cos
3 cos
2
d
=
9
2
_
cos
2
d
=
9
4
_
1 + cos 2 d
=
9
4
( +
1
2
sin 2) + C
To get the answer in terms of x, we need in terms of x
2(x + 2) = 3 sin
2
3
(x + 2) = sin
= sin
1
_
2
3
(x + 2)
_
and we could get a correct answer by replacing by this everywhere in the answer above.
However, there is a tidier way to deal with sin 2 using
sin 2 = 2 sin cos =
4
3
(x + 2) cos
and we can express cos in terms of sin by looking at a right angled triangle with as
an angle, 2(x + 2) as the length of the opposite side and 3 as the length of the hypotenuse.
Then Pythagoras theorem gives the adjacent side as
_
hypoteneuse
2
opposite
2
=
_
9 2(x + 2)
2
and so
cos =
adjacent
hypoteneuse
=
_
9 4(x + 2)
2
3
Chapter 6 Techniques of Integration 15
We could also get to this from cos =
_
1 sin
2
.
In any case we end up with a (reasonably tidy) answer
_
_
9 4(x + 2)
2
dx =
9
4
+
9
8
sin 2 + C
=
9
4
sin
1
_
2
3
(x + 2)
_
+
9
8
4
3
(x + 2)
_
9 4(x + 2)
2
3
+ C
=
9
4
sin
1
_
2
3
(x + 2)
_
+
1
2
(x + 2)
_
9 4(x + 2)
2
+ C
(iii)
_
4x
2
16x 7 dx
Solution: For quadratics inside a square root like this, what we should do rst is complete
the square. That is, rearrange the x
2
and x terms so that (with a suitable constant) we get a
multiple of a perfect square
4x
2
16x 7 = 4(x
2
+ 4x) 7
= 4(x
2
+ 4x + 4 4) 7
= 4(x
2
+ 4x + 4) + 9
= 9 4(x + 2)
2
This means that not only is this problem similar to the previous one, it is in fact the same
problem again (now that we completed the square).
6.6 Partial Fractions. Partial fractions are a technique from algebra, but our reason for dealing
with them is that they can in principle help nd every integral of the form
_
p(x)
q(x)
dx
where p(x) and q(x) are polynomials.
Except in a few special cases, we dont yet know how to nd such integrals. One special
case, where we dont need partial fractions, is where q
(x) = p(x) or q
(x) dx and it
will work out nicely. In fact substitution would also work if q(x) = r(x)
n
for some n 1 and
r
b
2
4ac
2a
=
2
4 8
2
= 1
1
and these are complex numbers. So and would have to be these complex numbers.
A remarkable fact is that every polynomial of degree 3 or more can be factored, at least in
theory. It does not mean it is easy to nd the factors, unfortunately. What you can sometimes
rely on to factor polynomials is the Remainder Theorem. It says that if p(x) is a polynomial
and you know a root x = a (that is a value a so that p(a) = 0), then x a must divide p(x).
Using the theory, just as in principle whole numbers can be factored as a product of prime
numbers, so polynomials p(x) with real coefcients can be factored as a product of linear fac-
tors like x a and quadratic factors x
2
+ bx + c with complex roots. If the coefcient of the
highest power of x in p(x) is not 1, then we also need to include that coefcient. So a complete
factorisation of
2x
2
+ 8x + 2 = (2x + 4)(x + 2) = 2(x + 2)(x + 2) = 2(x + 2)
2
.
For 3x
3
+ 3x
2
+ 6x + 6 = 3(x
3
+ x
2
+ 2x + 2), you can check that x = 1 is a root and so
x (1) = x + 1 must divide it. We get
3x
3
+ 3x
2
+ 6x + 6 = 3(x + 1)(x
2
+ 2)
from long division.
Now we can outline how partial fractions works for a fraction
p(x)
q(x)
of two polynomials:
18 1S3 200607 R. Timoney
Step 0: (preparatory step). If the degree of the numerator p(x) is not strictly smaller than the
degree of the denominator q(x), use long division to divide q(x) into p(x) and obtain a
quotient Q(x) and remainder R(x). Then
p(x)
q(x)
= Q(x) +
R(x)
q(x)
and degree(R(x)) < degree(q(x)).
We concentrate then on the proper fraction part R(x)/q(x).
Step 1: Now factor q(x) completely into a product of linear factors x a and quadratic factors
x
2
+ bx + c with complex roots.
Gather up any repeated terms, so that if (say) q(x) = (x 1)(x + 2)(x
2
+ 3)(x + 2) we
should write it as q(x) = (x 1)(x + 2)
2
(x
2
+ 3).
Step 2: Then the proper fraction
R(x)
q(x)
can be written as a sum of fractions of the following
types:
(i)
A
(x a)
m
(ii)
Bx + C
(x
2
+ bx + c)
k
where we include all possible powers (x a)
m
and (x
2
+ bx + c)
k
that divide q(x). The
A, B, C stand for constants.
As examples, consider the following. We just write down what the partial fractions look
like. In each case, we start with a proper fraction where the denominator is completely factored
already. So some of the hard work is already done.
(i)
x
2
+ x + 5
(x 1)(x 2)(x 3)
=
A
1
x 1
+
A
2
x 2
+
A
3
x 3
(ii)
x
3
+ 2x + 7
(x + 1)
2
(x 4)
=
A
1
x + 1
+
A
2
(x + 1)
2
+
A
3
x 4
(iii)
x
2
+ x + 11
(x + 1)(x
2
+ 2x + 2)
=
A
x + 1
+
Bx + C
x
2
+ 2x + 2
(iv)
x
4
+ x + 11
(x + 1)(x
2
+ 2x + 2)
2
=
A
x + 1
+
B
1
x + C
1
x
2
+ 2x + 2
+
B
2
x + C
2
(x
2
+ 2x + 2)
2
To make use of these, we have to be able to nd the numbers A, B, C, . . . that make the
equation true. Take the rst example
x
2
+ x + 5
(x 1)(x 2)(x 3)
=
A
1
x 1
+
A
2
x 2
+
A
3
x 3
.
Chapter 6 Techniques of Integration 19
To nd the appropriate A
1
, A
2
, A
3
, we multiply across by the original denominator (x 1)(x
2)(x 3). This has the effect of clearing all the fractions.
x
2
+ x + 5 =
A
1
x 1
(x 1)(x 2)(x 3) +
A
2
x 2
(x 1)(x 2)(x 3)
+
A
3
x 3
(x 1)(x 2)(x 3)
= A
1
(x 2)(x 3) + A
2
(x 1)(x 3) + A
3
(x 1)(x 2)
There are two avenues to pursue from here. In this case, method 1 seems easier to me, but in
general method 2 can be as good.
Method 1. Plug in the values of x that make the original denominator (x1)(x2)(x3) =
0.
x = 1 :
1 + 1 + 5 = A
1
(1 2)(1 3) + A
2
(0) + A
3
(0)
7 = 2A
1
A
1
= 7/2
x = 2 :
11 = A
1
(0) + A
2
(1)(1) + A
3
(0)
= A
2
A
2
= 11
x = 3 :
17 = 0 + 0 + A
3
(2)(1)
A
3
= 17/2
So we get
x
2
+ x + 5
(x 1)(x 2)(x 3)
=
7/2
x 1
+
11
x 2
+
17/2
x 3
.
Our interest in this is for integration. We can now easily integrate
_
x
2
+ x + 5
(x 1)(x 2)(x 3)
dx =
_
7/2
x 1
+
11
x 2
+
17/2
x 3
dx
=
7
2
ln |x 1| 11 ln |x 2| +
17
2
ln |x 3| + C
Method 2. Multiply out the right hand side.
x
2
+ x + 5 = A
1
(x 2)(x 3) + A
2
(x 1)(x 3) + A
3
(x 1)(x 2)
= A
1
(x
2
5x + 6) + A
2
(x
2
4x + 3) + A
3
(x
2
2x + 2)
= (A
1
+ A
2
+ A
3
)x
2
+ (5A
1
4A
2
2A
3
)x + (6A
1
+ 3A
2
+ 2A
2
)
20 1S3 200607 R. Timoney
and compare the coefcients on both sides to get a system of linear equations
A
1
+ A
2
+ A
3
= 1
5A
1
4A
2
2A
3
= 1
6A
1
+ 3A
2
+ 2A
2
= 5
These can be solved (by Gaussian elimination, for example) to nd A
1
, A
2
, A
3
.
Method 1 is certainly magic in this case, but there are examples where Method 1 does not get
all the unknown so easily.
Another example. Here is one of our previous examples with the numbers worked out.
x
2
+ x + 11
(x + 1)(x
2
+ 2x + 2)
=
11
x + 1
+
10x 11
x
2
+ 2x + 2
To nd the integral of this,
_
x
2
+ x + 11
(x + 1)(x
2
+ 2x + 2)
dx =
_
11
x + 1
dx
_
10x + 11
x
2
+ 2x + 2
dx
= 11 ln |x + 1|
_
10x + 11
x
2
+ 2x + 2
dx
To work out the remaining integral, we use the method of completing the square x
2
+ 2x +
2 = x
2
+ 2x + 1 + 1 = (x + 1)
2
+ 1 and we can then make the substitution x + 1 = tan .
However, there is a trick that saves a lot of simplifying later. The substitution u = x
2
+ 2x + 2,
du = (2x +2) dx = 2(x +1) dx would work if the numerator was a multiple of x +1. What we
can do is write
_
10x + 11
x
2
+ 2x + 2
dx =
_
10x + 10
x
2
+ 2x + 2
dx +
_
1
x
2
+ 2x + 2
dx
and make the u = x
2
+2x +2 substitution in the rst half, but the x +1 = tan , dx = sec
2
d
in the second. We get
_
10x + 11
x
2
+ 2x + 2
dx =
_
10x + 10
u
du
2(x + 1)
+
_
1
tan
2
+ 1
sec
2
d
=
_
5
u
du +
_
1 d
= 5 ln |u| + + C
= 5 ln(x
2
+ 2x + 2) + tan
1
(x + 1) + C
Finally, our integral works out as
_
x
2
+ x + 11
(x + 1)(x
2
+ 2x + 2)
dx = 11 ln |x + 1| 5 ln(x
2
+ 2x + 2) tan
1
(x + 1) + C
Chapter 6 Techniques of Integration 21
6.7 Improper Integrals. Sometimes, integrals that appear to be innite in extent can be given a
nite value in a way that seems sensible.
For example, consider
_
1
1
x
2
dx
If we draw a picture of what this might mean graphically, in the same way as we dit for integrals
_
b
a
f(x) dx where a and b are nite, we should be looking at the area of the region under the
graph
y =
1
x
2
x 1
a region that stretches innitely far into the distance. So it seems innite and nothing more to
be said.
But, before we conclude that it is innite, suppose we imagine colouring in the area under
that graph with paint, and we do it so that we apply the paint evenly so that we use a xed amount
per square inch. The amount of paint we would need should be innite if the area is innite.
We would never be done painting an innite area, an so we could paint a wide but nite
section and see how much paint we need.
22 1S3 200607 R. Timoney
In this picture, we show colouring for 1 x 3, but we could replace 3 by any nite b > 1.
The area covered up as far as b works out as
_
b
1
1
x
2
dx =
_
1
x
_
b
1
=
1
b
(1) = 1
1
b
and we see that, rather than a huge answer, we always get an answer < 1. In fact as b , the
answer approaches 1. It does not tend to . So if we have enough paint to paint 1 square unit of
area, we will never completely run out although there will be very little paint left when b is large.
Maybe there is a case for deciding that
_
1
1/x
2
dx should have the value 1.
We make this our denition. We dene
_
1
1
x
2
dx = lim
b
_
b
1
1
x
2
dx
(which is 1).
More generally, if y = f(x) is dened and continuous for x a we dene the improper
integral
_
a
f(x) dx = lim
b
_
b
1
f(x) dx
if this limit exists and is nite. On the other hand if the limit does not exist at all, or is innite,
we say that the improper integral
_
a
f(x) dx fails to converge.
Example. Find
_
2
1/x dx.
In this kind of example (an improper integral) we start by using the right denition. This
shows that we realise that there is an issue about the integral making sense, and that we know
how the issue is dealt with. We get
_
2
1/x dx = lim
b
_
b
2
1/x dx
= lim
b
[ln x]
b
2
= lim
b
ln b ln2.
If we look at the graph of y = ln x we see that this limit is . Because it is not nite, we say
that the improper integral
_
2
1
x
dx
does not converge.
Other types of improper integral
(i) If y = f(x) is dened and continuous for x b, then we dene the improper integral
_
b
f(x) dx = lim
a
_
b
a
f(x) dx
if this limit exists and is nite. If the limit does not exist, or is innite, we say that the
improper integral
_
b
1
x
_
1
c
= lim
c0
+
1 +
1
c
As this limit is innite, the improper integral
_
1
0
1/x
2
dx does not converge.
(iii) If y = f(x) is continuous on a nite interval a x < b, excluding the right end point
b (where it might have an asymptote or other bad behaviour), hen we dene the improper
integral
_
b
a
f(x) dx = lim
cb
_
c
a
f(x) dx
if this limit exists and is nite. If the limit does not exist, or is innite, we say that the
improper integral does not converge.
(iv) If an integral is improper for more than one reason, or at a place not one of the endpoints,
we divide it as a sum of improper integrals of the types we have considered above. If each
one of the bits has a nite value, then the value of the whole is the sum. But if any one of
the bits fails to converge then the whole is said not to converge.
Examples
(a)
_
1
1+x
2
dx =
_
0
1
1+x
2
dx +
_
0
1
1+x
2
dx
(It does not matter about using 0 as a stopping point. Any nite point would do, for
example
_
1
1+x
2
dx =
_
4
1
1+x
2
dx +
_
4
1
1+x
2
dx)
(b)
_
1
1
1
x
2
dx =
_
0
1
1
x
2
dx +
_
1
0
1
x
2
dx
Here the problem with the integral is at 0, where the integrand has an asymptote. In
fact we already worked out that
_
1
0
1/x
2
dx does not converge and so we know that
_
1
1
1
x
2
dx also does not converge.
24 1S3 200607 R. Timoney
This is an example where an unthinking use of integration would produce a wrong
answer 2. (You might be suspicious if the integral of a positive thing in the left to
right direction turned out to be negative.)
(c)
_
1
x(1+x
2
)
dx =
_
1
1
x(1+x
2
)
dx +
_
0
1
1
x(1+x
2
)
dx +
_
1
0
1
x(1+x
2
)
dx +
_
1
1
x(1+x
2
)
dx
The original is improper because of the limit, the asymptotes at x = 0 and the
limit. Each of the 4 bits above has just one problem at one end.
A Appendix
In 20067, this material was in 1S1.
A.1 Remark. The aim here is to explain how to nd antiderivatives (indenite integrals). By the
fundamental theorem, this also allows us to nd denite integrals exactly.
A.2 Remark. (i) Substitution. If we integrate both sides of the chain rule
dy
dx
=
dy
du
du
dx
where y = f(u), u = u(x), y = f(u(x))
we get
_
dy
dx
dx =
_
dy
du
du
dx
dx (1)
and this means that if we we have an integrand we can express like the right hand side as
_
g(u)
du
dx
dx
then we can work it out if we have an antiderivative for g(u), that is if we can nd f(u)
with f
(u) = g(u) it will match exactly what we had in (1). It comes down to being able to
cancel the dxs and
_
g(u)
du
dx
dx =
_
g(u) du
Example. Consider the problem of nding
_
3x
2
cos(x
3
) dx
If we notice that u = x
3
has
du
dx
= 3x
2
a factor in the integrand, then we can write
_
3x
2
cos(x
3
) dx =
_
du
dx
cos udx =
_
cos u
du
dx
dx =
_
cos udu
This is something we can do as it is sin u + C. So the answer is sin u + C but we should
write the answer in terms of x (because the problem was in terms of x) and so we get
_
3x
2
cos(x
3
) dx = sin u + C = sin(x
3
) + C
Chapter 6 Techniques of Integration 25
Normally we write this out in a way like the following and rely on the possibility of treating
dx like a numerical quantity that can be canceled between numerator and denominator.
_
3x
2
cos(x
3
) dx Let u = x
3
du
dx
= 3x
2
du = 3x
2
dx
du
3x
2
= dx
_
3x
2
cos(x
3
) dx =
_
3x
2
cos u
du
3x
2
=
_
cos udu
= sin u + C
= sin(x
3
) + C
The reason the substitution u = x
3
works is because the derivative du/dx is a factor in the
integrand. For a substitution to work, it is usually necessary for du/dx to be a factor in the
integrand (essentially, maybe in a slightly hidden way). It is vital that we express all xs
and dxs in terms of u and du.
(ii) Integration by parts If we integrate both sides of the product rule
d
dx
(uv) =
du
dx
v + u
dv
dx
we get
_
d
dx
(uv) dx =
_
v
du
dx
dx +
_
u
dv
dx
dx
or
uv =
_
v
du
dx
dx +
_
u
dv
dx
dx
This allows us a way of transforming integrals of the form of a product of one function
times the derivative of another
_
u
dv
dx
dx = uv
_
v
du
dx
dx
into a different integral (where the differentiation has ipped from one factor to the other).
The advantage of this comes if we know how to manage the new integral (or at least if it is
simpler than the original). The integration by parts formula is usually written with the dss
canceled
_
udv = uv
_
v du
Examples
26 1S3 200607 R. Timoney
(a)
_
x ln x dx
Solution: The two most obvious ways to use integration by parts are
u = x, dv = ln x dx (Problem with this is we cant nd v)
u = ln x, dv = x dx
It turns out that the second is good.
_
x ln x dx Let u = ln x dv = x dx
du =
1
x
dx v =
x
2
2
_
x ln x dx =
_
udv
= uv
_
v du
= (ln x)
x
2
2
_
x
2
2
1
x
dx
= (x
2
/2) ln x
_
x
2
dx
= (x
2
/2) ln x
x
2
4
+ C
(b)
_
e
1
ln x dx
Solution: This is one of a very few cases which can be done by taking dv = dx and
u = the integrand. Every integral takes the form
_
udv in that way, but it is rarely a
good way to start integration by parts.
Here we can make use of the denite integral form of the integration by parts formula
_
b
a
udv = [uv]
b
a
_
b
a
v du
which arises in the same way as the indenite integral formula (take denite integrals
of the product rule for differentiation).
Chapter 6 Techniques of Integration 27
_
e
1
ln x dx Let u = ln x dv = dx
du =
1
x
dx v = x
_
e
1
ln x dx =
_
e
1
udv
= [uv]
e
1
_
e
1
v du
= [(ln x)x]
e
1
_
e
1
x
1
x
dx
= e ln e ln 1
_
e
1
1 dx
= e [x]
e
1
= e (e 1) = 1
(c)
_
x
2
cos x dx
Solution:
_
x
2
cos x dx Let u = x
2
dv = cos x dx
du = 2x dx v = sin x
_
x
2
cos x dx =
_
udv
= uv
_
v du
= x
2
sin x
_
sin x(2x) dx
= x
2
sin x
_
2x sin x dx
The point here is that we have succeeded in simplifying the problem. We started with x
2
times a trigonometric function (cos x) and we have now got to x times a trigonometric
function (sin x this time, but that is not so different in difculty to cos x). If we continue
in the same (or similar) way and apply integration by parts again, we can make the
problem even simpler. We use U and V this time in case we might get confused with
28 1S3 200607 R. Timoney
the earlier u and v.
2
_
2x sin x dx Let U = 2x dV = sin x dx
dU = 2 dx V = cos x
_
2x sin x dx =
_
U dV
= UV
_
V dU
= 2x(cos x)
_
(cos x)2 dx
= 2x cos x +
_
2 cos x dx
= 2x cos x + 2 sin x + C
Combining with the rst stage of the calculation
_
x
2
cos x dx = x
2
sin x + 2x cos x 2 sin x C
and, in fact C is plus another constant. Since C can be any constant, the answer
_
x
2
cos x dx = x
2
sin x + 2x cos x 2 sin x + C
is also good.
We will not in fact learn any other techniques than these which are purely integration meth-
ods. We will spend some time explaining how to make use of these techniques in specic cir-
cumstances (as it is often not at all obvious how to do so). There is one other method we will
come to called partial fractions, a method for integrating fractions such as
_
x + 2
(x 1)(x
2
+ 2x + 2)
dx
However, the thing we have to learn about is algebra a way to rewrite fractions like this as
sums of simpler ones and there is no new idea that is directly integration. The algebra allows
us to tackle problems of this sort.
A.3 Trigonometric Integrals. (i) Powers of sin x times powers of sin x with one power odd
Method: For
_
sin
n
x cos
m
x dx
if n = the power of sin x is odd, substitute u = cos x
2
One thing to avoid is U = v and V = u because this will just unravel what we did to begin with.
Chapter 6 Techniques of Integration 29
if m = the power of cos x is odd, substitute u = sin x
Example:
_
sin
3
x cos
4
x dx
Solution: Let u = cos x, du = sin x dx, dx =
du
sin x
_
sin
3
x cos
4
x dx =
_
sin
3
xu
4
du
sin x
=
_
sin
2
xu
4
du
=
_
(1 cos
2
x)u
4
du
=
_
(1 u
2
)u
4
du
=
_
u
6
u
4
du
=
1
7
u
7
1
5
u
5
+ C
=
1
7
cos
7
x
1
5
cos
5
x + C
(ii) Powers of sin x times powers of sin x with both powers even
Method: use the trigonometric identities
sin
2
x =
1
2
(1 cos 2x), cos
2
x =
1
2
(1 + cos 2x)
Example:
_
sin
4
x cos
2
x dx
Solution:
_
sin
4
x cos
2
x dx =
_
(sin
2
x)
2
cos
2
x dx
=
_ _
1
2
(1 cos 2x)
_
2
_
1
2
(1 + cos 2x)
_
dx
=
1
8
_
(1 2 cos 2x + cos
2
2x)(1 + cos 2x) dx
=
1
8
_
1 cos 2x cos
2
2x + cos
3
2x dx
Now
_
1 dx is no bother.
_
cos 2x dx is not much harder than
_
cos x dx = sin x + C. If
we look at
d
dx
sin 2x = (cos 2x)2
30 1S3 200607 R. Timoney
we can see that
_
cos 2x dx =
1
2
sin 2x+C. (This can also be done by a substitution u = 2x
but that is hardly needed.) Next
_
cos
2
2x dx =
_
1
2
(1 + cos 4x) dx =
1
2
_
x +
1
4
sin 4x
_
+ C
(using the same ideas as for
_
cos 2x dx).
For
_
cos
3
2x dx we are in a situation where we have an odd power of cos times a zeroth
power of sin. So we can use the earlier method (the fact that the angle is 2x doe snot make
a big difference) of substituting u = sin 2x. Then du = 2 cos 2x dx, dx =
du
2 cos 2x
,
_
cos
3
2x dx =
_
cos
3
2x
du
2 cos 2x
=
1
2
_
cos
2
2x du
=
1
2
_
1 sin
2
2x dx
=
1
2
_
1 u
2
du
=
1
2
_
u
1
3
u
3
_
+ C
=
1
2
sin 2x
1
6
sin
3
2x + C
Putting all the bits together
_
sin
4
x cos
2
x dx =
1
8
_
1 cos 2x cos
2
2x + cos
3
2x dx
=
1
8
_
x
1
2
sin 2x
1
2
x
1
8
sin 4x +
1
2
sin 2x
1
6
sin
3
2x
_
+ C
=
1
16
x
1
64
sin 4x
1
48
sin
3
2x + C
(iii) Powers of sin x and cos x
Method: Use the previous two methods treating
_
sin
n
x dx =
_
sin
n
x(cos x)
0
dx
and similarly for
_
cos
m
x dx (that is treat the second power as the zeroth power).
Example:
Chapter 6 Techniques of Integration 31
_
cos
3
x dx
Solution:
_
cos
3
x dx =
_
(sin x)
0
cos
3
x dx. Power of cos odd. Substitute u = sin x,
du = cos x dx, dx =
du
cos x
_
cos
3
x dx =
_
cos
3
x
du
cos x
=
_
cos
2
x du
=
_
1 u
2
du
= u
1
3
u
3
+ C
= sin x =
1
3
sin
3
x + C
_
sin
4
x dx
Solution: Use even powers method.
_
sin
4
x dx =
_
(sin
2
x)
2
dx
=
_ _
1
2
(1 cos 2x)
_
2
dx
=
1
4
_
1 2 cos 2x + cos
2
2x dx
Note: still have one even power
=
1
4
_
1 2 cos 2x +
1
2
(1 + cos 4x) dx
=
1
4
_
3
2
2 cos 2x +
1
2
cos 4x dx
=
1
4
_
3
2
x sin 2x +
1
8
sin 4x
_
+ C
=
3
8
x
1
4
sin 2x +
1
32
sin 4x + C
There is another way to do these problems, and it is given in the book by Anton. Possibly
also some of you know it already.
Alternative method: Use the reduction formulae
_
sin
n
x dx =
1
n
sin
n1
x cos x +
n 1
n
_
sin
n2
x dx
_
cos
m
x dx =
1
m
cos
m1
x sin x +
m1
m
_
cos
m2
x dx
32 1S3 200607 R. Timoney
(valid for n 2 and m 2) to express the integrals of a power in terms of integrals where
the power is reduced by 2. Using the formula enough times, will get down to power 1 or
zero eventually.
Example:
_
sin
4
x dx =
1
4
sin
3
x cos x +
3
4
_
sin
2
x dx
(using the case n = 4)
=
1
4
sin
3
x cos x +
3
4
_
1
2
sin x cos x +
1
2
_
(sin x)
0
dx
_
(using the case n = 2)
=
1
4
sin
3
x cos x
3
8
sin x cos x
3
8
_
1 dx
=
1
4
sin
3
x cos x
3
8
sin x cos x
3
8
x + C
Note that the answer looks different to the answer we got by the other method. They can
be reconciled using trigonometry:
sin 2x = 2 sin x cos x
sin 4x = 2 sin 2x cos 2x
= 2(2 sin x cos x)(1 2 sin
2
x)
= 4 sin x cos x 8 sin
3
x cos x
3
8
x
1
4
sin 2x +
1
32
sin 4x =
3
8
x
1
2
sin x cos x +
1
8
sin x cos x
1
4
sin
3
x cos x
=
3
8
x
3
8
sin x cos x
1
4
sin
3
x cos x
Chapter 6 Techniques of Integration 33
The way to establish the reduction formulae is to use integration by parts. For example
_
sin
n
x dx =
_
sin
n1
x sin x dx
=
_
udv
where u = sin
n1
x dv = sin x dx
du = (n 1) sin
n2
x cos x dx v = cos x
= uv
_
v du
= sin
n1
x(cos x)
_
(cos x)(n 1) sin
n2
x cos x dx
= sin
n1
x cos x + (n 1)
_
sin
n2
x cos
2
x dx
= sin
n1
x cos x + (n 1)
_
sin
n2
x(1 cos
2
x) dx
= sin
n1
x cos x + (n 1)
_
sin
n2
x dx (n 1)
_
sin
n
x dx
Though this looks bad, we have in fact found an equation that is satised by
_
sin
n
x dx
and if we solve the equation for this quantity in terms of the other things, we get
n
_
sin
n
x dx = sin
n1
x cos x + (n 1)
_
sin
n2
x dx
_
sin
n
x dx =
1
n
sin
n1
x cos x +
n 1
n
_
sin
n2
x dx
and that is the reduction formula as claimed. The one for powers of cos x works out in a
similar way.
Richard M. Timoney April 5, 2007