Вы находитесь на странице: 1из 76

Department of

Mathematical Sciences

MA1002 Calculus
Integral Calculus

Dr John Pulham
ii

September 13, 1999, Version 1.2

Copyright  1999 by Ian Craw, John Pulham and the University of Aberdeen

All rights reserved.

Additional copies may be obtained from:


Department of Mathematical Sciences
University of Aberdeen
Aberdeen AB9 2TY

DSN: mth199-101465-0
Contents

1 Integration 1
1.1 The Integral . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 Doing Integrals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.3 Some Properties of the Indefinite Integral . . . . . . . . . . . . . . . . . . 4
1.4 *Impossible Integrals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.5 The Definite Integral . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.5.1 Differentiating an Integral . . . . . . . . . . . . . . . . . . . . . . . 6
1.5.2 Properties of the Definite Integral . . . . . . . . . . . . . . . . . . 7
1.5.3 Infinite Limits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

2 Applications of Integration 11
2.1 Integrals and Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2.2 Intervals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
2.3 Further Properties of the Definite Integral . . . . . . . . . . . . . . . . . . 15
2.4 Another View of the Definite Integral . . . . . . . . . . . . . . . . . . . . 19
2.5 Further Applications of the Definite Integral . . . . . . . . . . . . . . . . . 20
2.5.1 The Length of a Curve . . . . . . . . . . . . . . . . . . . . . . . . . 20
2.5.2 Volumes of Revolution . . . . . . . . . . . . . . . . . . . . . . . . . 22
2.5.3 Area of Surface of Revolution . . . . . . . . . . . . . . . . . . . . . 24
2.5.4 *Area in polar coordinates . . . . . . . . . . . . . . . . . . . . . . . 25
2.6 *Numerical Approximation to Definite Integrals . . . . . . . . . . . . . . . 27
2.7 *Estimating the value of e . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

3 Methods of Integration 29
3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
3.2 Substitution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
3.2.1 Substitution in Definite Integrals . . . . . . . . . . . . . . . . . . . 32
Z b
dx
3.3 The definite integral . . . . . . . . . . . . . . . . . . . . . . . . . . 33
a x
3.4 Integration by Parts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
3.4.1 *The Gamma Function . . . . . . . . . . . . . . . . . . . . . . . . . 37
3.5 Quadratics and Trigonometric Substitutions . . . . . . . . . . . . . . . . . 41
3.6 Integration of Rational Functions and Partial Fractions . . . . . . . . . . . 44

iii
iv CONTENTS

3.6.1 *Further Details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48

4 Differential Equations 49
4.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
4.2 Separable Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
4.2.1 The Malthus Equation . . . . . . . . . . . . . . . . . . . . . . . . . 52
4.2.2 *The Logistic Equation . . . . . . . . . . . . . . . . . . . . . . . . . 53
4.3 Generalities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
4.4 *Linear First-Order Equations . . . . . . . . . . . . . . . . . . . . . . . . . 54

Appendices 59
List of Figures

2.1 The area between a curve and the x-axis. . . . . . . . . . . . . . . . . . . . 11


2.2 Bounding an area between two rectangles. . . . . . . . . . . . . . . . . . . 12
2.3 The area between two curves. . . . . . . . . . . . . . . . . . . . . . . . . . 14
2.4 Another area. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
2.5 Estimating an area. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
2.6 Dividing up the area under a curve . . . . . . . . . . . . . . . . . . . . . . 19
2.7 One of the rectangles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
2.8 Straight line approximation . . . . . . . . . . . . . . . . . . . . . . . . . . 20
2.9 A volume of revolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
2.10 The volume of a slice. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
2.11 Volume of rotation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
2.12 Describing an area in polar co-ordinates. . . . . . . . . . . . . . . . . . . . 25
2.13 The area of a very small segment. . . . . . . . . . . . . . . . . . . . . . . . 25
2.14 Approximating by a trapezium . . . . . . . . . . . . . . . . . . . . . . . . 27
2.15 The graph of ex lies between tangent and chord. . . . . . . . . . . . . . . . 28

4.1 Solutions of the Logistic Equation. . . . . . . . . . . . . . . . . . . . . . . 54

v
vi LIST OF FIGURES

How to use these Notes


The notes are divided into

• theory and explanation

• worked examples

• exercises

Most of the theory will also be presented in lectures. The exceptions are the sections
marked with a ∗. These are ‘extras’ and are not an examinable part of the course. They
are not necessarily more difficult than the official bits—it’s just that they are not in the
syllabus. Read them if you are interested. The more you read of everything the more you
are likely to understand.
Please study the worked examples carefully because that is usually the best way to
grasp the theory. There is also a lot to be said for treating some of the worked examples as
exercises in the first instance, trying to solve them yourself and only then reading through
my solution. It is usually rather silly to try reading mechanically through a worked example
when you have not yet got into your head what the example is really about.
The exercises come in two varieties—unstarred and starred. The starred exercises are
either a bit more difficult than the others or else are less directly relevant to the course.
The more exercises you try the better, but do not get worried if you have not attempted
many of the starred questions. The standard of the examination questions is based on the
unstarred questions.
There are some solutions and some answers at the back of the book. Use these sensibly.
Make a serious attempt at a problem before looking up the answer or you will just be
wasting your time.
Chapter 1

Integration

1.1 The Integral


There are a number of different ways to approach the Integral Calculus. We will start with
the least useful approach, which has the merit of being very simple to understand. We will
then look at a more complicated approach which is actually much more useful.

Our first approach is going to be to say that Integration is just the opposite (or inverse
operation) to Differentiation. If f (x) differentiates to give F (x) then, by definition, F (x)
integrates to give f (x). We have been calling F (x) the derivative of f (x) and we will now
call f (x) an Indefinite Integral of F (x). We use the notation
Z
f (x) = F (x) dx

(This rather complicated notation derives


R from the other approach to integration that we
will Rbe considering. Note that both the and the dx are part of the notation. If you like,
the says that we are dealing with an integral and the dx tells us the name of the variable
under consideration.)
As a simple example, sin(x) differentiates to give cos(x), so cos(x) integrates to give
sin(x). Or Z
cos(x) dx = sin(x).

Now we notice a slight problem. sin(x) differentiates to give cos(x), but so do sin(x) + 1
and sin(x) − 34.23. In that case which of these is the integral of cos(x)? We seem to have
an ambiguity. This is true, and it is an ambiguity that will not go away. That is why I
carefully referred to f (x) as an indefinite integral in the previous paragraph.
How much ambiguity do we have to deal with? Well, suppose that f1 (x) and f2 (x) are
both indefinite integrals of F (x). That simply means that both f1 (x) and f2 (x) differentiate
to give F (x). But if f10 (x) = f20 (x) then, by the rules of differentiation the derivative of
f1 (x) − f2 (x) must be zero. So f1 (x) − f2 (x) must be a constant. So the only ambiguity is
that we can add an arbitrary constant to our integral.

1
2 CHAPTER 1. INTEGRATION

Many authors make this explicit by writing something like


Z
cos(x) dx = sin(x) + C

where C stands for the arbitrary constant that we can add in. You may have been brought
up to do this all the time. You are welcome to do it if that is what you are used to. I will
tend to leave it out—simply because I know that it is always there (though there will come
a time later in the course when I will have to be more careful).
Let me now gather together some terminology. Consider the formula
Z
cos(x) dx = sin(x) + C

The function cos(x) is called the Integrand, the variable x is called the variable of
integration, the constant C is called the Constant of Integration and sin(x) is called
the Indefinite Integral or Anti-Derivative.

1.2 Doing Integrals


Now that we know what integrals are the next problem is to find out how to do them.
This turns out to be a heavy problem. For differentiation we had a tidy set of rules that
allowed us to work out the derivative of just about any function that we cared to write
down—the procedure is basically mechanical and can be done quite well by computers.
There is nothing like this for integration, in general. Even (apparently) simple integrals
can be very difficult or downright impossible to work out. More of this later. Integration
is more of a skill than a routine.
One approach that can work sometimes in simple cases is just ‘spotting the answer’. If
you can spot a function which differentiates to give your function then you have found an
integral. Look at the following simple examples.
Z
d 1 1
( n+1
x ) = x son
xn dx = xn+1 (n 6= −1)
dx n + 1 n+1
Z
d
sin x = cos x so cos x dx = sin x
dx
Z
d
cos x = − sin x so sin x dx = − cos x
dx
Z
d ax 1
e = aeax so eax dx = eax
dx a
Z
d 1 dx
ln x = so = ln x
dx x x
R
Let me do something a Rlittle more complicated. We have seen that cos(x) dx = sin(x).
What then is the value of cos(2x) dx?
1.2. DOING INTEGRALS 3

We want to know what function differentiates to give cos(2x). Well, if you differentiate
sin(2x) you get 2 cos(2x), which is not quite right because of the factor 2. That is easily
adjusted for and we see that the required integral is sin(2x)/2. R
Note that this simple approach does not work with an integral like cos(x2 ) dx. The
obvious function to play with seems to be sin(x2 ) but the derivative of this is 2x cos(x2 )
(damn the chain rule) which is nowhere near the required answer (and no, you can’t go
dividing by x!). Our simple approach has failed.
Your work on differentiation will allow you to check that the following short table is
correct. These integrals should be known.
4 CHAPTER 1. INTEGRATION
R
f (x) f (x) dx

1
xa a 6= 1 a+1
xa+1

sin(x) − cos(x)

cos(x) sin(x)

ex ex
1
x
ln(x)
1
1+x2
arctan x
√ 1 arcsin x
1−x2

There is a table of integrals at the end of this booklet. There are books in the library
that devote hundreds of pages to listing integrals.
Most of the ‘techniques’ for working out integrals are just methods for changing one
integral into another in the hope that you will eventually come to an integral that you can
‘spot’ or find in the tables.
Let me finish this section by raising (quietly) yet another difficulty with the indefinite
integral—it really is plagued with problems. Consider the statement
Z
dx
= ln(x)
x
which is in the above table. This looks correct because we have already found that the
derivative of ln(x) is 1/x. But look a little closer. The integrand (1/x) makes sense for
any value of x other than 0. The integral (ln(x)) makes no sense at all if x ≤ 0. What we
have in this formula is really an integral for 1/x valid for x > 0. We have had to limit the
‘domain of definition’ of the integrand in order to make sense. This problem will have to
be coped with later on.

1.3 Some Properties of the Indefinite Integral


These are immediate consequences of the corresponding properties of derivatives. In each
equation there is really an arbitrary constant of integration hanging around.
Let f (x) and g(x) be functions and λ a constant. Then
Z Z
λf (x) dx = λ f (x) dx
Z Z Z
f (x) + g(x) dx = f (x) dx + g(x) dx
1.4. *IMPOSSIBLE INTEGRALS 5

provided that the integrals exist; we have not yet shown that there necessarily exists a
function F (x) that differentiates to give a specified function f (x).
These rules may allow us to reduce an integral to the point where we can spot the
answer. Z Z Z
2x + e dx = 2 x dx + ex dx = x2 + ex
x

Z Z Z
sin x + 2 cos x dx = sin x dx + 2 cos x dx = − cos x + 2 sin x

1.4 *Impossible Integrals


This is an aside. Ignore it unless interested.
You will frequently be told that some integrals are ‘impossible’ — they cannot be done. Common
examples are such seemingly respectable integrals as
Z Z Z
x2 2 dx
e dx, sin(x ) dx, √ dx
x5 + 1
2
This does not mean that, for example, there is no function that differentiates to give ex ; there certainly
is. The problem is that you do not know how to write it down. The answer cannot be expressed in terms
of ‘elementary functions’.
Let me give another example to make this clearer. We have seen that
Z
dx
= arctan(x)
1 + x2
That is simple enough. But suppose I had not done the inverse trig functions. Then you would never have
met arctan(x), so I would have to say to you that, though the integral could certainly be done, it could not
be done in terms of functions known to you. The same kind of thing applies to the ‘impossible’ examples
given above.
It is a distressing fact that the vast majority of integrals are, in this sense, impossible. When I write
exercise sheets on differentiation I can get away with writing functions down at random, knowing full well
that they can be differentiated. When writing exercises on integration I have to tread very carefully indeed
and check everything out before I set anything.
In some ways it is more surprising that derivatives can be done. It just happens to be the case that
the derivatives of all the elementary functions can be expressed in terms of elementary functions. There is
no logical reason for this—it is pure luck. That’s a lie actually, there are good historical reasons why our
idea of ‘elementary’ for functions leads to simple derivatives.

1.5 The Definite Integral


Suppose that F (x) is an indefinite integral of f (x), i.e. F 0 (x) = f (x). The Definite
Integral Z b
f (x) dx
a
where a and b are numbers, is defined to be the number F (b) − F (a):
Z b
f (x) dx = [F (x)]ba = F (b) − F (a)
a
6 CHAPTER 1. INTEGRATION

The choice of indefinite integral (choice of constant of integration) does not matter—the
constant of integration cancels out.
a and b are called the Limits of Integration. a is called the Lower Limit and b is
called the Upper Limit.
Note the ‘square bracket’ notation. [f (x)]ba stands for f (b) − f (a). Some books use
f (x)|ba , but this can be confusing in complicated expressions because it does not tell you
where the expression starts.
This may all seem a strange idea at this stage. The justification for definite integrals
will come quite soon.
Let me show you a few examples to show you that the idea is quite simple.
Z 2
Example 1.1. x2 dx
1
Now Z
x3
x2 dx =
3
So Z  2
2
2 x3 8 1 7
x dx = = − =
1 3 1 3 3 3
Z 2
Example 1.2. ex dx
−2
Now Z
ex dx = ex

So Z 2
ex dx = [ex ]2−2 = e2 − e−2
−2
Z x
Example 1.3. t2 dt
0
Just as usual, Z  x
x
1 1
t dt = t3
2
= x3
0 3 0 3
Notice that, in this case, the answer is a function of x rather than a number.

1.5.1 Differentiating an Integral


Consider the function Z x
g(x) = f (t) dt
a

where a is a constant and we are thinking of the upper limit of the integral as a variable.
If F (x) is an indefinite integral for f (x) then

g(x) = F (x) − F (a)


1.5. THE DEFINITE INTEGRAL 7

So, by definition of F (x),


g 0(x) = F 0 (x) = f (x)
This gives the result
Z x
d
f (t) dt = f (x)
dx a

(Note that we have only proved it on the assumption that an indefinite integral exists for
f (x).)

1.5.2 Properties of the Definite Integral


If we assume that the function f (x) has an integral then
Z b Z a
f (x) dx = − f (x) dx (F (b) − F (a) = −(F (a) − F (b)))
a b
Z b Z c Z c
f (x) dx + f (x) dx = f (x) dx ((F (b) − F (a)) + (F (c) − F (b)) = F (c) − F (a))
a b a

1.5.3 Infinite Limits


Have a quick look at this section, but don’t get worried by it.
We have seen what we mean by a definite integral where both limits of integration are
finite. In many important applications of integration you will come across cases where one
or more of the limits of integration is infinite. There are three possibilities:
Z ∞ Z a Z ∞
f (x) dx f (x) dx f (x) dx
a −∞ −∞

The interpretation of these is that they are to be taken as limiting cases of the corresponding
integrals with finite limits. For example,
Z ∞ Z b
f (x) dx = lim f (x) dx
a b→∞ a
Z a Z a
f (x) dx = lim f (x) dx
−∞ b→−∞ b

Here is a simple example: consider the integral


Z ∞
dx
1 x2
Now, for any finite positive value of b,
Z b  b
dx −1 1
2
= = 1 −
1 x x 1 b
8 CHAPTER 1. INTEGRATION

Now we look at the limiting behaviour as b → ∞. In the limit 1/b → 0 and so the value of
the integral tends to 1. Therefore Z ∞
dx
= 1.
1 x2
Of course, in most cases the limits will not exist, so the integral will not exist either.
For example, Z ∞
1
x dx = lim a2
0 a→∞ 2

This limit does not exist, so the integral does not exist, though you might get away with
saying that it is ‘infinite’.
More seriously, consider the integral
Z ∞
cos x dx = lim sin a
0 a→∞

Here the limit does not exist either, nor does it do anything so straightforward as going off
to infinity—it just oscillates to and fro between R−1 and 1. Rb

Finally, let me note a small problem. The integral −∞ f (x) dx is the limiting case of a
f (x) dx as
a → −∞ and b → ∞. This need not be the same thing as
Z a
lim f (x) dx.
a→∞ −a

It
R ∞is best to think of such doubly-infinite limits in two stages: first let the top limit tend to infinity to get
and then let the bottom limit tend to −∞ to get the answer. The reason for such care is shown by the
a Ra
integral of sin(x). For any finite value of a we have −a sin(x) dx = 0 (check). If we took the limit a → ∞
in this we would get Z ∞
sin(x) dx = 0
−∞
R∞
but this is actually nonsense. If, on the other hand, you start by studying a sin(x) dx you will see at
once that no meaningful limiting value exists.

Questions 1 (Hints and solutions start on page 62.)

Q 1.1. Evaluate the following integrals


Z Z Z Z
2 2
x dx, cos x dx, 3x − 2x dx 2 sin x dx

Z Z Z Z
3 2 2 dx
4x − 3x + 1 dx, 3 sin x − 2 cos x dx, x
2e dx,
x
Z 1 Z π Z 1
2
x + x dx, 2 sin x − cos x dx, 3ex − x dx
0 0 −1
1.5. THE DEFINITE INTEGRAL 9

Q 1.2. The following integrals are minor variations on standard ones. Try to spot the
answer (and then check by differentiating).
Z Z Z Z
3x−4 dx dx
cos(2x + 3) dx, e dx, ,
2 + 3x 4 + 9x2
Z Z Z Z
dx dx dx dx
, √ , ,
5 − 3x 4 − 9x2 2
cos 2x ex
R
Q
R 1.3. Use the trig identities cos 2x = 2 cos2 x − 1 = 1 − 2 sin2 x to evaluate sin2 x dx and
2
cos x dx.

Q 1.4. Evaluate the following definite integrals


Z 1 Z 3 Z π Z 4
3 dx
x dx, (x2 − 3x + 1) dx, sin(2x) dx,
0 −2 0 2 x
Z 1 Z 1/2 Z 2 Z 4
dx dx dx
, √ , ex/2
dx,
0 1 + x2 0 1 − x2 1 1 2x + 3
Z ∞ Z ∞ Z x
dx dt
e−2x dx, 2
, , (x > 0)
0 0 1 + 4x 1 t
Z a Z π/4 Z ex2
7 5 15 2 du
(3x − 4x ) dx, sec x dx, .
−a 0 1 u
10 CHAPTER 1. INTEGRATION
Chapter 2

Applications of Integration

2.1 Integrals and Area


It is an odd fact that the basic ideas of integration predate those of differentiation by nearly
2000 years. Archimedes was quite good at ‘doing integrals’, albeit in a rather different
context. He was interested in the problem of calculating the areas of curved regions. The
ancient Egyptians and Babylonians were quite good at finding the areas of straight-sided
regions (basic surveying—much needed in Egypt because of the regular flooding of the
Nile). Curved regions are an altogether different problem and the ancient Ancients knew
little more than that the area of a circle is πr 2 . More complicated regions need much more
complicated ideas. It is not enough just to know the area of a triangle.
Archimedes, in an remarkable anticipation of the methods of the Calculus, tried to adopt
a ‘limiting values’ approach to calculating areas. His idea was that you could approximate
a curved region arbitrarily closely by straight-sided regions and could therefore hope to
obtain the area of the curved region as a limiting case of the (calculable) areas of the
approximations. This has since become one of the most basic ways of defining integrals
because, as we will see in this section, there is a close connection between the idea of an
integral (which we just introduced as the opposite of differentiation) and the idea of an
area.

y = f (x)

A(b)
x

a b

Figure 2.1: The area between a curve and the x-axis.

11
12 CHAPTER 2. APPLICATIONS OF INTEGRATION

Consider the graph of y = f (x) between x = a and x = b. We want to calculate the


area between this curve and the x-axis shown in Fig. 2.1.
In what follows I am going to regard a as fixed and denote the area between a and b by
A(b).
Now consider a point slightly to the right of b with coordinate b + h.

f (x)
M
m

h
b b+h b b+h

Figure 2.2: Bounding an area between two rectangles.

Then
A(b + h) = A(b) + shaded area
Let me draw a bigger picture of the shaded area. M is the highest point on the graph on
this interval and m is the lowest. By looking at the two rectangles in the diagram it is clear
that the shaded area has value between hm and hM. So, by above,

mh ≤ A(b + h) − A(b) ≤ Mh

or
A(b + h) − A(b)
m≤ ≤M
h
(we have h > 0). Note that the central term is a Newton Quotient.
Now let h shrink down to zero. If f is continuous it is clear that as h → 0 both m and
M tend to f (b). The Newton Quotient is sandwiched between them, so

A(b + h) − A(b)
f (b) = lim = A0 (b)
h→0 h
So f is the derivative of A. Therefore A is an indefinite integral of f . So
Z b
f (x) dx = [A(x)]ba = A(b) − A(a)
a

but, obviously, A(a) = 0. So we get the fundamental result that


Z b
f (x) dx = A(b)
a
2.1. INTEGRALS AND AREA 13

So the area between the graph and the x-axis between x = a and x = b is given by the
formula
Z b
area = f (x) dx
a

Warning: I drew the picture conveniently with the graph above the axis. If f (x) goes
negative then the ‘area’ calculated by the integral also goes negative. You have to be careful
about this as we will see in a moment.
Example 2.1. What is the area between the graph of f (x) = x2 and the x-axis between
x = 0 and x = 2?
On this range the graph never goes below the x-axis, so by the above formula the area
is given by  2
Z 2
2 1 3 8
area = x dx = x =
0 3 0 3
So the area is 8/3 (square units).
Example 2.2. What is the area between the graph of f (x) = sin x and the x-axis between
x = 0 and x = π?
On this range the graph never goes below the x-axis, so
Z π
area = sin x dx = [− cos x]π0 = −(−1) + 1 = 2
0

Example 2.3. What is the area between the graph of f (x) = x2 − 1 and the x-axis between
x = 0 and x = 2?
Here we have to be careful. f (x) is negative between x = 0 and x = 1 and positive
between x = 1 and x = 2. If we proceed mindlessly we get
Z 2  2
2 1 3 8 2
area = (x − 1) dx = x − x = − 2 =
0 3 0 3 3
This is the wrong answer, if you interpret area in the usual sense.
Let me now do this properly. The integral between x = 0 and x = 1 has value
Z 1
1 2
(x2 − 1) dx = − 1 = −
0 3 3
This answer is negative because the graph is below the axis. The actual area is 23 .
Now do the integral between x = 1 and x = 2.
Z 2
8 1 2 2 4
(x2 − 1) dx = ( − 2) − ( − 1) = + =
1 3 3 3 3 3
This gives the second part of the area.
So the total area is
2 4
+ =2
3 3
14 CHAPTER 2. APPLICATIONS OF INTEGRATION

(1,1) y y = x3
y
y=x

-1 x
1
y = x2
y = x3
x

Figure 2.3: The area between two curves. Figure 2.4: Another area.

Example 2.4. What is the area of the region between the two graphs y = x2 and y = x3
between x = 0 and x = 1?
This type of question is best answered by finding the areas between these graphs and
the x-axis and subtracting the results. It is sensible to start with a sketch like Fig 2.3.
The area between y = x2 and the x-axis is
Z 1  1
1 1
x dx = x3
2
=
0 3 0 3

The area between y = x3 and the x-axis is


Z 1  1
1 1
x dx = x4
3
=
0 4 0 4

Now for a little care: the graph of y = x2 always lies above the graph of y = x3 on the
range 0 < x < 1. So the area between the graphs is the difference of the two results that
we have just calculated:
1 1 1
area = − =
3 4 12
Example 2.5. What is the area enclosed by the graphs of y = x3 and y = x?
Here we again need to draw a picture to get our bearings — see Fig 2.4. The graphs
cross when x3 = x, i.e. x = 0, x = ±1. The enclosed area comes in two identical parts,
from x = −1 to x = 0 and from x = 0 to x = 1. Compute the second and double it.
Z 1 Z 1
1
Area = x dx − x3 dx =
0 0 4

So the total area enclosed is 1/2.


2.2. INTERVALS 15

2.2 Intervals
Before going on to the next section it is worth introducing some standard notation for
intervals. An Interval on the real line is all the points between two points (apart from a
special case to be done in a moment). These intervals come in a number of types, depending
on whether the end-points are included in the range or not.
An Open Interval is one in which the end-points are not included. e.g. 0 < x < 1.
We use the notation (a, b) for the open interval with end-points a < b

(a, b) = {x ∈ R : a < x < b}


A Closed Interval is one in which both end points are included. e.g. 0 ≤ x ≤ 1. We
use the notation [a, b] for the open interval with end-points a ≤ b

[a, b] = {x ∈ R : a ≤ x ≤ b}
We also use the notations (a, b] for a < x ≤ b and [a, b) for a ≤ x < b.
The other types of interval are those that stretch to infinity in one direction or another.
For these we use the following notations
(−∞, a) = {x ∈ R : x < a}
(−∞, a] = {x ∈ R : x ≤ a}
(a, ∞) = {x ∈ R : a < x}
[a, ∞) = {x ∈ R : a ≤ x}
(−∞, ∞) =R
Note that things like [−∞, a) do not make sense. ‘Infinity’ is not a number!

2.3 Further Properties of the Definite Integral


The ‘area’ interpretation of the definite integral gives us the following extra properties:
Z b
if f (x) ≥ 0 on [a, b] then f (x) dx ≥ 0
a

(If the graph does not go below the x-axis the integral is not going to be negative.)
Z b Z b
if f (x) ≥ g(x) on [a, b] then f (x) dx ≥ g(x) dx
a a

(If the graph of f never goes below the graph of g then the area under the f graph is greater
than that under the g graph. That explanation makes sense if both graphs are above the
x-axis, but the result is true in general as you can see by using the first property on the
function h(x) = f (x) − g(x).)
Z b
if m ≤ f (x) ≤ M on [a, b] then m(b − a) ≤ f (x) dx ≤ M(b − a)
a
16 CHAPTER 2. APPLICATIONS OF INTEGRATION

(Think of m as the constant function g(x) = m and use the earlier results, together with
Rb
a
m dx = m(b − a). Similarly for M.)
Finally, a property that is often quite useful
Z b Z b

f (x) dx ≤ |f (x)| dx

a a

Questions 2 (Hints and solutions start on page 62.)

Q 2.1. Work out the area between the following graphs and the x-axis on the given ranges:

y = x4 on [1, 2]
y = ex on [−1, 1]
π π
y = cos x on [− , ]
2 2
y = 2x2 + x on [0, 1]
y = x2 − x on [0, 2]
y = x2 − 3x + 2 on [0, 3]
y = x3 on [−2, 1]
y = e−x on [0, ∞)

Q 2.2. Find the area enclosed between the graphs of y = x2 and y = x+2 by first sketching
the graphs to see what is going on and then working out the points at which the two graphs
meet before doing an integration.

Q 2.3. Find where the graphs of y = x(1 − x) and y = x2 cross and then find the area
enclosed between the two graphs.

Q 2.4. Find the area enclosed by the graphs y = ex , y = x2 and the lines x = 0 and x = 1.

Q 2.5. Consider the area enclosed between the graph of y = 1 − x2 and the x-axis. Which
line parallel to the x-axis divides this area into two equal parts?

*Q 2.6. Consider the function b(x) defined by



0 x < −1
b(x) = 1 −1 ≤ x ≤ 1


0 1<x
2.3. FURTHER PROPERTIES OF THE DEFINITE INTEGRAL 17

Remembering the basic fact that the definite integral gives the area under a graph
(taking due account of signs), draw the graph of the function b1 (x) defined by
Z x
b1 (x) = b(t) dt
0

for all values of x.


If you managed that you can now go on to sketch the graph of
Z x
b2 (x) = b1 (t) dt
0

*Q 2.7. Suppose that f (x) and g(x) are two functions and consider the integral
Z b
I(t) = (f (x) + tg(x))2 dx.
a

whose value depends on t. Because of the square, this integral cannot be negative: I(t) ≥ 0.
Now expand out the square and show that you get I(t) = At2 + 2Bt + C where A, B, C are
constants. Use the fact that I(t) cannot be negative, together with what you know about
quadratics, to show that you must have B 2 ≤ AC and that this becomes
Z b 2 Z b Z b
2
f (x)g(x) dx ≤ f (x) dx · g(x)2 dx (Cauchy-Schwartz Inequality)
a a a

This is a very useful inequality in more advanced work.

*Q 2.8. This exercise relates to the method that Archimedes used to find the area of the
region between a parabola (let’s say y = x2 ) and a chord of the parabola. He did this
nearly 2000 years before the calculus was officially invented.
Let P (a, a2 ) and Q(b, b2 ) be two points on the graph y = x2 with b > a. Let R be the
point on the graph where the slope of the graph is equal to the slope of the chord P Q.
Show that R is the point on the graph with x-coordinate (a + b)/2. Why is P QR the
biggest triangle with base P Q and with third vertex on the graph between P and Q? The
area of the triangle P QR is (b − a)3 /8 (as you may be able to check). Now find the area
of the ‘parabola segment’ bounded by the parabola and the chord and show that it comes
out as 4/3 times the area of the triangle.

*Q 2.9. This question is about estimating the value of π. Draw the graph of y = sin x for
0 ≤ x ≤ π/2. Now work out the area between this graph and the x-axis. By looking at
your picture can you show that 2 < π < 4. Not very precise, but it’s a start. By
√ looking at
the area of the graph between x = 0 and x = π/4 can you show that √ π < 8( 2 − 1) and,
by using the fact that sin x ≤ x on this range, that π 2 > 32(1 − 1/ 2)?
18 CHAPTER 2. APPLICATIONS OF INTEGRATION

y = 1/x

x
1 2 3 4 5 n n+1

Figure 2.5: Estimating an area.

*Q 2.10. The Harmonic Numbers H1 , H2 , H3, . . . are defined by

1 1 1 1 1
Hn = 1 + + + + +···+
2 3 4 5 n

So, for example, H1 = 1, H2 = 3/2, H3 = 11/6, etc.


Study the Fig. 2.5 which shows the graph of y = 1/x:
Remember
Rn that the area under the graph between x = 1 and x = n is given by the
integral 1 dx/x = ln(n). Add up the areas of the rectangles and show that

1 1 1
+ +···+
UPPER = 1 + > ln(n)
2 3 n−1
1 1 1 1
LOWER = + + + · · · + < ln(n)
2 3 4 n

Deduce from this that for n > 1,

1
ln(n) + < Hn < ln(n) + 1
n

Notice that this implies that Hn → ∞ as n → ∞, rather surprisingly. Roughly what value
of n do you need to get Hn = 10? What about Hn = 20 or Hn = 100?
The above calculation narrowed the value of Hn down to a range of length about 1. We
can do a lot better than this. The main reason for the roughness in the approximation was
that the first few rectangles fitted the graph very badly. So suppose we start the exercise
further along. By applying the above process to the graph on the range N ≤ x ≤ n show
that
1 1
ln(n) + + AN − < Hn < ln(n) + AN
n N
where AN = HN − ln(N). Suppose I tell you that H1000 = 7.4854708606 to 10 decimal
places. What does the above inequality become and how accurately can you tell me the
value of H1000000 ?
2.4. ANOTHER VIEW OF THE DEFINITE INTEGRAL 19

2.4 Another View of the Definite Integral


Consider the interval [a, b]. Let f (x) be a continuous function defined on this interval. Let
us think once more of the problem of finding the area under the graph of f (x) between
x = a and x = b.

y = f (x)

a δx b
xk

Figure 2.6: Dividing up the area under a curve

We will adopt an approach that is much more elementary (and much older) than our
previous method. Divide the interval [a, b] up into a large number of small parts. For
convenience we will take them all to be of the same width, but that is not very important.
Now use this subdivision to break up the area into thin strips as shown.
Denote the subdivision points by x0 , x1 , . . . , xn where xk = a + kδx and δx is the width
of each strip δx = (b − a)/n.
We can get an approximation to the area under the
graph by adding up the areas of the n rectangles shown
in the picture. The rectangle on the base [xk , xk+1 ] has
y = f (x)
area f (xk )δx. So

111
000
X
n−1

000
111
approximate area = f (xk )δx
k=0 f (xk )
Now we use the same kind of argument that we used
when inventing the derivative. As n gets bigger and
bigger we expect the sum of the areas of the rectangles xk xk+1
000
111
to get closer and closer to the true area under the graph.
We would hope that if we took the limit as n → ∞ the Figure 2.7: One of the rectangles
sum would tend to the true area as its limiting value.
We will assume that this is true. So
X
n−1
area under graph = lim f (xk )δx
n→∞
k=0

But we already know that this area is given by the definite integral. So, putting our two
20 CHAPTER 2. APPLICATIONS OF INTEGRATION

results together, we get (in the case of a continuous function)


Z b X
n−1
f (x) dx = lim f (xk )δx
a n→∞
k=0

We can in fact take this as a definition of the definite integral (the Riemann Integral), and
normally do so in more advanced work.
This interpretation of the definite integral is the one that is most useful in applications,
as we will soon see.

2.5 Further Applications of the Definite Integral


Our new interpretation of the definite integral is very useful. It shows us how to turn
a lot of different problems into integration problems. We introduced it in the context of
finding areas, but it is vastly more general than that. Almost anything that comes into
the category of ‘break it into small bits, approximate on the bits and then add up the bits’
yields a definite integral of some form.
In this section I will look at a few applications. You may meet others in other subjects.

2.5.1 The Length of a Curve


Suppose we want to calculate the length of the graph of y = f (x) between x = a and
x = b.
Subdivide [a, b] as before into n small parts. Look at the graph on one of these parts.
The idea is to get an approximation to the length of the graph on this part, in the same
way that we used the rectangle approximation when finding the area. Then we add up the
approximations and take the limit as n → ∞ so as to produce an integral which gives the
true length.
What approximation do we use?
The obvious approach is to use the length of the chord
Q
PQ as an approximation to the length of the graph between
P and Q. In the notation of Fig. 2.8 this length is
p δs
δs = δx2 + δy 2 δy
which we can write more conveniently as P
s  2
δy δx
δs = 1 + δx
δx Figure 2.8: Straight line ap-
We now have the approximation to the length which I will proximation
write crudely as s
X  2
δy
1+ δx
δx
2.5. FURTHER APPLICATIONS OF THE DEFINITE INTEGRAL 21

Our new interpretation of the definite integral tells us that, as n → ∞ this tends to the
value of the definite integral s
Z b  2
dy
1+ dx
a dx
(the δy/δx is really the Newton Quotient and tends to dy/dx in the limit.)
So we have obtained the formula
s  2
Z b
dy
s= 1+ dx
a dx

for the length of the graph of y = f (x) between x = a and x = b.


Note: if the curve is given parametrically by x = x(t) and y = y(t) then a very similar
argument gives us the formula
Z bp
s= ẋ2 + ẏ 2 dt
a

for the length of the curve between t = a and t = b.


Example 2.6. What is the length of the graph y = cosh(x) between x = 0 and x = a?
In this case dy/dx = sinh(x) so
s  2 q
dy
1+ = 1 + sinh2 (x) = cosh x
dx

So the length is Z a
s= cosh x dx = [sinh x]a0 = sinh a
0

Example 2.7. As a check on whether we are making sense, let’s work out the length of a
part of a straight line. Let y = mx + c be a straight line. Let us use the formula to find its
length between x = a and x = b.
s  2
0 dy √
y = m so 1+ = 1 + m2
dx
So Z b√ √ b−a
s= 1 + m2 dx = (b − a) 1 + m2 =
a cos φ
where φ is the angle that the line makes with the x-axis (m = tan φ). You can easily check
that this is indeed the right answer.
Example 2.8. What is the circumference of a circle of radius r?
Let the circle be given by the equation x2 + y 2 = r 2 . We will get the circumference by
working out the length of the top semicircle and doubling the result.
22 CHAPTER 2. APPLICATIONS OF INTEGRATION

On the top half y = r 2 − x2 . So

dy −x
=√
dx r 2 − x2
and s  2
dy r
1+ =√
dx r2 − x2
So the length of the semicircle is given by
Z r
r dx
l= √
−r r 2 − x2

This is actually a fairly standard integral and you


R will
√ find it in most tables (we will see
a method for doing it later on). The solution is dx/ r 2 − x2 = arcsin(x/r). You should
check this by differentiating the RHS.

l = [r arcsin(x/r)]r−r = r(arcsin(1) − arcsin(−1)) = rπ

So the total circumference of the circle is twice this, i.e.

circumference = 2πr

2.5.2 Volumes of Revolution


Take the graph of y = f (x) on the interval [a, b] and spin it round the x-axis so as to
produce what is known as a solid of revolution as shown in Fig. 2.9. We want to get a
formula for the volume of this solid.

y
y = f (x)
b

a x

Figure 2.9: A volume of revolution

The method is almost exactly the same as in the previous examples. Think of the
interval [a, b] being subdivided into lots of little bits. Now look at one of the bits and try
to get an approximation for the volume of the ‘thin slice’ of the solid obtained by rotating
the piece of the graph on this interval.
2.5. FURTHER APPLICATIONS OF THE DEFINITE INTEGRAL 23

In the notation of the diagram, the thin slice of the solid is


virtually a cylinder of radius y and thickness δx. The volume
of a cylinder is the product of its height and the area of its
base. So we get the approximation y δx
δV = πy 2 δx

for the volume of the slice.


The approximation to the total volume can then be writ-
ten as X
V ≈ πy 2 δx Figure 2.10: The volume of
Now take the limit as n → ∞ and get a slice.
Z b
Volume = πy 2 dx
a

Example 2.9. Cone


Take the line y = mx on [0, h] and spin it round the x-axis so as to produce a cone of
height h and ‘semi-angle’ α, where tan α = m.
The volume of this cone is, by our formula,
Z h  h
2 2 21 3 1
V = πm x dx = πm x = πm2 h3
0 3 0 3
If R is the radius of the base of the cone then m = tan α = R/h so, with a bit of
rearranging, we get
1 1
V = πR2 h = base × height
3 3
Example 2.10. Sphere √
Take the semicircle y = r 2 − x2 on [−r, r] and spin it round the x-axis. We get, as
our solid of revolution, a Sphere of radius r.
Our formula tells us that the volume of this sphere is
Z r  r
2 2 2 1 3 4
V = π(r − x ) dx = πr x − πx = πr 3
−r 3 −r 3
So the volume of a sphere of radius r is
4
V = πr 3
3
Example 2.11. Consider the funnel formed by taking the curve y = 1/x and rotating it
round the x-axis on the interval [1, a], as shown in Fig. 2.11
The volume of this funnel is
Z a h π ia
1 1
V = π 2 dx = − = π(1 − )
1 x x 1 a
24 CHAPTER 2. APPLICATIONS OF INTEGRATION

1
a

Figure 2.11: Volume of rotation.

Now notice that, as a → ∞, this volume tends to the finite value π (because π/a → 0).
We write Z ∞ Z a 
π π π
dx = lim dx = lim π − =π
1 x2 a→∞ 1 x2 a→∞ a

2.5.3 Area of Surface of Revolution


I’m going to be brief here and just give you the formula.
Suppose we take the graph y = f (x) on the range [a, b] and rotate it around the x-axis
as before. Then the Surface Area of the surface formed by this is given by
s  2
Z b
dy
area = 2πy 1+ dx
a dx

Example 2.12. Sphere


As before, we obtain our sphere by rotating the semicircle

y = R2 − x2 −R≤x≤R

around the x-axis.


For this curve  
dy −x
=√
dx R2 − x2
So s  2 r
dy x2 R
1+ = 1+ =√
dx R −x
2 2
R − x2
2

So the area is given by


Z R √ Z R
R
Area = 2π R2 − x2 √ dx = 2πR dx = 4πR2
−R R2 − x2 −R

So a sphere of radius R has area 4πR2 .


2.5. FURTHER APPLICATIONS OF THE DEFINITE INTEGRAL 25

2.5.4 *Area in polar coordinates


Read this after you find out about polar coordinates, if you don’t know about them already.
Suppose we have a curve given in polar coordinate by r = f (θ). How do we find the
area of the region bounded by the curve and the radial lines θ = a and θ = b?

y r = f (θ)

δθ r = f (θ)
a b x f (θ)
θ
O
O

Figure 2.12: Describing an area in polar Figure 2.13: The area of a very small
co-ordinates. segment.

This is another example of the ‘thin slices’ approach, though a bit different to previous
ones. We imagine the θ range from a to b being subdivided into lots of small parts of width
δθ and the area consequently being divided up into lots of thin pie slices. Any one of these
slices, at angle θ, is approximately a triangle with sides f (θ) and included angle δθ. The
area of such a triangle is 12 f (θ)2 sin(δθ). But, for very small angles, sin(x) ≈ x. So we
approximate the area of the pie-slice by 12 f (θ)2 δθ.
Now, ‘adding up’ these thin slice areas and passing over to the limit we get the formula
Z
1 b
area = f (θ)2 dθ
2 a
for the area of the region. This is usually written more simply as
Z b
1
area = r 2 dθ
2 a

Questions 3 (Hints and solutions start on page 63.)

Q 2.11. Calculate the volume generated by rotating the following graphs around the x-axis.

y = 2x on [0, 1]
π π
y = cos 2x on [− , ]
2 2
y = e−3x on [0, a]

(For the second one, remember that cos 2x = 2 cos2 x − 1.)


26 CHAPTER 2. APPLICATIONS OF INTEGRATION

Q 2.12. Find the volume of the solid that is produced by taking the area bounded by the
lines y = x, y = 2x and x = 2 and rotating it about the x-axis.
Q 2.13. What is the volume of the solid obtained by rotating the graph of y = x2 around
the y-axis (I said y-axis) between y = 0 and y = 4?
Q 2.14. Consider the curve (ellipse) given by
x2 y 2
+ 2 =1
a2 b
Find the volume of the solid produced by rotating this about the x-axis.
Q 2.15. A standard application of integration is in finding average values. The average
value of the function f (x) on the range a ≤ x ≤ b is given by
Z b
1
µ= f (x) dx.
(b − a) a
Can you see how this formula is derived in terms of ‘thin slices’ ? What is the average value
of f (x) = x for 0 ≤ x ≤ 1? What is the average value of f (x) = sin(x) for 0 ≤ x ≤ π and
for 0 ≤ x ≤ 2π? Explore a few other averages.
P is the point (1, 0) on the circle x2 + y 2 =√1. Show that the distance from P to the
point Q on the circle given by (cos θ, sin θ) is 2 − 2 cos θ and that the average distance
from P to other points of the circle is 4/π (you may need to remember the trig formula
1 − cos 2x = 2 sin2 x).
*Q 2.16. If I roll a penny along the x-axis in the (x, y)-plane then a point on the edge of
the penny traces out a curve called a cycloid.

If the penny has radius r then the cycloid can be parametrised as


x(θ) = rθ − r sin θ, y(θ) = r − r cos θ.
(You can try to derive these equations yourself — they just need a bit of trigonometry, θ
is the angle through which the penny has turned.) What is the height of each arch of the
cycloid and where does the cycloid meet the x-axis? R R
The area of one arch can be found by using the chain rule as follows: y dx = y dx

dθ.
2
Show that the area of each arch is 3πr and that the length of each arch is 8r.
*Q 2.17. I have a sphere of radius R. Using an apple corer of radius r, I punch a symmet-
rically placed cylindrical hole through the sphere. How much of the sphere is left?
P.S. I’m a bit short on examples of lengths and surface areas simply because the square
roots in the formulas tend to produce very nasty integrals—way beyond first year compet-
ence.
2.6. *NUMERICAL APPROXIMATION TO DEFINITE INTEGRALS 27

2.6 *Numerical Approximation to Definite Integrals


Z b
If a and b are numbers then the value of f (x) dx is a number. In many applications we are not interested
a
in the precise value of this number—a good approximation will do. We should be grateful for this because,
in practice, very few integrals can be evaluated explicitly so there is no hope of getting an exact answer.
How do we approximate the value without being able to do
the integral? The basic idea is our interpretation of the definite
B f (x)
integral as an area (allowing for signs). You could get an approx-
C
imation to the value of the integral simply by drawing the graph
of f (x) on graph paper and counting squares below the graph.
This is crude and is a lot of work for a not very accurate result.
Our thin strips approach to areas gives us a better idea.
Choose an integer N and subdivide the interval [a, b] into N equal
subdivisions, each of length h = (b − a)/N . Call the subdivision
points a = x0 , x1 , x2 , . . . , xN = b. Let the values of f (x) at these
points be f (xi ) = yi .
If we look at one strip we can see that a reasonable approx- A D
imation to its area is given by the area of the ‘trapezium’ ABCD.
xk h xk+1
The smaller h becomes the better the approximation should be.
h
This area is given by 2 (yk + yk+1 ). Adding up all these pieces
we get
Figure 2.14: The area of below
Z b the curve is approximately the
h h h area of the trapezium.
f (x) dx ≈ (y0 + y1 ) + (y1 + y2 ) + · · · + (yN −1 + yN )
a 2 2 2
This can be tidied up the produce what is known as the Trapezium Rule.
Z b
h
f (x) dx ≈ (y0 + 2y1 + 2y2 + 2y3 + · · · + 2yN −1 + yN )
a 2
The only real virtue of this method is that it is easy the derive (and is rather better than counting squares).
Its accuracy turns out to be roughly proportional to 1/N 2 , at least if h is quite small and the graph is not
too crazy. This means that doubling the number of strips should about quarter the error.
Let me write down without derivation a much better method known as Simpson’s Rule. Same notation
as before only this time the number of strips has to be even. We will take the number of strips to be 2N ,
so h = (b − a)/(2N ). Simpson’s Rule says that
Z b
h
f (x) dx = (y0 + 4y1 + 2y2 + 4y3 + 2y4 + · · · + 2yN −2 + 4yN −1 + yN )
a 3
Note that the pattern of the coefficients is 1, 4, 2, 4, 2, 4, 2, . . . , 2, 4, 1. This method has accuracy roughly
proportional to 1/N 4 , on the same assumptions as before.
In practice these methods are applied by using them repeatedly with increasing values of N until the
results seem to have stabilised at the required level of accuracy. Very much a job for computers.

2.7 *Estimating the value of e


This is a footnote. We can use our ideas about integrals and areas to get an idea about the value of the
constant e. I quoted a value earlier, but did not deduce it.
Consider the graph of y = ex between x = 0 and x = a > 0 shown in Fig. 2.15. We know enough
about ex and its derivatives to be able to say that, on this interval, the graph lies above the tangent line
at (0, 1) and below the chord ED.
28 CHAPTER 2. APPLICATIONS OF INTEGRATION

This says that Z a


area ABCE < ex dx < area ABDE
0

Now ABCE has area a + a2 /2 and ABDE has area a(1 + ea )/2. The integral has value ea − 1. So
1 1 1
a + a2 < ea − 1 < a + aea
2 2 2
From these two inequalities we get, for 0 < a < 2,
1 2+a
1 + a + a2 < e a <
2 2−a
The outer values can be calculated. Put a = 1 and get 5/2 < e < 3. True, but not very precise.
Now put a = 1/n in the formula:
1 1 2n + 1
1+ + < e1/n < y = ex
n 2n2 2n − 1 y D

Finally, raise everything to the nth power: C


 n
1 1 n 2n + 1
(1 + + 2 ) < e <
n 2n 2n − 1 E
1
This is now a good result. The outer expressions can still, in
principle, be evaluated by arithmetic. The larger a value we take x
A B
for n a more precise result we get.
If n = 10 we get 2.7141 < e < 2.7206 (getting close). If
n = 1000 we get (with the help of a machine) Figure 2.15: The graph of ex lies
between tangent and chord.
2.71828138 < e < 2.7182821

Larger values of n will produce correspondingly better results.


Chapter 3

Methods of Integration

3.1 Introduction
R
So far our only way to work out f (x) dx has been, in effect, to ‘spot the answer’—i.e.
notice the function F (x) which, when differentiated, gives f (x).
This method will not help us very much with integrals like
Z
2x − 3
√ dx
x2 + 5x + 7
The purpose of this section is to introduce you to some techniques that can be used to
evaluate some integrals. Most integrals cannot be evaluated in terms of functions that you
know about.
The methods that I will show you are mostly techniques for converting one integral into
another one in the hope that the new integral is more familiar.

3.2 Substitution
This is really the reverse process to the chain rule in differentiation.
R 2x+3
Consider an integral like e dx. Suppose that we make the substitution y = 2x + 3
which defines a new variable y in terms of x. Then the integral turns into
Z
ey dx

This is not much use to us as it stands because of the mixture of x’s and y’s. We still have
to do something about the dx. Well, by a perverted form of the Chain Rule:
dy dx dy 1
dy = dx and dx = dy note: =
dx dy dx dx
dy
(Don’t take these too seriously, the process can be justified in other ways. I’m just telling
you what to do.)

29
30 CHAPTER 3. METHODS OF INTEGRATION
Z
1 1 1
In our example, dy = 2dx, so dx = 2
dy and our integral becomes ey dy = ey .
2 2
Changing back to x’s we get Z
1
e2x+3 dx = e2x+3
2
That is all there is to the method of substitution. The main problem in using it is in
deciding what substitution to make. There are very few rules for this. It is mainly a matter
of experience and common sense (not to mention good luck).
The best way to get you used to the method is to work through some examples. In the
first few I will just plonk down the substitution without explaining why I chose it. Later
on I will try to describe why I pick the substitution that I use.
Summary: Decide on a substitution. Change the integrand into a formula in terms of
the new variable. Change the ‘dx’ into something involving the new variable by means of
the chain rule. Now you have a new integral to do.
Z

Example 3.1. 3 − 5x dx
Make the substitution y = 3−5x. Then the chain rule gives, rather trivially, dy = −5dx
and the integral becomes
Z   Z
√ 1 1 √ 2
y − dy = − y dy = − y 3/2
5 5 15
That is the answer in terms of y. Now convert the answer back to x and get
Z
√ 2
3 − 5x dx = − (3 − 5x)3/2
15
Z 2
x +1
Example 3.2. dx
x+1
Put y = x + 1. Then dy = dx and the integral becomes
Z Z
(y − 1)2 + 1 2 1
dy = (y − 2 + ) dy = y 2 − 2y + 2 ln y
y y 2
or Z 2
x +1 1
dx = (x + 1)2 − 2(x + 1) + 2 ln(x + 1)
x+1 2
Z
dx
Example 3.3.
1 + x2
Put x = tan y (substitution the other way round this time). Then by the chain rule
dx = sec2 y dy and the integral converts into
Z Z Z
sec2 y dy sec2 y dy
= = dy = y
1 + tan2 y sec2 y
where we have used the identity 1 + tan2 x = sec2 x.So, converting back to x’s,
Z
dx
= arctan x
1 + x2
3.2. SUBSTITUTION 31
Z
2
Example 3.4. xe2x dx
Put y = 2x2 , then dy = 4x dx and the integral becomes
Z
1 y 1
e dy = ey
4 4
So Z
2 1 2
xe2x dx = e2x
4
Many integrals (especially those in examinations etc.) have the following form:
Z
f (g(x))g 0(x) dx

and these can be simplified by the substitution y = g(x) because then We get dy = g 0 (x) dx
and the integral becomes Z
f (y) dy

which may be easier to handle.


The general idea here is to look to see if the derivative of a nasty bit in the integral
appears as an independent term that can be grouped with the dx. A number of the above
examples were of this form.
Let me do a number of simultaneous examples so as to make the point

Z Z Z √
x 2 e x
√ dx x sin(x ) dx √ dx
2
x +2 x
Rearrange slightly
Z Z Z  
1 √ dx
2
√ (x dx) sin(x ) (x dx) e x

2
x +2 x
Now for the substitution

y = x2 + 2 y = x2 y= x
 
1 dx
dy = 2(x dx) dy = 2(x dx) dy = √
2 x
Z Z Z
1 1 1
√ dy sin(y) dy 2 ey dy
2 y 2
√ 1
y − cos(y) 2ey
2
√ 1 √
x2 + 2 − cos(x2 ) 2e x
2
32 CHAPTER 3. METHODS OF INTEGRATION
Z
1
Example 3.5. √ dx
x ln x √
This looks rather intimidating at first sight, particularly the ln x bit. But we notice
(or I notice) that there is a 1/x outside the square root and 1/x is the derivative of ln x.
So put y = ln x. Then dy = dx/x and the integral turns into
Z p
1 √
√ dy = 2 y = 2 ln(x)
y
Z
e2x
Example 3.6. Finally dx.
(3 + ex )3
This looks rather grim, but all you have to notice is that e2x = ex ex . Put y = ex + 3.
Then dy = ex dx and the integral becomes
Z
y−3 1 3 1 3
3
dy = − + 2 = − +
y y 2y 3+e x 2(1 + ex )2

3.2.1 Substitution in Definite Integrals


Rb
In one sense this is nothing
R new. If we want to work out a
f (x) dx we work out the
indefinite integral F (x) = f (x) dx and then
Z b
f (x) dx = F (b) − F (a)
a

There is another approach to the problem which becomes more significant later. The
idea is to use the substitution to change the definite integral itself. The process is very
simple. We change the integrand and the dx just as before and we also change the limits of
integration to their corresponding values in terms of the new variable of integration. (There
are situations in which this needs a little care, but we will not worry too much about that
at the moment.)
Z 2
Example 3.7. I= sin(4x − 3) dx
1
Suppose we make the substitution y = 4x − 3. Then the integrand becomes sin y and
the dx becomes 14 dy. The final step is to change the limits. When x = 1 we have y = 1.
When x = 2 we have y = 5. So
Z  5
1 5 1 1
I= sin y dy = − cos y = (cos(1) − cos(5))
4 1 4 1 4
Z π/2
Example 3.8. x cos(x2 ) dx
0
Put y = x2 , so dy = 2x dx. As x goes from 0 to π/2 the value of y goes from 0 to π 2 /4.
So the integral transforms into
Z 2  π2 /4
1 π /4 1 1 π2
cos(y) dy = sin(y) = sin
2 0 2 0 2 4
Z
B DX
3.3. THE DEFINITE INTEGRAL 33
Z e2
A X
dx
Example 3.9.
e x ln x
Put y = ln x. Then dy = dx/x and as x goes from e to e2 , y goes from 1 to 2. So the
integral becomes Z 2
dy
= [ln y]21 = ln(2)
1 y

Z b
dx
3.3 The definite integral
a x
This needs care. As I pointed out in an earlier chapter, saying that
Z
dx
= ln x
x
does not Zwork unless x > 0
−2
dx
Now is a perfectly sensible integral, as you will realise if you draw the graph,
−3 x
but Z −2
dx
= [ln(x)]−2
−3 = ln(−2) − ln(−3)
−3 x
is nonsense, since you cannot take the log of a negative. (Unfortunately, if we carry on
with our nonsense and write ln(−2) − ln(−3) = ln((−2)/(−3)) = ln(2/3) we end up with
the right answer!)
The form that we really need for the definite integral is this:
Z b
dx
= ln(b/a)
a x

provided that a and b have the same sign! If they don’t then the integral is not defined.
It is a good exercise for you to check that this answer is actually correct.

Questions 4 (Hints and solutions start on page 64.)

Q 3.1. Use the suggested substitutions to evaluate the following integrals.


Z Z
8
(3x − 1) dx (y = 3x − 1), e1−4x dx (y = 1 − 4x),
Z Z √
2 3 3
x sin(x ) dx (y = x ), x 2x2 − 1 dx (y = 2x2 − 1)
Z √ Z
x
1 − x2 dx (x = sin y), √ dx (y = x2 + 1)
2
x +1
34 CHAPTER 3. METHODS OF INTEGRATION
Z Z
6
sin x cos x dx (y = sin x), tan4 x sec2 x dx (y = tan x)

Q 3.2. Use substitution to evaluate the following integrals. This time you have to guess
the substitution.
Z Z Z
7 6x−7
(5x − 3) dx, e dx, x3 cos(x4 ) dx
Z Z √ Z
x 2 cos x
√ dx, x x − 1 dx,
3 dx
1−x 2 sin4 x
Z Z Z
−x2 4
xe dx, cos x sin x dx, cos4 (2x) sin(2x) dx
Z Z Z
x+1 dx ln t
√ dx, √ , dt
x2 + 2x + 3 2x − 1 t

Q 3.3. Use the trig formulas sin(a) cos(b) = (sin(a + b) + sin(a − b))/2, sin(a) sin(b) =
(cos(a − b) − cos(a + b))/2 and cos(a) cos(b) = (cos(a + b) + cos(a − b))/2 to show that in
n and m are positive integers then

Z ( Z
2π 2π
0 n 6= m
sin(nx) sin(mx) dx = , sin(nx) cos(mx) dx = 0
0 π n=m 0

Z (

0 n 6= m
cos(nx) cos(mx) dx =
0 π n=m

*Q 3.4. A function f (x) is said to be periodic with period T > 0 if f (x + T ) = f (x)


for
R T any value Rof2Tx. For example, sine and cosine are periodic with period 2π. Show that
0
f (x) dx = T f (x) dx. More generally, show that for any value of a,
Z a+T Z T
f (x) dx = f (x) dx.
a 0

*Q 3.5. Check, once more, that if we put t = tan(x/2) then


2t 1 − t2 dx 2
sin x = cos x = =
1 + t2 1 + t2 dt 1 + t2
This gives us a convenient substitution for turning a trigonometric integral into an algebraic
one. Use it on the following integrals
Z Z Z
dx dx dx
, ,
1 + cos x 1 + sin x sin x
3.4. INTEGRATION BY PARTS 35

3.4 Integration by Parts


This is a consequence of the product rule for differentiation.

(uv)0 = u0v + uv 0

Integrate this to get Z Z Z


0 0
(uv) dx = u v dx + uv 0 dx
R
But (uv)0 dx = uv. So, rearranging things a bit,
Z Z
0
u v dx = uv − uv 0 dx

This is the Integration by Parts formula.


Again, this is a method for converting one integral into another one in the hope that
the new one is easier to handle.
The method is usually appropriate in situations where the integrand is clearly the
product of two, often rather different, terms, one of which can be integrated (u0 → u) and
the other differentiated (v → v 0 ).
Z
Example 3.10. tet dt
The integrand is obviously a product of t and et . As it happens we can both differentiate
and integrate each factor. So we get a choice.
Let u0 = et and v = t. Then u = et and v 0 = 1. So the formula says that
Z Z
te dt = te − 1.et dt = tet − et
t t

If we had made the opposite choice we would have got


Z Z
t2 t 1
te dt = e −
t
t2 et dt
2 2
which is making things worse rather than better.
Example 3.11. We can handle definite integrals just as well as indefinite ones.
Z 1 Z 1
 t 1
te dt = te 0 −
t
et dt = (e − 0) − (e − 1) = 1
0 0

Notice that we evaluate the first term on the RHS in the usual way for definite integrals.
Z
Example 3.12. x cos x dx
Once more, the integrand is obviously the product of x and cos x, which are rather
different beasts. Once more we know how to differentiate and integrate each factor so we
36 CHAPTER 3. METHODS OF INTEGRATION

have to make a choice. If we integrate the x we will get x2 /2 which will probably make
things worse. So let us take u0 = cos x and v = x. Then u = sin x and v 0 = 1. So
Z Z
x cos x dx = x sin x − 1. sin x dx = x sin x + cos x

Z
Example 3.13. I= ex sin x dx
This turns out to be rather more complicated. Suppose we take u0 = ex and v = sin x.
Then u = ex and v 0 = cos x. So we get
Z
I = e sin x − ex cos x dx
x

which does not seem to help because we don’t know the integral on the RHS either. But
that integral, call it J, is also of the ‘parts’ type so, putting u0 = ex and v = cos x we get
Z
J = e cos x − ex (− sin x) dx = ex cos x + I
x

This looks as though we have gone full-circle to no avail. But we haven’t. What we have
got is
I = ex sin x − J = ex sin x − (ex cos x + I) = ex (sin x − cos x) − I
So
2I = ex (sin x − cos x)
and Z
1
ex sin x dx = ex (sin x − cos x)
2
That answers the question.
We have also found, for free, that
Z
1
ex cos x dx = ex (sin x + cos x)
2
Z
Example 3.14. ln x dx
This is a famous one. It does not look like a parts integral because there aren’t two
parts! However the dirty trick in this case is to regard the integrand as 1. ln x and then
take u0 = 1 and v = ln x. Then u = x and v 0 = 1/x. So
Z Z
1
ln x dx = x ln x − x. dx = x ln x − x
x
Z
Example 3.15. x arctan x dx
3.4. INTEGRATION BY PARTS 37

Once more, this is an obvious candidate for parts. Take u0 = x and v = arctan x (we
don’t have much choice this time). Then u = 12 x2 and v 0 = 1/(1 + x2 ). So we get
Z Z
x2 1 x2
x arctan x dx = arctan x − dx
2 2 1 + x2
which has changed our problem into that of integrating
Z
x2
dx
1 + x2
We can handle this by writing

x2 1 + x2 − 1 1
2
= 2
=1−
1+x 1+x 1 + x2
So Z Z Z
x2 dx
dx = dx − = x − arctan x
1 + x2 1 + x2
So, finally, we get
Z
x2 1 1 1
x arctan x dx = arctan x − (x − arctan x) = (x2 + 1) arctan x − x
2 2 2 2

3.4.1 *The Gamma Function


This is an interesting application of integration by parts. Let’s have a look at the integral
Z ∞
In = xn e−x dx
0

where n is some non-negative whole number.


This seems to be a candidate for integration by parts. Differentiate the xn and integrate the e−x . This
will give us Z ∞
 ∞
In = −xn e−x 0 + n xn−1 e−x dx
0

It is an important property of the exponential function that, whatever the value of n, xn e−x → 0 as x → ∞
(ex grows far faster than any power of x). So, if n > 0 the first term on the RHS vanishes at both ends.
The other term on the RHS involves an integral which is just the same as our original one with n replaced
by n − 1. So we have
In = n.In−1 for n ≥ 1
You grumble that this has not evaluated the integral—it has just turned it into another similar integral.
True, but that does actually make it easy to evaluate the original integral. The point is that the above
formula is valid for any positive integer n. So, climbing up the ladder, we have

I1 = 1.I0
I2 = 2.I1 = 2.1.I0
I3 = 3.I2 = 3.2.1.I0
I4 = 4.I3 = 4.3.2.1.I0
38 CHAPTER 3. METHODS OF INTEGRATION

—and so on. You will probably believe me if I say that the overall result is that In = n!.I0 .
This has reduced everything to the single problem of evaluating
Z ∞
I0 = x0 e−x dx = 1
0

(as you should check).


So we have obtained the rather nice result that
Z ∞
xn e−x dx = n!
0

Now for a generalisation. We had a positive integer n in the integrand as a power. There was actually
nothing in our integration procedure (the integration by parts) that relied on the fact that n was a whole
number. We could just as well look at the integral
Z ∞
f (a) = xa e−x dx
0

where a is any positive value. Doing integration by parts on this will give

f (a) = a.f (a − 1) if a>1

as before. If a is a whole number then f (a) = a!, but f (a) makes perfectly good sense for any positive
value a. So we have produced a kind of generalisation of the factorial function. We can now talk about the
factorial of 12 or π. This may sound a rather silly thing to do, but it does actually have wide application.
Traditionally, we do not work with the function f (a) but with the function Γ(a) = f (a − 1). This is
known as the Gamma Function,
Z ∞
Γ(a) = xa−1 e−x dx, Γ(a + 1) = a.Γ(a)
0

for a > 0. Of course, we have Γ(1) = Γ(2) = 1. √


To satisfy idle curiosity I can tell you that Γ( 12 ) = π

Questions 5 (Hints and solutions start on page 65.)

Q 3.6. Use integration by parts to evaluate the following integrals.


Z Z Z
3
x sin(2x) dx, x ln x dx, xe3x−1 dx

Now do the following by parts — where you may have to use parts more than once.
Z Z Z
2
x sin(x) dx, 2 3x−1
xe dx, ln2 x dx
Z Z Z
x
e sin x dx, arctan(x) dx, x2 e−x dx
Z Z Z
x3 e−x dx, 4 −x
x e dx x5 e−x dx
3.4. INTEGRATION BY PARTS 39

Q 3.7. This is mainly of interest to Statisticians.


Z A probability density is a function p(x) that is never negative and satisfies the condition

p(x) dx = 1. A random variable X has probability density p(x) if the probability that
−∞
X takes a value between a and b is given by
Z b
Pr(a ≤ X ≤ b) = p(x) dx
a

where a < b.
The mean value of X is defined to be
Z ∞
µ= x.p(x) dx
−∞

The variance of X is defined to be


Z ∞
ν= (x − µ)2 p(x) dx
−∞

and the standard deviation σ is given by σ 2 = ν.

Here are three functions. Check that they are all probability densities.

(
1
b−a
a≤x≤b
p1 (x) =
0 otherwise
(
θe−θx x≥0
p2 (x) = (θ > 0)
0 x<0
(
1
x2
x≥1
p3 (x) =
0 x<1

Show that p1 (x) (a uniform distribution) has mean 12 (a + b) and variance 12


1
(b − a)2 .
Show that p2 (x) (a Poisson distribution) has mean 1/θ and variance 1/θ2 .
Show that p3 (x) does not have a finite mean.
Show that the formula for the variance can be rearranged to give
Z ∞
ν= x2 p(x) dx − µ2 .
−∞

If the random variable X has the Poisson distribution p2 (x) show that the probability
that the value of X is greater than the mean value is 1/e.
40 CHAPTER 3. METHODS OF INTEGRATION

*Q 3.8. This is a follow up to some integrals that you did in an earlier exercise. Let
Z 1
In = xn ex dx
0
for n a whole number ≥ 0. So, for example,
Z 1 Z 1
I6 = x6 ex dx and I9 = x9 ex dx
0 0
By using integration by parts, integrating the exponential and differentiating the power,
prove the general result that if n > 0
In = e − nIn−1
This is what is known as a Reduction Formula, it gives us the value of In in terms of the
value of In−1 . What use is that? Well, it is easy to evaluate I0 — do so. The formula now
tells us the value of I1 and, using it once more, the value of I2 and so on. By repeated
use of the formula, and no further integration, we can get the value of In for and positive
integer n. Work out I4 . Z 1
Go through the same process for the integral xn e−x dx and work out I3 .
0
Now look at the integral
Z π
In = xn sin x dx n≥0
0
By doing integration by parts on this twice over, integrating the trig function and differ-
entiating the power, show that
In = π n − n(n − 1)In−2 n>1
This is slightly more complicated in that it relates In to In+2 rather than to In+1 . This
means that you go up in steps of 2. If you think about it you will realise that you now
need two starting points: I0 and I1 . Work out both of these and then work out I3 and I4 .
*Q 3.9. Consider Z 1
I(n, m) = xn (1 − x)m dx
0
where n and m are integers ≥ 0. By making the substitution y = 1 − x, show that
I(n, m) = I(m, n). Show that
1
I(n, 0) = I(0, n) =
n+1
Use integration by parts to show that
m
I(n, m) = I(n + 1, m − 1)
n+1
Deduce from this that
n! m!
I(n, m) =
(n + m + 1)!
3.5. QUADRATICS AND TRIGONOMETRIC SUBSTITUTIONS 41

3.5 Quadratics and Trigonometric Substitutions



You often find terms like x2 − 3x + 5 in integrals. This section suggests a way of dealing
with them that might work.
The basic idea is to use variations on the formulas

1 − sin2 x = cos2 x 1 + tan2 x = sec2 x sec2 x − 1 = tan2 x

cosh2 x − 1 = sinh2 x
as suggestions for substitutions.
Z
dx
Example 3.16. √
1 − x2 √
Make the substitution x = sin y. Then dx = cos y dy and 1 − x2 = cos y (if we are
not being fussy about signs).
So our integral becomes
Z Z
cos y dy
= dy = y = arcsin x
cos y
Z
dx
Example 3.17.
1 + x2
Make the substitution x = tan(y). Then 1 + x2 = 1 + tan2 (y) =R sec2 (y) and dx =
2
sec (y) dy. So with this substitution the integral just boils down to dy = y. Turning
back to x we get the answer arctan(x).
Z
dx
Example 3.18. This is where we have to start being a little bit cleverer. The
2 + x2
expression in the denominator is similar to the 1 + x2 that we dealt with in the previous
example. We take√the hint and try to turn it into exactly that form. Start by making the
substitution x = 2 y. Then the denominator becomes 2 + 2y 2 . We can take a 2 out from
the denominator and get the integral (check)
Z
1 dy

2 1 + y2

This is now just the same as our previous example and integrates to give arctan(y)/ 2.
So the answer for our original integral is
 
1 x
√ arctan √
2 2
Z
dx
Example 3.19. √
3x2 − 2
Let’s use a hyperbolic substitution for a change. First it would help if we tidied the
integral up a bit. The ‘standard form’ that we have in mind in this case for the expression
under the square root is y 2 − 1. We want to make a substitution that will produce this
42 CHAPTER 3. METHODS OF INTEGRATION
p
form. Then we can go ahead and use a cosh substitution. So put x = 2/3 y. Then the
integral becomes Z
1 dy
√ p
3 y2 − 1
Now make the substitution y = cosh z. Then dy = sinh z dz and the integral becomes
Z Z
1 sinh z dz 1 z cosh−1 y
√ =√ dz = √ = √
3 sinh z 3 3 3
and finally back to x: r
cosh−1 y 1 3
√ = √ cosh−1 x
3 3 2
Gulp.
As a quick summary of this:

Handle √1 − x2 by the substitution x = sin y
Handle √1 + x2 by the substitution x = tan y
Handle x2 − 1 by the substitution x = cosh y
Note that there are other possibilities, like x = sec y in the x2 − 1 case.

The next problem is to handle more general quadratics, like ax2 + bx + c. We handle
these by using the process known as ‘completing the square’ to turn the square root into
one of the cases that we have already dealt with. This process goes as follows.
b b b2
ax2 + bx + c = a(x2 + x) + c = a(x + )2 + (c − )
a 2a 4a
2
So the substitution y = x + b/2a will produce the change from ax + bx + c to
ay 2 + ∆
where
4ac − b2
∆=
4a
What you do next depends entirely on the signs of a and ∆.
Z
dx
Example 3.20. √
x2 + x + 1
Complete the square on the quadratic:
1 3
x2 + x + 1 = (x + )2 +
2 4
1
So put y = x + and turn the integral into
2
Z
dy
q
y 2 + 34
q
This will now yield to the substitution y = 34 tan z.
3.5. QUADRATICS AND TRIGONOMETRIC SUBSTITUTIONS 43
Z
dx
Example 3.21. √
2x2 + 5x − 1
Complete the square on the quadratic:
5 5 50 5 66
2x2 + 5x − 1 = 2(x2 + x) − 1 = 2(x + )2 − − 1 = 2(x + )2 −
2 4 16 4 16
5
So put y = x + 4
and turn the integral into
Z r Z
dy 16 dy
q = p
2y 2 − 66 66 a2 y 2 − 1
16
q
32
where a = Now put y = a1 cosh z and proceed.
66
.
Z
2x + 3
Example 3.22. √ dx
2 − x − x2
First handle the square root by completing the square
1 1 9 1
2 − x − x2 = 2 − (x2 + x) = 2 − ((x + )2 − ) = − (x + )2
2 4 4 2
1
So start by putting y = x + 2
and get
Z
2y + 2
q dy
9
4
− y 2

This is almost in standard form. Put y = 32 sin θ. Then the integral becomes
Z Z
(3 sin θ + 2) 32 cos θ dθ
3 = 3 sin θ + 2 dθ = 2θ − 3 cos θ
2
cos θ
That’s the answer, but it would be nice to have it in terms of x!
First we step back to y:
2 p 4
θ = arcsin( y) and cos θ = (1 − y 2)
3 9
So the value of the integral becomes
r
2 4
2 arcsin( y) − 3 1 − y2
3 9
Finally, go back to x and get the expression
 
2x + 1 √
2 arcsin − 2 2 − x − x2
3
If you care to differentiate this you should find that you get back to the original integrand.
44 CHAPTER 3. METHODS OF INTEGRATION

Questions 6 (Hints and solutions start on page 67.)

Q 3.10. Rewrite each of the following in one of the forms X 2 + A2 , X 2 − A2 , A2 − X 2 ,


−X 2 − A2 or ±X 2 by completing the square.

9x2 + 6x + 5, 4x2 − 4x − 3, 9x2 − 12x + 4

4x − 2x2 , 2 − 4x − 4x2 , x2 + x + 2
Now work out the integrals
Z Z Z
dx dx dx
√ , √ , √
2 − 4x − 4x2 4x − 2x2 9x2 + 6x + 5

3.6 Integration of Rational Functions and Partial Frac-


tions
We are now going to study integrals of the form
Z
p(x)
dx
q(x)

where p and q are polynomials.


We will not study the general case. Instead, we will start by assuming the following:
(1) The denominator q can be factored as a product of linear factors (ax + b), all
different.
(2) The degree of the numerator is less than that of the denominator.
(Note: (1) needs a bit of care. We do not count (x + 1) and (2x + 2) as different factors.
It would be more accurate to say that no two factors should be proportional.)
As examples:
Z Z Z
dx 2x + 3 x2
, dx dx
(x + 1)(x + 2) (3x − 4)(1 − 2x) (x + 1)(x − 1)(2x − 3)

The following integrals do NOT satisfy the conditions


Z
x2
dx degrees wrong
(x + 1)(x + 2)
Z
(x + 1)
dx square factor
(x − 1)2 (x + 2)
Z
(x + 1)
2
dx cannot factorise denominator
x +x+1
3.6. INTEGRATION OF RATIONAL FUNCTIONS AND PARTIAL FRACTIONS 45

To do this kind of integral we need the following result from algebra:


Any expression
f racp(x)(x + b1 )(x + b2 ) · · · (x + bk )
where p(x) is a polynomial of degree less than k and all the factors in the denominator are
different (in the above sense) can be expanded out in Partial Fractions as

A1 A2 Ak
+ + ···+
x + b1 x + b2 x + bk
where the As are constants.
That sounds complicated. What it means is shown by the following examples
1 A B
= +
(x + 1)(x + 2) x+1 x+2
x+1 A B
= +
(x − 3)(2x + 3) x − 3 2x + 3
x2 A B C
= + +
(x − 1)(x + 1)(x − 3) x−1 x+1 x−3
If we have produced this kind of expansion then the integration is easy. All we have to
know is that Z
dx 1
= ln |ax + b|
ax + b a
So, using the above examples:
Z Z Z
dx dx dx
=A +B = A ln |x + 1| + B ln |x + 2|
(x + 1)(x + 2) x+1 x+2

Z Z Z Z
x2 dx dx dx dx
=A +B +C
(x − 1)(x + 1)(x − 3) x−1 x+1 x−3
= A ln |x − 1| + B ln |x + 1| + C ln |x − 3|

The remaining problem is: how do we find the constants A, B etc.?


Consider the first example. We know, from the theorem, that

1 A B A(x + 2) + B(x + 1)
= + =
(x + 1)(x + 2) x+1 x+2 (x + 1)(x + 2)

If this is going to work for all values of x then we must have

A(x + 2) + B(x + 1) = 1

for all values of x.


46 CHAPTER 3. METHODS OF INTEGRATION

Let me now show you two methods for finding the values of A and B. The first is the
most general but the second is usually the easiest in these cases.
1) gather together powers of x and then compare coefficients on both sides of the
equation: (A + B)x + (2A + B) = 1 so A + B = 0 and 2A + B = 1. These simultaneous
equations now solve to give A = 1 and B = −1.
2) A(x + 2) + B(x + 1) = 1 is true for all values of x, so it is true for any particular value
of x that we put into it. If we put x = −1 we will kill off the B term and get (−1 + 2)A = 1,
so A = 1. If we put x = −2 we kill off the A term and get (−2 + 1)B = 1, so B = −1.
So, either way,
1 1 1
= −
(x + 1)(x + 2) x+1 x+2
Example 3.23.
x2 A B C
= + +
(x − 1)(x + 1)(x − 3) x−1 x+1 x−3
A(x + 1)(x − 3) + B(x − 1)(x − 3) + C(x − 1)(x + 1)
=
(x − 1)(x + 1)(x − 3)
So we must have

A(x + 1)(x − 3) + B(x − 1)(x − 3) + C(x − 1)(x + 1) = x2

for all values of x.


Put x = 1 to kill off the B and C terms: (1 + 1)(1 − 3)A = 1, A = − 14 .
Put x = −1 to kill off the A and C terms: 8B = 1, B = 18 .
Put x = 3 to kill off the A and B terms: 8C = 9, C = 98 .
So
x2 1 1 1 1 9 1
=− + +
(x − 1)(x + 1)(x − 3) 4x−1 8x+1 8x−3
Now we can do the integral
Z Z Z Z
x2 dx 1 dx 1 dx 9 dx
=− + +
(x − 1)(x + 1)(x − 3) 4 x−1 8 x+1 8 x−3
1 1 9
= − ln |x − 1| + ln |x + 1| + ln |x − 3|
4 8 8

If the function to be integrated has a numerator of degree not lower than that of the
denominator then you have to start by dividing the denominator into the numerator. For
example
x3 − 1 4x − 1
= (x − 2) +
x(x + 2) x(x + 2)
The first term on the RHS is easy and you can do partial fractions on the second.
Question is: how do you do the division? You may well have met some way of doing this in school.
The basic method goes as follows. Suppose we are dividing x2 + x + 1 into 3x4 + x2 + x + 1. Look at the
3.6. INTEGRATION OF RATIONAL FUNCTIONS AND PARTIAL FRACTIONS 47

‘top’ terms of the two polynomials: x2 and 3x4 . The first goes into the second 3x2 times. So multiply the
first polynomial by 3x2 and subtract it from the second:
(3x4 + x2 + x + 1) − 3x2 (x2 + x + 1) = −3x3 − 2x2 + x + 1
Now start again. The top term x2 of the divisor goes into the top term −3x3 of our remainder −3x times.
So subtract −3x times the divisor from the remainder:
(−3x3 − 2x2 + x + 1) − (−3x)(x2 + x + 1) = x2 + 4x + 1
Keep going. The top term x2 of the divisor goes into the top term x2 of the remainder 1 time. So subtract
1 times the divisor from the remainder:
(x2 + 4x + 1) − 1.(x2 + x + 1) = 3x
We have now got down to the point where the remainder has lower degree than the divisor, so we stop.
The ‘multipliers’ that we have used make up the Quotient 3x2 − 3x + 1 and the final remainder is 3x. So
3x4 + x2 + x + 1 3x
= 3x2 − 3x + 1 + 2
x2 + x + 1 x +x+1

Questions 7 (Hints and solutions start on page 68.)

Q 3.11. As some revision here are some integrals. Do the ones that can be done and explain
why the others do not make sense.
Z 2 Z 1 Z 1
dx dx dx
, ,
1 x+2 −1 2 − x −1 2x + 1
Z 0 Z 1 Z 2
dx dx dx
, ,
−1 3x − 2 0 5 − 4x 1 −3 − x

Q 3.12. Expand each of the following expressions into partial fractions and then integrate
the results.
1 1 1
, ,
(2 + 3x)(x − 2) (x − 1)(x − 3) (2x + 1)(3x − 2)
x+3 x 3 − 4x
, ,
(x + 1)(x + 2)x (2 − x)(x − 1)
2 x − 3x2 + 2x
3

Q 3.13. Evaluate the following integrals


Z 2 Z 4 Z 1
dx (2x + 3) x2
, dx, dx.
1 (1 + x)(3 + x) 0 (x + 3)(2x + 5) 0 (x + 1)(x + 2)(x + 3)

Q 3.14. In the following cases you will have to start by dividing the (expanded) denomin-
ator into the numerator.
Z Z Z
2+x x2 + 1 2x3
dx dx dx
1+x (x + 1)(x + 2) (x + 2)(x − 3)
48 CHAPTER 3. METHODS OF INTEGRATION

3.6.1 *Further Details


If the integrand has powers of factors in its denominator, for example a denominator like x3 (x − 1)(x + 2)2 ,
then you can still do partial fractions but you have to modify the expansion a little. Each square factor
(x + a)2 produces two terms in the expansion:
A B
+
x + a (x + a)2
Similarly, a third power like (x + a)3 produces three terms in the expansion:
A B C
+ +
x + a (x + a)2 (x + a)3
The same pattern holds for higher powers. A term of power n, like (x+ a)n , in the denominator contributes
n terms to the partial fraction expansion:
A1 A2 An
+ + ··· +
x + a (x + a)2 (x + a)n
It may be the case that the polynomial in the denominator of the integrand cannot be factorised into
linear factors. In theory, if not in convenient practice, it can always be factored into linear (ax + b) and
quadratic (ax2 +bx+c) factors. Single quadratic factors are handled in much the same way as linear factors
with the difference that, instead of having a single constant in the numerator of the partial fractions term,
you have a term Ax + B. For example:
2x + 3 Ax + B C
= 2 +
(x2 + 1)(x + 2) x +1 x+2
x Ax + b C D
= 2 + +
(x2 − x + 3)(x + 1)2 x − x + 3 x + 1 (x + 1)2
This adds greatly to the difficulty of integrating the resulting expansion because we now have to deal with
integrals like Z
Ax + B
dx
px2 + qx + r
These are ‘easy’, but can be tedious.
One final comment. I really ought to justify my earlier claim about ‘comparing coefficients’. The
claim was that if two polynomials in x have the same value for all values of x then they must be the
same polynomial, i.e. have the same coefficients. This is a fact that is used quite frequently. How do we
prove it? The easiest approach is to say that if polynomials p(x) and q(x) have the same values for all
values of x then the polynomial r(x) = p(x) − q(x) must be zero for all values of x. So we really have to
prove that the only polynomial that is zero for all values of x is the ‘zero polynomial’ 0 (all coefficients are
zero). There are lots of ways to do this. Since this is a calculus course I will suggest the following possible
approach. Since r(x) is always zero all its derivatives must always be zero as well. If you now evaluate
these derivatives at x = 0 you will show that all the coefficients of r(x) must be zero. As a simple example,
if r(x) = ax2 + bx + c then r0 (x) = 2ax + b and r00 (x) = 2a. So r(0) = c = 0, r0 (0) = b = 0 and r00 (0) = 2a,
so a = 0. The same process works for any degree.
A final, final comment. I stated earlier that any polynomial can be factorized into a product of linear
factors (ax + b) and quadratic factors (ax2 + bx + c). This is not meant to be obvious. It is, in fact, a very
profound theorem known as the Fundamental Theorem of Algebra first proved by Carl Gauss at the start
of the Nineteenth Century (though the result had been accepted as true long before that). Knowing that
such a factorisation is possible is a very different thing to finding the factorisation in a particular case.
Indeed, it has been shown that there is unlikely to be any systematic method of doing this for polynomials
of high degree (within certain constraints, it is not possible for degree higher than 4). Final exercise: 1 +x4
factorises into a product of two quadratic factors in a simple way; find them. When you have found them
you can start feeling smug—it took mathematicians a surprisingly long time in the Eighteenth Century to
solve this problem.
Chapter 4

Differential Equations

This is a very brief introduction to a very important topic. If you meet mathematics again
after this year then you will probably meet differential equations again as well.

4.1 Introduction
A differential equation is an equation for an unknown function, say y(x), which involves
derivatives of the function.
For example

dy y 000 − y 0
= x, y 00 − 3y 0 + 2y = sin x, = x + y0
dx y2

The order of a differential equation is the order of the highest derivative occurring in
it. In the above examples the orders are 1,2,3.
[Technically, these are known as Ordinary Differential Equations (odes) because the
unknown function is a function of one variable. Differential equations involving functions
of several variables and their partial derivatives are called Partial Differential Equations
(pdes).]
Many laws in science and engineering are statements about the relationship between a
quantity and the way in which it changes. The change is often measured by a derivative
and therefore the mathematical expression of these laws tends to be in terms of differential
equations. Our earlier example of Malthus’ Law was a case in point.
Given a differential equation the obvious reaction is to try to solve it for the unknown
function. As with integrals, and for much the same reason, this is easier said than done.
In this chapter I will have a quick look at one very simple class of differential equations.
The aim is to give you some feel for the way in which differential equations behave.
Consider the differential equation y 00 (x) = x, where the dash denotes differentiation wrt
x. Integrating both sides of this equation wrt x we get
1
y 0 = x2 + C
2
49
50 CHAPTER 4. DIFFERENTIAL EQUATIONS

where C is an arbitrary constant of integration. This is one place where it is crucially


important to include the constant of integration!
Now integrate once more and get
1
y = x3 + Cx + D
6
where D is a further constant of integration.
We now have the General Solution of the differential equation with arbitrary con-
stants C and D. Note that this is really an infinite class of solutions. If we give C and
D particular values then we get a Particular Solution. For example, y = x3 /6 + x and
y = x3 /6 + 2x − 3 are particular solutions of the equation.
The values of the arbitrary constants that we almost invariably acquire when solving
a differential equation are usually determined by giving conditions that the solution is
required to satisfy. The most common kind of conditions are Initial Conditions, where
the values of y and some of its derivatives are given for a specific value of x.
Example 4.1. Find the solution to y 00 = x then satisfies y(0) = 1 and y 0 (0) = 0.
We know that the general solution is
1
y = x3 + Cx + D
6
The condition y(0) = 1 says that 1 = 0 + 0 + D, so D = 1. The condition y 0 (0) = 0 says
that 0 = 0 + C, so C = 0. So the required solution is
1
y = x3 + 1
6
Note that an equation of order n generally requires n integrations to get the general
solution, so the general solution can be expected to contain n unknown constants and you
would expect to have to give n conditions to fix these constants.
Those of you who know some physics will know that Newton’s law of motion relates
acceleration (second derivative) to force (which is usually a function of position and time).
This yields a second order differential equation. In the simple case of a particle moving in a
straight line the general solution should contain two constants of integration. A particular
solution can be specified by giving the initial position and velocity of the particle, and this
corresponds well with our physical intuition.
Example 4.2. I drop a stone from height H above the ground. It falls under gravity and
there is no air-resistance. When does it hit the ground?
Measure x vertically upwards from the ground. Let x(t) be the height of the stone
above the ground at time t. Suppose that the particle is dropped at time t = 0.
Physics tells us that x(t) satisfies the differential equation

ẍ = −g where g is a constant

Our Initial Conditions are that x(0) = H and that ẋ(0) = 0.


4.2. SEPARABLE EQUATIONS 51

Integrating the equation gives ẋ = −gt + C and integrating once more gives

gt2
x(t) = − + Ct + D
2
—this is the general solution.
The condition x(0) = H says that D = H and the condition ẋ(0) = 0, applied to the
previous equation, says that C = 0. So the required solution is

gt2
x(t) = − +H
2
The stone hits the ground when x = 0. This happens when
s
1 2 2H
H = gt or t =
2 g

4.2 Separable Equations


This is the only class of differential equations that I am going to treat in general.
A differential equation is said to be separable if it can be manipulated into the form

dy
f (y) = g(x)
dx
You can, in principle, solve this equation by integrating both sides with respect to x. You
get Z Z
f (y) dy = g(x) dx + C

It may not be possible to express y simply in terms of x.


The following are examples of separable equations

dy dv dy
y2 = x + 1, ev = 2u, (1 + y) =1
dx du dx
So are the following, though they need some rearrangement:

1
x2 dx
dy
= ey → e−y dx
dy
= x2
1+x
dy
dx
= 1+y
→ dy
(1 + y) dx =1+x
1+x
xy 0 = 1+y
→ (1 + y)y 0 = 1 + 1/x

Let’s do some examples.


52 CHAPTER 4. DIFFERENTIAL EQUATIONS

Example 4.3. yy 0 = x2
This equation rearranges to give
Z Z
1 2 1 3
y dy = x2 dx + C or y = x +C
2 3
The explicit solution comes in two cases
r r
2 3 2 3
y(x) = x + 2C and y(x) = − x + 2C
3 3
(Notice that this example shows that the solution of a differential equation may not exist
for all values of x. In this case there will be values of x for which the term under the square
root is negative.)
Example 4.4. y 0 = ey x
This can be rewritten as e−y y 0 = x and gives
Z Z
−y 1
e dy = x dx + C or − e−y = x2 + C
2
The explicit solution is then
1
y(x) = − ln(−C − x2 )
2
There are values of C for which this solution does not exist. Note that C cannot be allowed
to be positive.
dy x+1
Example 4.5. =
dx y+1
This can be rewritten as (y + 1)y 0 = x + 1. So integrating it we get
1 1
(y + 1)2 = (x + 1)2 + C
2 2

4.2.1 The Malthus Equation


Let us go back to the population model that we developed in the section on the exponential
function.
dP
= kP, P (0) = P0
dt
where k is a constant.
This is a separable equation and we can rearrange it to get
Z Z
dP
= k dt + C
P
or
ln |P | = kt + C
Exponentiate both sides and get
P (t) = ±eC ekt
now impose the initial condition P (0) = P0 and get the result
P (t) = P0 ekt
4.3. GENERALITIES 53

4.2.2 *The Logistic Equation


This is meant as an improvement on the above population model. The Malthus model can be quite accurate
over short periods of time but has the obvious disadvantage that populations never carry on growing as
rapidly as the Malthus model suggests. Eventually the population grows too big for its environment, it
runs short of food etc. There is no reason to expect the population to grow rapidly in such a situation.
The Logistic Law tries to correct for this by including an inhibiting factor. It gives the equation
 
dP P
= kP 1 −
dt Q

where we will take k and Q to be positive constants. The idea here is that P starts off much smaller than
Q. In that case, P/Q is quite small to start with, so the equation looks rather like

dP
= kP
dt
— i.e. Malthus. As the population grows and P gets closer to Q the behaviour changes. The right hand
side starts to get smaller, leading to an effective reduction in the growth rate. In fact, as we will see in a
moment, Q is an upper limit for the population.
Now we solve the equation. It is of separable type and can be rearranged to give
Z Z
dP
= k dt + C
P (1 − P/Q)
The integral on the LHS is a standard partial fractions job. You can check that
1 1 1
= +
P (1 − P/Q) P Q−P
So Z
dP P
= ln |P | − ln |Q − P | = ln
P (1 − P/Q) Q−P
So
P

ln = kt + C
Q−P
If we now impose the initial condition P (0) = P0 and have 0 < P0 < Q then the solution can be written
as (exercise)
Q
P (t) =  
1 + PQ0 − 1 e−kt

If you look hard at this mess, most of which is made up of constants, you will see that t only comes in in
the exponential. As t increases the exponential decreases (k > 0), so the denominator gets smaller, so P
gets bigger. So the population is steadily increasing. We could have seen this more easily by looking at
the differential equation itself: if P > 0 and P < Q then the equation says that Ṗ > 0.
As t → ∞ the exponential term tends to zero and the solution tends to the value Q. The graph of the
population against time looks something like the Fig 4.1. Note that if P0 is not much smaller than Q then
there is no pretense at being Malthusian at the start

4.3 Generalities
Even the simple examples that we have done so far highlight most of the basic points about
the behaviour of differential equations.
54 CHAPTER 4. DIFFERENTIAL EQUATIONS

P0

P0 t

Figure 4.1: Solutions of the Logistic Equation.

1. Since the process of solving a differential equation involves integration so as to get rid
of the derivatives we always acquire arbitrary constants in our solution. This means
that, in general, differential equations have infinitely many solutions.

2. An expression for the arbitrary solution of a differential equation, involving all the
unknown constants of integration, is called the General Solution to the equation.
A solution that you obtain by giving values to the constants of integration is called a
Particular Solution. For example, the General Solution to the differential equation
y 0 = x is y(x) = 12 x2 + C. The functions y(x) = 12 x2 (C = 0) and y(x) = 12 x2 + 2
(C = 2) are Particular Solutions.

3. We haven’t done many higher-order equations yet but, as you will realise, an equation
of order n contains an nth order derivative of the unknown function y that has to
be reduced down to y. This requires n integrations. Each integration produces a
constant of integration. So, in general, the general solution to an equation of order
n will involve n unknown constants.

4. To obtain a particular solution from a general solution we need to be told something


about the required solution in order to fix the values of the constants of integration.
A fairly standard approach to this, very common in dynamics, is to give information
about the solution and its derivatives at a particular value of x. This is called, for
historical and practical reasons, specifying Initial Values for the problem.

5. There are lots of other ways to determine a particular solution. Sometimes it is done,
for second order equations, by giving the value of y at two different values of x. This
is called giving Boundary Values for the problem.

4.4 *Linear First-Order Equations


These are differential equations of the form

dx
a(t) + b(t)x = c(t) (4.1)
dt
They can always be solved, in principle, by a method known as the Integrating Factor Method.
4.4. *LINEAR FIRST-ORDER EQUATIONS 55

If we start by dividing through by a(t) we can simplify the equation down to

ẋ + β(t)x = γ(t) (4.2)

Now, suppose we can find a function f (t) such that

f˙ = β(t)f (4.3)

Multiply both sides of (4.2) by f and get

d
f γ = f ẋ + βf x = f ẋ + f˙x = (f.x)
dt
as a consequence of the rule for differentiating a product.
We can now integrate and get Z
1
x= f γ dt
f
The only remaining problem is to find an f to satisfy (4.3). But (4.3) is just an ordinary separable equation
and we get the solution Z
ln f = β dt

Let me do one or two examples to show you that it is easy (in principle).
Consider the equation tẋ + 2x = 1. If we multiply through by t we get

d 2
t = t2 ẋ + 2tx = (t x)
dt
So, integrating,
1 2 1
t2 x = t + C so x(t) = + f racCt2
2 2
Now consider the equation ẋ + tx = t. In this case β = t, so
Z
f = exp( β dt) = exp(f ract2 2)

(Note that we don’t have to bother with a constant of integration because we are just looking for something
which satisfies (4.3).)
Multiplying through by f our equation becomes
2 2 2
et /2
ẋ + tet /2
x = tet /2

or
d t2 /2 2
(e x) = tet /2
dt
Integrate and get Z
2 2 2
et /2
x= tet /2
dt = et /2
+C

So the solution is
2
x(t) = 1 + Ce−t /2

One more example for luck. Consider the equation ẋ + sin(t)x = cos(t). Here we have β(t) = sin(t)
and we get f by Z
ln f = β dt = − cos(t) so f = e− cos t
56 CHAPTER 4. DIFFERENTIAL EQUATIONS

Multiply through the equation by f and get


d
f ẋ + f sin(t)x = (f x) = cos(t)e− cos t
dt
Thus Z
e− cos t x = cos(t)e− cos t dt + C

and Z
x(t) = ecos t cos(t)e− cos(t) dt + Cecos t

Unfortunately, as often happens when using this method, I don’t think that this integral can be done
(prove me wrong if you can).

Questions 8 (Hints and solutions start on page 68.)

Q 4.1. Solve these differential equations together with the given conditions. Remember
that you can always check your solution by plugging it back into the equation.

x2
y0 = y(1) = 1, y 0 = y 2 (x + 1) y(0) = 1
y2
1
xy 0 = y 2 (1 + x) y(1) = −1, y 0 = y(1 − y) y(0) =
2
dr du
= r 2 sin θ r(0) = 1, = eu+v u(0) = 0
dθ dv

Q 4.2. Find the solution to y 000 (x) = x that satisfies y(0) = 0, y(1) = 1 and y(2) = 2.

Q 4.3. Newton’s Law of cooling says that, under certain circumstances, a body cools (loses
temperature) at a rate proportional to the difference between the temperature of the body
and that of the surrounding air. So if the temperature of the body at time t is T (t) and
the temperature of the air is T0 then Ṫ = −κ(T − T0 ), where κ is a positive constant.
Solve this equation (on the assumption that T0 is constant and T (0) > T0 ). Suppose
that T0 = 20◦ and that T (0) = 100◦ . If the temperature of the body after 10 seconds is
80◦ what is the temperature after 20 seconds. When does the temperature drop to 30◦ ?

Q 4.4. Pareto’s Law in Economics says that if y(x) represents the number of people in
a stable economy whose incomes are greater than x then the rate of decrease of y with
respect to x is proportional to y and inversely proportional to x. Show that this leads to
a differential equation of the form
dy y
= −c
dx x
Find the general solution to this equation (Pareto’s Law).
4.4. *LINEAR FIRST-ORDER EQUATIONS 57

*Q 4.5. Consider the differential equation x2 y 0 = xy + y 2 You probably can’t solve this as
it stands. Now introduce a new function v(x) by y(x) = xv(x). Rewrite the equation in
terms of v and show that you get xv 0 = v 2 . Solve this and hence solve the original equation.

*Q 4.6. An infectious disease breaks out in a population. At any time thereafter let N (t) be the number
of people who have not caught the disease yet, let D(t) be the number of people who currently have the
disease and let R(t) be the number of people who are out of it for some reason (immune, isolated, recovered
or dead). If P is the total population (assumed constant if we count the dead) then N + D + R = P at all
times.
The rate at which susceptible people catch the disease depends on how likely they are to meet somebody
who has the disease. The chances of one susceptible person meeting a diseased person in the time interval
from t to t + dt is assumed to be proportional to (D/P )dt. This leads to the equation

ND
Ṅ = −α (4.4)
P
where α is a positive constant.
Suppose that people ‘recover’ from the disease at a fixed rate β. Then, taking into account the people
who are catching the disease, we have the equation
ND
Ḋ = α − βD (4.5)
P

Consequently, to keep the total population constant, we have Ṙ = βD.


Now, accepting these three equations, we want to know what is going to happen. If we give the disease
to a small number of people in the population we want to know things like (a) how many people will
eventually catch the disease, (b) how many people have the disease at its peak, (c) how long the epidemic
lasts, (d) is there actually an epidemic or does the disease fail to take hold in the population?
Divide equation (4.5) by (4.4) and show that you get

dD βP
= −1
dN αN
Solve this under the condition that N (0) = P and D(0) = 0. (This is meant to idealise the situation of
having a very small number of diseased people in the population. If you don’t like this then set N (0) = P −
and D(0) = —it doesn’t make a significant difference.)
You should get
D β N N
= ln( ) + 1 −
P α P P
Suppose that when the epidemic finally ends 50% of the population have had the disease. What is the
value of α/β and what percentage of the population had the disease when it was at its peak?
Suppose that, at the peak of the epidemic, 10% of the population have the disease. What percentage
of the population will have had the disease by the end of the epidemic? (You probably cannot solve the
equations you get, but use your calculator to try to estimate the answer roughly.)
Can you show that the condition for an ‘epidemic’ to occur, as opposed to just a handful of people
getting the disease, is that β should be (significantly) less than α? In other words, what happens if β is
greater than α?
58 CHAPTER 4. DIFFERENTIAL EQUATIONS
Appendices

Table of Integrals

This is a short table of some standard integrals. The left column is the function and the
right column is an indefinite integral for it. You can add in a constant of integration if you
want to.

Anything with a logarithm in it is to be treated with caution!

59
60 APPENDICES

1
xn xn+1 n 6= −1
n+1
1
ln |x| see text for problems
x
1 1
ln |ax + b| as above
ax + b a
x 1
(ax + b − b ln |ax + b|) as above
ax + b a2
1 1
arctan(x/a)
a2 + x2 a
1
√ arcsin(x/a) 0≤x≤a
a2 − x2
1 √
√ ln(x + x2 − a2 ) 0≤a≤x
x − a2
2
1 √
√ ln(x + x2 + a2 )
x + a2
2

sin x − cos x

cos x sin x

sec2 x tan x

cosec2 x − cot x

tan x − ln cos x

sec x ln(sec x + tan x)

cosec x ln(cosec x − cot x)


1 1
sin2 x x − sin(2x)
2 4
1 1
cos2 x x + sin(2x)
2 4
tan2 x tan x − x
61
 
1 sin(a − b)x sin(a + b)x
sin(ax) sin(bx) − a 6= ±b
2  a−b a+b 
1 cos(a − b)x cos(a + b)x
sin(ax) cos(bx) − + a 6= ±b
2
 a−b a+b 
1 sin(a − b)x sin(a + b)x
cos(ax) cos(bx) + a 6= ±b
2 a−b a+b
1
x sin(ax) (sin(ax) − ax cos(ax))
a2
1
x cos(ax) (cos(ax) + ax sin(ax))
a2 √
arcsin x x arcsin x + 1 − x2

arccos x x arccos x − 1 − x2
1
arctan x x arctan x − ln(1 + x2 )
2
1 ax+b
eax+b e
a
ax − 1 ax
xeax e
a2
eax
eax sin(bx) (a sin(bx) − b cos(bx))
a2 + b2
eax
eax cos(bx) (a cos(bx) + b sin(bx))
a2 + b2
sinh x cosh x

cosh x sinh x

tanh x ln cosh x

ln x x ln x − x
1 1
x ln(x) x2 ( ln x − )
2 4
ln x 1 2
ln x
x 2
1
ln(ln(x))
x ln x
62 APPENDICES

Solutions to Exercises
Solutions for Questions 1 (page 8).

Solution 1.1: I don’t know why I’m giving you these answers. You can check your own
answers well enough by differentiating them. You might even feel insulted that I don’t
expect you to trust your differentiation!
1 3
3
x, sin x, x3 − x2 , −2 cos x, x4 − x3 + x, −3 cos x − 2 sin x
2ex , 2 ln x, 5
6
, 4, 3(e − e−1 )

Solution 1.2:
1 1 3x−4 1 1
sin(2x + 3), e , ln(2 + 3x), arctan(3x/2)
2 3 3 6
1 1 1
− ln(5 − 3x), arcsin(3x/2), tan(2x) − e−x
3 3 2
R R
Solution 1.3: sin2 x dx = x/2 − sin(2x)/4, cos2 x dx = x/2 + sin(2x)/4.
1
Solution 1.4: These are the answers. 1/4, 55/6, 0, ln(2), π/4, π/6, 2(e − e1/2 ), 2
ln(11/5),
1/2, π/4, ln x, 0, 1, x2 .

Solutions for Questions 2 (page 16).

Solution 2.1: Here are the answers. A * indicates that the problem involved graphs crossing
the axis.
31 7 11 17
, e − e−1 , 2, , ∗1, ∗ , ∗ , 1
5 6 6 4
Solution 2.2: Graphs meet at (−1, 1) and at (2, 4). The area required
Z is the area under the
2
line minus the area under the curve for −1 ≤ x ≤ 2. This is (x + 2 − x2 ) dx = 9/2.
−1
Solution 2.3: The first graph is an upside-down parabola crossing the x-axis at 0 and 1.
The second is an ordinary parabola. They meet at (0, 0) and at (1/2, 1/4). The required
area is Z 1/2
1
(x(1 − x) − x2 ) dx =
0 24
Solution 2.4: On the range 0Z ≤ x ≤ 1 the function ex is always ≥ 1, whilst x2 is always
1
4
≤ 1. So the required area is (ex − x2 ) dx = e − .
0 3
R1
Solution 2.5: The whole area is −1 1 − x2 dx = 4/3. The line y = 1 − a2 cuts the graph at
Ra
(±a, 1 − a2 ). The area above this line is −a (1 − x2 ) dx − 2a(1 − a2 ) = 43 a3 . So we get the
required division if a3 = 1/2.
63

Solution 2.6: Rx R1 Rx R1
First note that if x > 1 the 0 b(t) dt = 0 b(t) dt + 1 b(t) dt = 0 b(t) dt, i.e. the area
under the graph does not change once x gets bigger than 1. The graph of b1 (x) is the
straight line y = x between x = −1 and x = 1. For x > 1 it has the constant value 1 and
for x < −1 it has the constant value −1.
Solution 2.7: The expanded integrand is g(x)2 t2 + 2f (x)g(x)t + f (x)2 . So I(t) = At2 +
Rb Rb Rb
2Bt + C where A = a g(x)2 dx, B = a f (x)g(x) dx and C = a f (x)2 dx.
Solution 2.8: The equation of the chord is y − a2 = (a + b)(x − a). So the area of the
Rb
segment is a (a2 + (a + b)(x − a) − x2 ) dx and this works out to give (b − a)3 /6. Hence the
answer.
Solution 2.9: Area under graph is 1. Putting a rectangle round the graph with opposite
corners (0, 0) and (π/2, 1) and drawing a diagonal between these corners we get π/4 < 1 <
π/2. So 2 < π < 4. Similar story for the rest, with a different rectangle.
Solution 2.10: No solution.

Solutions for Questions 3 (page 25).

Solution 2.11: Answers are 4π/3, π 2 /2, π(1 − exp(−6a))/6


Solution 2.12: This is a matter of taking two solids of revolution and subtracting their
volumes. Rotating y = 2x gives volume 32π/3. Rotating y = x gives volume 8π/3. The
difference is 8π.
Solution 2.13: The easiest thing is to rename the axes and use the usual formula.ZReversing
4

the axes gives the equation x = y 2 or y = x. So the required volume is π y 2dx =
Z 4 0

π x dx = 8π.
0

Solution 2.14: You can solve the equation easily for y 2 .The only other thing you need are
the limits of integration. You only get a solution for y if −a ≤ x ≤ a. So these are the
limits. The answer is 43 πab2 . If a = b we get a sphere of radius a and the formula reduces
to that for a sphere (always remember to check things like that!).
Solution 2.15: The average value of x is 1/2. The average value of sin x on 0 ≤ x ≤ π is
2/π and the average value on 0 ≤ x ≤ 2π is zero, of course. For the circle problem you
have to work out the integral
Z 2π Z
1 √ 1 2π 1
2 − 2 cos θ dθ = sin θ dθ
2π 0 π 0 2

Solution 2.16: Each arch has height 2r. The cycloid meets the x-axis
R 2π at θ = 2kπ and
x = 2rkπ, where k is any whole number. The area of one arch is 0 (r − r cos θ)(r −
64 APPENDICES

Rr cos θ) dθ Expand out the integrand and integrate the result. The length of one arch is
2π p 2
0
ẋ + ẏ 2 dθ. Now, ẋ2 + ẏ 2 = 2r 2 (1 − cosθ) = 4r 2 sin2 (θ/2). The integration is now
straightforward.
Solution 2.17: Draw a picture of a circle of radius R with centre at the origin and add in
the lines y = ±r. Convince yourself that the volume you want is that obtained by rotating
the area between y = r and the circle about the x-axis. So we can get the answer as the
difference of two volumes of revolution. The first comes from rotating y 2 = R2 − x2 and
the
√ second from rotating y = r. In both cases the limits of integration are, by Pythagoras,
4
± R − r . If you now do the integrals you should get the answer 3 π(R2 − r 2 )3/2 .
2 2

Solutions for Questions 4 (page 33).

Solution 3.1:
Here are the answers, which you really should check by differentiation. The more
differentiation you do the better a person you will become.
1 1 1 1 1 1 √
(3x − 1)9 , − e1−4x , − cos x3 , (2x2 − 1)3/2 , arcsin(x) + x 1 − x2
27 4 3 6 2 2
√ 1 7 1
x2 + 1, sin (x), tan5 (x)
7 5
Solution 3.2:
The substitutions that I used are given in brackets after the answer. There is nothing
wrong in choosing different ones, provided that they give the answer.
1 1 6x−7 1
(5x − 3)8 , (y = 5x − 3), e , (y = 6x − 7), sin x4 , (y = x4 )
40 6 4
√ 2 3 1
− 1 − x2 , (y = 1 − x2 ), (x − 1)3/2 , (y = x3 − 1), − , (y = sin x)
9 3 sin3 (x)
1 2 1 1
− e−x , (y = x2 ), − cos5 (x), (y = cos x), − cos5 (2x), (y = cos 2x)
2 5 10
√ √ 1 2
x2 + 2x + 3, (y = x2 + 2x + 3), 2x − 1, (y = 2x − 1), ln t, (y = ln t)
2
R
Solution 3.3: Just do the integrals, but note that sin(a − b)x dx = − cos(a − b)x/(a − b)
does not make sense if a = b.
R 2T RT
Solution 3.4: Putting y = x − T we get T f (x) dx = 0 f (y + T ) dy which, by periodicity,
RT
is 0 f (y) dy. Think a bit about the next part. It is not a straightforward substitution.
You have to chop up the range in clever ways. Pay attention to where a multiple of T
comes in the range [a, a + T ].
Solution 3.5: No solution — check your answers by differentiating!
65

Solutions for Questions 5 (page 38).

Solution 3.6: For the first three


Z Z
1 1 1 1
x sin(2x) dx = − x cos(2x) + cos(2x) dx = − x cos(2x) + sin(2x)
2 2 2 4
Z Z
3 1 4 1 1 1 1
x ln x dx = x ln x − x4 dx = x4 ln x − x4
4 4 x 4 16
Z Z
1 1 1 1
xe3x−1 dx = xe3x−1 − e3x−1 dx = xe3x−1 − e3x−1
3 3 3 9
Now the rest
1
−x2 cos x + 2x sin x + 2 cos x, (9x2 − 6x + 2)e3x−1 , x(ln2 x − 2 ln x + 2)
27
1 x 1
e (sin x − cos x), x arctan x − ln(1 + x2 )
2 2
−x
The last four are all of the form −e p(x) where p(x) is:

x2 + 2x + 2, x3 + 3x2 + 6x + 6, x4 + 4x3 + 12x2 + 24x + 24

x5 + 5x4 + 20x3 + 60x2 + 120x + 120


(of course, you didn’t do all five of these from scratch, did you?)
Solution 3.7: It is obvious from the definitions (with θ > 0) that p1 , p2 and p3 are never
negative.
Z ∞ Z b
1 b−a
p1 (x) dx = dx = =1
−∞ a b−a b−a
Z ∞ Z ∞
 ∞
p2 (x) dx = θe−θx dx = −eθx 0 = 1.
−∞ 0
Z ∞ Z ∞
dx
p3 (x) dx = = [−1/x]∞
1 = 1.
−∞ 1 x2
So all three are probability densities.
Z b
x 1 b2 − a2 1
For p1 the mean is µ = dx = = (a + b) and the variance is
Z b a b−a b−a 2 2
1 1 1
ν= (x − (a + b))2 dx = (b − a)2 .
a 2 b − a Z ∞12
1
For p2 the mean is µ = θ xe−θx dx = by using integration by parts. Another
0 θ
application of integration by parts will giveR the value θ12 for the variance.

For p3 the formula for the mean is µ = 1 x. x12 dx = [ln(x)]∞ 1 and this does not have a
finite value, since ln(x) → ∞ as x → ∞.
66 APPENDICES

The general formula for the variance is


Z ∞ Z ∞
2
ν= (x − µ) .p(x) dx = (x2 − 2µx + µ2 ).p(x) dx
Z−∞∞ Z ∞ −∞ Z ∞ Z ∞
2 2
= x .p(x) dx − 2µ x.p(x) dx + µ p(x) dx = x2 .p(x) dx − 2µµ + µ2
Z−∞∞
−∞ −∞ −∞

= x2 .p(x) dx − µ2 .
−∞

If X has the Poisson distribution given by p2 (x) then the required probability is
Z ∞
Pr(µ < X) = Pr(1/θ < X) = θe−θx dx = e−1
1/θ

(N.B. the probability of being above the mean need not be a half.)
Solution 3.8: Using integration by parts:
Z 1 Z 1
In = n x
x e dx = [xn ex ]10 −n xn−1 ex dx = e − nIn−1
0 0
Z 1 Z 1
0 x
Now I0 = x e dx = ex dx = e − 1. So, using the formula,
0 0

I1 = e − 1.I0 =e−e+1= 1
I2 = e − 2.I1 =e−2
I3 = e − 3.I2 = e − 3(e − 2) = 6 − 2e
I4 = e − 4.I3 = e − 4(6 − 2e) = 9e − 24

For the next integral you should get In = −e−1 + nIn−1 . The first value is I0 = 1 − e−1
and, using the formula, I3 = 6 − 16e−1 .
The final one is more complicated. We charge in as usual:
Z π Z π Z π
n n π n−1 n
In = x sin x dx = [−x cos x]0 + n x cos x dx = π + n xn−1 cos x dx
0 0 0

This does not give us the next step down because the integral now has a cosine in it instead
of a sine. So we do parts once more on it. Let me just work with the important bit:
Z π Z π Z π
 n−1 π
xn−1
cos x dx = x sin x 0 − (n − 1) xn−2
sin x dx = −(n − 1) xn−2 sin x dx
0 0 0

Putting all this together we get

In = π n + n(0 − (n − 1)In−2 ) = π n − n(n − 1)In−2


67

The two starting cases that we have to work out separately are I0 and I1 .
Z π
I0 = x0 sin x dx = 2
0

and, using parts once, Z π


I1 = x sin x dx = π
0
Now, using the formula,
I2 = π 2 − 2.1.I0 = π 2 − 4
I3 = π 3 − 3.2.I1 = π 3 − 6π
I4 = π 4 − 4.3.I2 = π 4 − 12π 2 + 48

Solution 3.9: Putting y = 1 − x we get dy = −dx and the integral becomes


Z 0 Z 1
I(n, m) = − (1 − y) y dy =
n m
y m (1 − y)n dy = I(m, n)
1 0

Next Z  1
1
n 1 1
I(n, 0) = x dx = xn+1 =
0 n+1 0 n+1
Next
 1 Z 1
1 m m
I(n, m) = xn+1 (1 − x)m + xn+1 (1 − x)m−1 dx = I(n + 1, m − 1)
n+1 0 n+1 0 n+1
So,
m m m−1
I(n, m) = I(n + 1, m − 1) = I(n + 2, m − 2)
n+1 n+1 n+2
m m−1m−2
= I(n + 3, m − 3) = · · ·
n+1 n+2 n+3
If you chase this down you will find that you get the required answer.

Solutions for Questions 6 (page 44).



Solution
√ 2 3.10: (3x + 1)2 + 22 , √(2x − 1)2 − 22 , (3x − 2)2 , t2 − (tx − t)2 , (t = 2),
( 3) − (2x + 1)2 , (x + 12 )2 + ( 7/2)2
1 2x + 1 √
arcsin √ , (2x + 1 = 3 sin y)
2 3
1
√ arcsin(x − 1), (x − 1 = sin y)
2
1 1
sinh−1 ( (3x + 1)), (3x + 1 = 2 sinh y)
3 2
68 APPENDICES

Solutions for Questions 7 (page 47).

Solution 3.11: (1) ln(4/3), (2) ln(3), (3) nonsense because 2x + 1 becomes 0 in the range
of integration, (4) 13 ln(2/5), (5) 14 ln(5), (6) ln(4/5).
Solution 3.12: First expansion is
3 1 1 1
− +
8 2 + 3x 8 x − 2
with integral 18 (− ln(2 + 3x) + ln(x − 2)). For the next three the coefficients, in the obvious
order, are (ii) − 12 , 12 , (iii) − 27 , 37 , (iv) −2, 12 , 32 and the corresponding integrals are (ii) 12 (ln(x−
3) − ln(x − 1)), (iii) 17 ln((3x − 2)/(2x + 1)), (iv) −2 ln(x + 1) + 12 ln(x + 2) + 32 ln x.
For the fifth one note that x2 − 1 = (x − 1)(x + 1). The coefficients are 23 , 12 , 16 and the
integral is − 23 ln(2 − x) + 12 ln(x − 1) + 16 ln(x + 1).
In the last one the denominator factorises to give x(x − 1)(x − 2). The coefficients are
3
2
, 1, − 52 .
Solution 3.13: (1) 12 (ln(3) + ln(2) − ln(5)), (2) 3 ln(7) − 2 ln(13) − 3 ln(3) + 2 ln(5), 27
2
ln(2) −
17
2
ln(3).
54
Solution 3.14: x + ln(1 + x), x + 2 ln(x + 1) − 5 ln(x + 2), 5
ln(x − 3) + 16
5
ln(x + 2) + x2 + 2x

Solutions for Questions 8 (page 56).

x2
Solution 4.1: The first one is handled like this: rearrange to get y 0 = and hence get
y2
Z Z
2
y dy = x2 dx + C

1 3 1
Doing the integration we get y = x3 + C. The condition y(1) = 1 tells us that C = 0.
3 3
So the required solution is y(x) = x.
The others have solutions
1 −1
y(x) = 1 2, y(x) =
1 − x − 2x x + ln x
ex
y(x) = , r(θ) = sec(θ), u(v) = − ln(2 − ev )
1 + ex
Solution 4.2: Integrate both sides three times. You should end up with
1 4 1 2
y(x) = x + Cx + Dx + E
24 2
where C, D and E are constants of integration. y(0) = 0 gives E = 0. The other two
conditions give two simultaneous equations for C and D which solve to give C = −7/12
and D = 5/4.
69

Solution 4.3: The equation is separable. We rearrange it to give


Z Z
dT
= − κ dt = −κt + C
T − T0

So T (t) = T0 + eC−κt . If T0 = 20 and T (0) = 100 then eC = 80. The condition that
T (10) = 80 gives 80 = 20+80e−10κ so e−10κ = 3/4, which gives κ = −0.1 ln(0.75). Therefore
T (20) = 20 + 80e−20κ = 20 + 80( 34 )2 = 65. The temperature is 30 when 30 = 20 + 80e−κt or
t = ln(8)/κ = 10 ln(8)/ ln(4/3) = 72.3
Solution 4.4: The rate of decrease is −y 0 . So, taking the proportionality constant to be c
the question says that −y 0 = c.y/x. This is separable and gives
Z Z
dy dx
= −c or ln(y) = −c ln(x) + D
y x

This can be written as y = P x−c


Solution 4.5: With y = xv we get y 0 = v + xv 0 . Putting these into the equation we get
x2 (v + xv 0 ) = x2 v + x2 v 2 or xv 0 = v 2 . This is now a separable equation with solution

−1
v=
C + ln x
So the general solution to the original equation is
x
y = xv = − + ln x
C

Solution 4.6: Dividing (4.5) by (4.4) we get

dD βP
= −1 +
dN αN
integrating this we get
βP
D = −N + ln(N ) + C
α
If we start with D = 0 and N = P then
βP
C=P− ln(P )
α
Putting this into the previous equation we get

D β N N
= ln( ) + 1 −
P α P P
When the epidemic ends (which is actually after an infinite length of time as far as this idealised model is
concerned, but stuff that) we once more have D = 0 and we are told that N = 0.5P . Putting these into
the above equation
β β 1
0 = ln(0.5) + 1 − 0.5hence =
α α ln 4
70 APPENDICES

It is not difficult to see from the equations that, in this case, the value of D starts by rising, reaches a
maximum when Ḋ = 0 and then declines. When Ḋ = 0 equation (2) tells us that, since N 6= 0,

N β 1
= =
P α ln 4
Put this into the formula that we have obtained for D in terms of N and get
D β β β
= ln( ) + 1 − = 0.0430
P α α α
So about 4% of the population had the disease at its peak.
N β
The next part is more of a problem. We know that the peak of the epidemic comes when = and
P α
at this point
D
= 0.1 = λ ln(λ) + 1 − λ
P
where λ = β/α. We have to solve this equation for λ and then use the result in

N
0 = λ ln(N/P ) + 1 −
P
to solve for N/P .
A bit of doodling with a calculator will tell you that the first equation has a solution of about λ = 0.59
and that the second equation then gives a solution of about 31%.

Вам также может понравиться