You are on page 1of 145

Combinatorics and Calculus

Notes for RCM1712:


Mathematical Foundations 2
Alasdair McAndrew
School of Engineering and Science
ii
Contents
Introduction 1
1 Complex Numbers 3
1.1 Enlarging sets to solve equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2 Denitions and arithmetic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.3 The Argand diagram and polar form . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.4 Arithmetic with polar forms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
1.5 Applications of complex numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
2 Combinatorics 21
2.1 The multiplication principle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
2.2 Permutations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
2.3 Combinations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
2.4 Stirlings approximation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
3 The binomial theorem 37
3.1 Statement and proofs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
3.2 Some binomial identities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
3.3 Pascals triangle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
3.4 The multinomial theorem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
4 Limits 47
4.1 The idea . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
4.2 Basic limits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
4.3 Limits where the function is undened . . . . . . . . . . . . . . . . . . . . . . . . . . 49
4.4 Limits at innity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
4.5 The derivative as a limit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
iii
5 Dierentiation 57
5.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
5.2 Powers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
5.3 The addition rule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
5.4 Multiplication by a constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
5.5 Polynomials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
5.6 The product and quotient rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
5.7 The chain rule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
5.8 Another look at the quotient rule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
5.9 Trigonometric functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
5.10 Exponential and logarithmic functions . . . . . . . . . . . . . . . . . . . . . . . . . . 66
5.11 lHpitals rule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
6 Graphical Applications Of Dierentiation 71
6.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
6.2 Tangent lines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
6.3 Approximations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
6.4 Polynomial curve sketching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
6.5 A note on polynomial evaluation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
6.6 Rational function curve sketching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
6.7 A note on symmetry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
7 Solution of equations 83
7.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
7.2 Iterative Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
7.3 The Newton-Raphson Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
8 Concepts of integration 91
8.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
8.2 Evaluating integrals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
8.3 Area between curves . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
9 Methods of Integration 101
9.1 Integration by substitution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
9.2 Integration by parts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
iv
10 Numerical Integration 109
10.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
10.2 Rectangles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
10.3 The Trapezoidal rule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
10.4 Simpsons rule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
10.5 Back to rectanglesthe midpoint rule . . . . . . . . . . . . . . . . . . . . . . . . . . 116
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
11 Dierential equations 121
11.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
11.2 Simple dierential equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
11.3 Separable variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
11.4 Population growth . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
11.5 Newtons law of cooling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
Answers to Exercises 131
v
vi
Introduction
This book is designed to be a complete set of notes and exercises for the subject RCM1712 Math-
ematical Foundations 2. It is designed to extend the material you have covered in high school or
in the subject RCM1711 Mathematical Foundations 1. Each chapter should take about a week to
complete, although this may vary according to the lecturers dicretion.
This subject is designed to provide beginning students of the mathematical sciences with further
mathematical skills necessary for modern mathematics and its applications. Much of this subject is
devoted to the elementary study of calculus, which has been the most successful area of applicable
mathematics for 300 years.
As well as learning particular mathematical skills, the study of mathematics teaches a rigorous
mode of thinking, and encourages analytical skills.
For further information, see your lecturer, or the author of these notes:
Alasdair McAndrew
School of Engineering and Science
Victoria University
PO Box 14428
Melbourne, Vic 8001, Australia
Phone: +61 3 9919 4344, Fax: +61 3 9919 4908
Email: Alasdair.McAndrew@vu.edu.au
1
2
Chapter 1
Complex Numbers
1.1 Enlarging sets to solve equations
Suppose we start o with the set of natural numbers
N = 1, 2, 3, 4, . . .
which are the standard counting numbers. Using these numbers we can solve some equations:
x + 2 = 7
but not others:
x + 8 = 5.
We cant solve this last equation, because its solution requires a negative number, and our starting
set N doesnt have negative numbers. So what we need to do is to enlarge our set to include negative
numbers. Our new set is the set of integers:
Z = . . . , 3, 2, 1, 0, 1, 2, 3, . . .
and now we can certainly solve more equations. But not all! What about
3x + 4 = 9?
Well, to solve this equation we need fractions. Soenlarge the set yet again, to obtain the set of
rational numbers:
Q =
_
p
q
, p, q Z, q ,= 0
_
.
Even with this new set, we still cant solve all equations; for example:
x
2
2 = 0.
3
The solution for this is x =

2, and it can be shown that this is not a rational number. So we need


the irrationals as well, and the new set which includes all the rationals and irrationals is the set of
real numbers. We can think of the real numbers as all possible numbers which can be expressed as
nite or innite decimals.
The real numbers are a ne and dandy set of numbers, and we need them for lots of things in
our mathematical lives. But are they good enough for solving equations? For example:
x
2
+ 4 = 0.
This cant be solved using the reals, because it can be written as
x
2
= 4
and the real numbers have the property that all squares are positive.
You know the drill nowif we cant solve an equation with the numbers we have, enlarge the
set to include some more numbers to help us. The trouble is that weve gone as far as we can using
the symbols 0, 1, 2, 3, 4, 5, 6, 7, 8, 9. So if we are to have any new numbers, were going to have some
new symbols for them. In fact we only need one new number, denoted
i
and which satises
i
2
= 1.
You see why we need a new symbolno real number can satisfy this property, and the real numbers
already use all the digit symbols. So here is a new number.
We now dene the complex numbers to be
C = a +bi, a, b R.
We can now solve the pesky equation above; noticing that
(2i)
2
= (2
2
)(i
2
)
= (4)(1)
= 4
and so a solution to the equation is x = 2i.
The remarkable thing about complex numbers is that in terms of solving equations, we need go
no further: every polynomial equation can be solved using complex numbers.
So in terms of enlarging sets of numbers to include more numbers, complex numbers represent
the end of the line.
4
1.2 Denitions and arithmetic
Real and imaginary parts
Here are some examples of complex numbers:
2 + 3i, 4

3i, +
2
7
i, 4, 25i
We notice that a complex number has two parts (one of which may be zero, like in the last two
examples above), a bit with an i next to it, and a bit without. In fact, if we have
z = x +yi
then x is called the real part of z, and is denoted
x = Re(z).
The value y is called the imaginary part of z, and is denoted
y = Im(z).
For example, if
z = 3 + 5i
then
Re(z) = 3, Im(z) = 5.
Equality
Two complex numbers are equal if and only if both their real parts and imaginary parts are equals.
In symbols:
w = z Re(z) = Re(w) and Im(z) = Im(w).
Complex conjugate
For any complex number
z = a +bi
its complex conjugate, denoted z, is dened to be
z = a bi.
So, for example, if
z = 4 + 7i
5
then
z = 4 7i.
And if
z = 8 3i
then
z = 8 + 3i.
Notice that if you add a number and its complex conjugate, the imaginary parts cancel out and you
end up with a real number.
Arithmetic: addition and subtraction
These are easy: to add or subtract complex numbers, we just add or subtract their real and imaginary
parts. For example:
(2 + 3i) + (7 + 4i) = (2 + 7) + (3 + 4)i
= 9 + 7i
and
(5 2i) (3 6i) = (5 3) + (2 (6))i
= 2 + (2 + 6)i
= 2 + 4i
Arithmetic: multiplication
To multiply two complex numbers, just multiply out the brackets, and at the end substitute 1 for
i
2
:
(2 + 5i)(3 2i) = 2(3 2i) + 5i(3 2i)
= 6 4i + 15i 10i
2
= 6 + 11i 10(1)
= 6 + 11i + 10
= 16 + 11i.
6
Arithmetic: division
We have noted above the that the sum of a complex number z and its complex conjugate z is real.
But what about their product? Lets try an example:
(2 + 5i)(2 5i) = 2(2 5i) + 5i(2 5i)
= 4 10i + 10i 15i
2
= 4 15(1)
= 19.
Note that the is again cancel out. To prove that this always happens, try the same thing with
symbols:
(a +bi)(a bi) = a(a bi) +bi(a bi)
= a
2
abi +abi b
2
i
2
= a
2
b
2
(1)
= a
2
+b
2
.
We have just shown that for any complex number z, that zz is real. We use this fact to perform
division; given
w
z
multiply both top and bottom by z. Heres an example:
13 18i
2 5i
=
(13 18i)(2 + 5i)
(2 5i)(2 + 5i)
=
116 + 29i
29
= 4 +i.
And another example:
7 5i
3 + 2i
=
(7 5i)(3 2i)
(3 + 2i)(3 2i)
=
11 29i
13
=
11
13

29
13
i.
Arithmetic: square roots
Square roots are one of those things we cant perform always within the set of real numbers, since
all squares of real numbers are positive, we cant take the square root of a negative number. (In
fact we can, we just need the complex number to do it!). But there are no such restrictions on
7
complex numbers, and every complex number has a square root which is another complex number.
Calculating square roots requires a bit of algebraic ddling, and solving some quadratic equations.
Heres an example; to nd the square root of
z = 16 + 30i.
Suppose that the square root we want is
w = x +yi.
Then
w
2
= (x +yi)
2
= (x
2
y
2
) + 2xyi = 16 + 30i.
Equating real and imaginary parts:
x
2
y
2
= 16
2xy = 30.
From the last equation we have y = 15/x which can be substituted into the rst equation to obtain
x
2

_
15
x
_
2
= 16.
Multiplying out by x
2
produces
x
4
225 = 16x
2
or
x
4
16x
2
225 = 0
We can think of this equation as a quadratic in x
2
:
(x
2
)
2
16(x
2
) 225 = 0.
Solving this using the quadratic formula produces two possible solutions
x
2
= 9, x
2
= 25.
Since both x and y have to be real, we can discard the rst value, and obtain
x = 5
which produces
y = 3.
Thus the square roots we require are
w = 5 + 3i, w = 5 3i.
8
1.3 The Argand diagram and polar form
The real numbers can be represented as a line stretching o in both directions. A single line isnt
enough for the complex numbers; we need a plane, on which a complex number corresponds to a
point. On this plane, the horizontal axis is called the real axis and the vertical axis is called the
imaginary axis. A point (x, y) on this plane corresponds to the complex number x +yi.
Heres a picture of the plane, with a few numbers on it:
x
yi
4 3 2 1 1 2 3 4
3i
2i
i
i
2i
3i
3 + 2i
1 + 3i
2 2i
4 3i
Such a picture, of numbers plotted on the complex plane, is also called an Argand diagram
1
Given a plot of complex numbers, we can introduce the polar form, which involves the distance
from the origin, and the angle to the positive x-axis:
x +yi

r
In order to obtain relationships between the values x, y, r and , rst redraw the above diagram as
a right-angled triangle:
1
Named after the French mathematician Jean-Robert Argand (17681822).
9
x
y
r

By Pythagoras theorem, we have


r
2
= x
2
+y
2
so that
r =
_
x
2
+y
2
.
And by trigonometric denitions:
x = r cos
y = r sin
tan = y/x
The value r is called the absolute value or the modulus of the complex number z = x + yi and is
denoted [z[. The value is called the argument of z, and is denoted arg(z).
From the above equations, we can write
x +yi = r cos +ir sin
= r(cos +i sin )
This last expression is the polar form of the complex number z = x+yi. The original x+yi form
is called the cartesian form of z. Because the expression cos +i sin occurs so often in discussing
complex numbers, it is often abbreviated to cis , so the polar form can be written
r cis .
Putting all this together, we can convert from cartesian to polar form as follows:
r =
_
x
2
+y
2
=
_
tan
1
(y/x) if x > 0
tan
1
(y/x) + if x < 0
and from polar to cartesian form by:
x = r cos
y = r sin .
10
For example, suppose
z = 2 + 2i.
Then
r =
_
(1)
2
+ (2)
2
=

4 + 4 =

8.
Since x < 0 we apply the second case for , to obtain
= tan
1
(1) + =

4
+ =
3
4
.
You can check this by drawing a diagram.
1.4 Arithmetic with polar forms
The polar form of a complex number can be used to provide very powerful and ecient methods
for performing multiplication and division, and powers and n-th roots.
Multiplication with polar forms
Suppose we start with two complex numbers and their polar forms:
z = x +yi = r(cos +i sin )
w = u +vi = s(cos +i sin )
Lets now attempt to multiply their polar forms:
zw = r(cos +i sin )s(cos +i sin )
= rs(cos cos +i cos sin +i sin cos +i
2
sin sin)
= rs(cos cos sin sin +i(cos sin + sin cos ))
You may recognize the expressions in the last bracket as the addition formulas for cos and sin.
Thus:
zw = rs(cos( +) +i sin( +)).
This means that the product of two complex numbers can be obtained (in polar form) by multiplying
their moduli, and adding their arguments.
For example, lets try to compute
(2 + 2i)(1 +i).
The rst number has modulus

8 and argument 3/4, so that its polar form is

8
_
cos
_
3
4
_
+i sin
_
3
4
__
11
It is easy to work out that the polar form of the second number is

2 cis
_

4
_
.
So their product is

8 cis
_
3
4
_

2 cis
_

4
_
=

2 cis
_
3
4
+

4
_
=

16 cis()
= 4(1 + 0i)
= 4.
Division with polar forms
You can probably guess what going to happen here: to perform a division we divide the moduli,
and subtract the arguments. That is, if
z = r cis
w = s cis
then
z
w
=
r
s
cis( ).
Powers with polar forms
From the formula for multiplication, we can deduce that
z
2
= r
2
cis(2)
which can of course be generalized to any power:
z
n
= r
n
cis(n).
This is based on an important result for complex numbers called de Moivres theorem
2
, which says
that
(cos +i sin )
n
= cos(n) +i sin(n).
For example, suppose we wish to calculate
(1 +i)
11
.
2
Named after the French mathematician Abraham de Moivre (16671754).
12
The polar form of 1 +i is

2 cis
_

4
_
and so its 11-th power is

2
11
cis
_
11
4
_
= 32

2
_
cos
_
11
4
_
+i sin
_
11
4
__
= 32

2
_

2
+i
1

2
_
= 32(1 +i)
= 32 + 32i
n-th roots with polar forms
The rst thing to note is that every complex number z has n distinct n-th roots. So z will have two
square roots, three distinct cube roots, and so on.
Here is a formula for generating all the n-th roots, starting with
z = r cis .
Then:
z
1/n
= r
1/n
cis
_
+ 2k
n
_
for k = 0, 1, 2, . . . , n 1.
For example, lets try to calculate all the cube roots of 8i. We start with its polar form, which can
be easily found to be
8 cis
_

2
_
.
Applying the formula above produces
(8i)
1/3
= 8
1/3
cis
_

2
+ 2k
3
_
for k = 0, 1, 2.
We can now see what happens for each dierent value of k on the right hand side of this formula.
Putting k = 0 produces
8
1/3
cis
_

2
+ 0k
3
_
= 2 cis
_

6
_
= 2
_
cos
_

6
_
+i sin
_

6
__
= 2
_

3
2
+i
1
2
_
=

3 +i.
13
Now put k = 1:
8
1/3
cis
_

2
+ 2
3
_
= 2 cis
_
5
6
_
= 2
_
cos
_
5
6
_
+i sin
_
5
6
__
= 2
_

3
2
+i
1
2
_
=

3 +i.
And nally k = 2:
8
1/3
cis
_

2
+ 4k
3
_
= 2 cis
_
3
2
_
= 2
_
cos
_
3
2
_
+i sin
_
3
2
__
= 2(0 i)
= 2i.
If we draw all these numbers on an Argand diagram:

3 +i

3 +i
2i
we see that they are all evenly distributed around circle with radius 2. And this is the case for any
group of n-th rootsthey are always evenly distributed around a circle.
1.5 Applications of complex numbers
Complex numbers crop up all over the place in both pure and applied mathematics. We shall just
investigate some simple applications.
Solution of quadratic equations
This is where we started! Quadratics can be solved using the quadratic formula, noting that any
negative square roots can now be managed easily with complex numbers.
14
For example:
x
2
+ 6x + 13 = 0.
The quadratic formula produces
x =
6
_
(6)
2
4(1)(13)
2
=
6

36 52
2
=
6

16
2
This is the point where complex numbers come in. Since (4i)
2
= 16i
2
= 16, we can continue our
working as:
x =
6 4i
2
= 3 2i.
This is the solution we require.
Theres nothing in the formula which requires the coecients a, b and c to be real. We can use
the formula to solve equations such as:
x
2
(1 + 7i)x + (11i 16) = 0.
We can apply the quadratic formula to this, using
a = 1
b = 1 7i
c = 11i 16
Heres the formula:
x =
1 + 7i
_
(1 7i)
2
4(1)(11i 16)
2
=
1 + 7i

48 + 14i 44i + 64
2
=
1 + 7i

16 30i
2
Using the method presented earlier, we can nd that

16 30i = 5 3i.
15
Then the solution can be continued as
x =
1 + 7i (5 3i)
2
=
1 + 7i + (5 3i)
2
,
1 + 7i (5 3i)
2
=
6 + 4i
2
,
4 + 10i
2
= 3 + 2i, 2 + 5i.
Solution of cubic equations
Historically, this is the context in which the theory of complex numbers was rst developed, about
450 years agoto nd a method which can be used to solve cubic equations. There is a cubic
formula which in its general form is very complicated. Here is one version of it, to solve a class of
cubics of the form
x
3
+ 3px + 2q = 0.
(It is possible to transform any cubic equation to remove the x
2
term, so this class of equation isnt
as restrictive as it looks.) Anyway, compute
A =
_
q +
_
q
2
+p
3
_
1/3
B =
_
q
_
q
2
+p
3
_
1/3
Then the three solutions are
x = A +B,
1
2
(A +B) i

3
2
(A B).
For example:
x
3
6x 6 = 0.
Here p = 2 and q = 3 and so
A =
_
3 +
_
(3)
2
+ (2)
3
_
1/3
=
_
3 +

1
_
1/3
= (4)
1/3
B =
_
3
_
(3)
2
+ (2)
3
_
1/3
=
_
3

1
_
1/3
= (2)
1/3
16
This means that one of the three solutions is
2
1/3
+ 4
1/3
.
The other two solutions are

1
2
(2
1/3
+ 4
1/3
) i

3
2
(4
1/3
2
1/3
).
These messy looking expressions can be simplied further.
Pythagorean triples
A Pythagorean triple consists of three integers A, B and C for which A
2
+B
2
= C
2
. For example,
(A, B, C) = (3, 4, 5) is a Pythagorean triple because (3)
2
+ (4)
2
= (5)
2
. Complex numbers can be
used to generate Pythagorean triples.
Recall the dierence of two squares factorization:
X
2
Y
2
= (X Y )(X +Y ).
We are going to factorize A
2
+B
2
by turning it into a dierence:
A
2
+B
2
= A
2
(B
2
)
= A
2
(iB)
2
= (A iB)(A +iB).
Since we want A
2
+B
2
= C
2
, we have:
C
2
= (A iB)(A +iB).
Since the expressions on the right hand side are dierent, but their product is a square, this must
mean that each one is a square itself. In other words, we can write
A +iB = (x +iy)
2
for some integers x and y. Expanding produces:
A +iB = (x
2
y
2
) +i(2xy)
or
A = x
2
y
2
B = 2xy.
17
Then
A
2
+B
2
= (x
2
y
2
)
2
+ (2xy)
2
= (x
4
2x
2
y
2
+y
4
) + 4x
2
y
2
= x
4
+ 2x
2
y
2
+y
4
= (x
2
+y
2
)
2
.
What we have shown is that for any integers x and y, the values
A = x
2
y
2
B = 2xy
C = x
2
+y
2
form a Pythagorean triple: A
2
+ B
2
= C
2
. Heres some values of x and y and the values of A, B
and C they generate:
x y A B C
2 1 3 4 5
3 1 8 6 10
3 2 5 12 13
4 1 15 8 17
4 3 7 24 25
Exercises
1. Compute the complex number corresponding to each of the following:
(i) (3 + 4i) + (6 3i) (ii) 3(5 i) 2(1 + 2i) (iii) (2 +i)(3 2i)
(iv) (4 3i)(2 + 5i) (v) (17 + 6i)/(4 3i) (vi) (1 +i)/(2 5i)
2. Compute each of the following:
(i) (1 2i)
2
, (1 + 2i)
2
(ii) (4 + 3i)
2
, (4 3i)
2
(iii) (5 3i)
2
, (5 + 3i)
2
Can you guess at a general rule about squares and squares of conjugates? Can you prove your
rule?
3. Compute the square roots of
(i) 5 + 12i (ii) 15 8i (iii) 33 56i
4. Sketch each of the following on an Argand diagram:
(i) 1 +i (ii) 1

3i (iii)
1

2
i
(iv)

3 +i (v) 3 3i (vi) 4
and determine the polar form of each one.
18
5. Using the polar forms from the previous questions, compute the following powers:
(i) (1 +i)
7
(ii) (1

3i)
6
(iii)
_
1

2
i
_
14
(iv) (

3 +i)
9
(v) (3 3i)
5
(vi) (4)
2
6. Find
(i) all the cube roots of 2 + 2i, (ii) all the fourth roots of 4.
In each case sketch all roots on an Argand diagram.
7. Solve the following quadratic equations using complex numbers:
(i) x
2
4x + 5 = 0 (ii) x
2
+ 2x + 5 = 0 (iii) x
2
+ 6x + 10 = 0
(iv) x
2
2x + 17 = 0 (v) x
2
+ 10x + 26 = 0 (vi) x
2
10x + 41 = 0
19
20
Chapter 2
Combinatorics
Combinatorics is the mathematical study of counting things. In many applications of mathematics
and computer science, we need to ascertain the number of ways a certain event can occur. This
chapter introduces some basic counting principles and some applications.
2.1 The multiplication principle
The multiplication principle can be stated as follows:
Suppose we have sets A and B with m and n elements respectively. Then the number of
elements in their cartesian product is mn.
For example, suppose A = 1, 2, 3 and B = a, b, c, d. Then m = 3 and n = 4. The cartesian
product AB is:
A B = 1, a, 1, b, 1, c, 1, d, 2, a, 2, b, 2, c, 2, d, 3, a, 3, b, 3, c, 3, d
and we see that the number of elements in AB is 3 4 = 12.
Recall from SCM1711 that the number of elements in a set A is called the cardinality of that
set, and is denoted [A[. We can thus write the multiplication principle more succinctly as
[A B[ = [A[ [B[.
This may seem obvious, but as we shall see, it has some far reaching consequences. But rst we
shall look at a few examples.
Example 2.1 A mechanic xing a car has the choice of seven oil lters and eleven fuel pumps to
install. How many combinations of air lter and fuel pump are there?
We can express this problem in terms of cartesian products. We have
A = oil lters
21
and
B = fuel pumps.
Then a combination can be considered as an ordered pair
o, f
where o A and f B. By the multiplication principle, the number of such ordered pairs is the
cardinality of AB, and is 7 11 = 77.
Example 2.2 A small restaurant oers the choice of 12 main courses, and 6 desserts. How many
dierent meals are there?
Without going through the rigmarole of expressing this problem in terms of sets, we just observe
that a meal is an ordered pair
main course, dessert
and by the multiplication principle there are 12 6 = 72 such pairs.
The multiplication principle can be generalized to three or more sets. To dene it, we need the
notion of an ordered n-tuple, which is simply an ordered list of n elements. We can express the
principle as follows:
Suppose we have sets A
1
, A
2
, . . . , A
n
with [A
i
[ = k
i
. Then the number of ordered n-tuples
a
1
, a
2
, . . . , a
n
with each a
i
A
i
is k
1
k
2
k
n
.
A few examples will give the avour of this generalization.
Example 2.3 A restaurant (a dierent one!) oers seven entres, 16 main courses, 11 desserts and
5 dierent types of coee. In how many ways can you have a three course meal with coee?
As in example 2, we can express such a meal as an ordered 4-tuple:
entre, main course, dessert, coee.
By the generalized multiplication principle, we nd that
7 16 11 5 = 6160
is the number of such 4-tuples.
Example 2.4 The same mechanic as in example 1 is now xing a car for which there are 7 dierent
oil lters, 15 dierent fuel pumps, and 8 dierent air lters. In how many ways can the car be xed?
By now you should be getting the idea of applying this principle, and clearly
7 15 8 = 840
is the answer.
22
Example 2.5 A computer company has four jobs on the days roster: networking, help desk,
installation, and backups. There are 17 people available. In how many ways can the jobs be
distributed amongst these people?
Take any job, say networking. There are 17 people available to do it. That leaves 16 people for
the next job: help desk. That leaves 15 people for the third job: installation, and nally 14 people
for the nal job of backups. Using the multiplication principle, there are
17 16 15 14 = 57120
ways of assigning these jobs.
From now on we shall make no distinction between the original multiplication principle for
two sets, and the generalization for three or more sets. We shall just refer to the multiplication
principle.
2.2 Permutations
A permutation is a bijection from a nite set A onto itself. For example, if A = 1, 2, 3, 4 then one
permutation is
1, 3, 2, 1, 3, 4, 4, 2.
Another is
1, 2, 2, 4, 3, 3, 4, 1.
A permutation can be written more concisely as n-tuples just by giving the second element of each
ordered pair. The above two permutations can then be written
3, 1, 4, 2, 2, 4, 3, 1.
An immediate question is to determine the number of such permutations. Lets begin by looking at
our set A = 1, 2, 3, 4. A given permutation can be expressed as the ordered 4-tuple
a, b, c, d
where each of a, b, c and d is a distinct element of A. First note that a can be any element we like,
so there are 4 choices for a. Now b, being dierent to a, must be chosen from the set Aa; hence
there are three choices for b. Since two elements are already chosen, we have only two left to choose
from, and so there are two choices for c. (Another way to think about this is that we are choosing
elements from A a, b which has only two elements.) This leaves us with only one element d at
the end.
By the multiplication principle, there are
4 3 2 1 = 24
23
possible permutations.
We can use the same reasoning to count the number of permutations for sets of any size. For
example, the number of permutations of a seven element set is
7 6 5 4 3 2 1 = 5040.
We shall see a lot of this sort of multiplication of all integers from a value n down to one; it is called
the factorial of n, and is denoted n!. We thus have seen that
4! = 24, 7! = 5040.
The factorial function can be given a recursive formulation. Note that
7! = 7 6 5 4 3 2 1
= 7 (6 5 4 3 2 1)
= 7 6!.
And in general,
n! = n (n 1)!.
If we put n = 1 in this equation, we obtain the result 0! = 1. This may appear to be nonsensical,
but it does allow for many useful operations with factorials.
The recursive form of the factorial function is thus
f(0) = 1,
f(n) = nf(n 1) for all n 1.
The factorial function is a very fast growing function; here is a table of the rst few values:
n n! n n! n n!
1 1 11 39916800 21 51090942171709440000
2 2 12 479001600 22 1124000727777607680000
3 6 13 6227020800 23 25852016738884976640000
4 24 14 87178291200 24 620448401733239439360000
5 120 15 1307674368000 25 15511210043330985984000000
6 720 16 20922789888000 26 403291461126605635584000000
7 5040 17 355687428096000 27 10888869450418352160768000000
8 40320 18 6402373705728000 28 304888344611713860501504000000
9 362880 19 121645100408832000 29 8841761993739701954543616000000
10 3628800 20 2432902008176640000 30 265252859812191058636308480000000
Clearly these numbers very quickly grow too large to be computed with a hand-held calculator. In
section 2.4 we will look at a method of approximating factorials.
24
Permutations as orderings
We have seen above that a permutation can be written as an ordered n-tuple; each possible dierent
n-tuple corresponds to a dierent function from the set to itself. We an generalize this idea as follows:
A permutation is an ordering of a list of objects. If there are n objects which are all
distinct, then the number of permutations is n!.
Example 2.6 Find the number of permutations of the letters in the word TRAMPOLINES.
Here we have a word of eleven letters, all of which are dierent. By the above denition, there
are
11! = 39916800
permutations.
Given this denition, we can give an algorithm for listing all permutations of n distinct objects.
It will be a recursive algorithm:
The only permutation of a single element set x is the single element x.
To list all the permutations of an n element set S = s
1
, s
2
, . . . , s
n
, list rst all permutations
of the form
s
1
, P
where P is a permutation of S s
1
.
Next list all permutations of the form
s
2
, P
where P is a permutation of S s
2
.
Work through all elements of S, ending with all permutations of the form
s
n
, P
where P is a permutation of S s
n
.
To give an example, we shall list all the permutations of S = a, b, c. According to the algorithm,
we list in order
a, P where P is a permutation of b, c.
b, P where P is a permutation of a, c.
c, P where P is a permutation of a, b.
25
Since the permutations of a two element set x, y are x, y and y, x, we have this list of permu-
tations of S:
a, b, c
a, c, b
b, a, c
b, c, a
c, a, b
c, b, a
By the same algorithm, the list of all permutations of S = x, y, z, w can be listed as follows:
x, P where P is a permutation of y, z, w.
y, P where P is a permutation of x, z, w.
z, P where P is a permutation of x, y, w.
w, P where P is a permutation of x, y, z.
Now each three element permutation can be listed as for the three element set above; giving the list
x, y, z, w y, x, z, w z, x, y, w w, x, y, z
x, y, w, z y, x, w, z z, x, w, y w, x, z, y
x, z, y, w y, z, x, w z, y, x, w w, y, x, z
x, z, w, y y, z, w, x z, y, w, x w, y, z, x
x, w, y, z y, w, x, z z, w, x, y w, z, x, y
x, w, z, y y, w, z, x z, w, y, x w, z, y, x
Permutations with repeated elements
With this idea of permutations as orderings, we can generalize the ordering to be of lists possibly
with repeated elements.
Suppose we have a list of n elements, of which k are the same. Clearly any permutation of these
k elements alone will be indistinguishable. But given the n! permutations of all elements of the list,
we can put them into classes according to the permutation of the other dierent elements. Since in
each class the only dierence will be the ordering of the k same elements, each class will have k!
permutations. But the permutations in each class will be indistinguishable. Hence the total number
of dierent permutations is n!/k!.
Example 2.7 Find the number of dierent permutations of letters in the word TOTTERING.
Here we have word with nine letters, of which three are the same. Hence we nd that
9!/3! = 362880/6 = 60480
is the number of dierent permutations.
26
Example 2.8 Consider the computer companys job problem given in example 4.5 above. There
are 17 people, of which four will be assigned a job, and the other 13 do nothing. Any assignation
can be thought of as a permutation of the list
networking, help desk, installation, backups, nothing, . . . , nothing
. .
13 of these

Then
17!/13! = 355687428096000/6227020800 = 57120
is the number of such permutations.
We see that evaluating n!/k! by working out rst n!, then k!, and nally performing a division,
may be very inecient, especially if both n and k are large. A much better way is to generalize the
recursive form of the factorial function and to write
n!/k! = n(n 1)(n 2) (n k + 1).
Thus, for example:
157!/154! = 157 156 155 = 3796260.
The numbers 157! and 154! are too large to be practicable in calculations.
Permutations of subsets
We have seen how to compute the number of permutations of
1. A set (which has distinct elements),
2. A list (which may have repeated elements).
We now look at the problem of nding the number of permutations of k objects out of n distinct
objects. We may rephrase this question as: given a set S with [S[ = n, how many permutations of
k elements of S are there?
We may apply the multiplication principle directly; and permutation will be a k-tuple:
s
1
, s
2
, . . . , s
k

where each s
i
S. There are n choices for s
1
, which leaves n 1 choices for s
2
. Then there are
n 2 choices for s
3
, n 3 choices for s
4
and so on. Thus there are
n(n 1)(n 2) (n k + 1)
27
dierent permutations. This number is denoted P(n, k). Thus we have:
The number of permutations of k elements of an n-element set is
P(n, k) = n(n 1)(n 2) (n k + 1) = n!/(n k)!.
Note that if we replace k with n k in the above equation we obtain
n!/k! = P(n, n k)
which is another notation for writing permutations with repeated elements.
2.3 Combinations
A combination is a set of objects, where order is unimportant. Given a set S of n elements, the k
combinations of S is the set of all groups of k objects from S. Since an unordered group of distinct
elements can be considered to be a set, each k combination is equivalent to a subset with k elements.
Here, for example, is a list of all 3 combinations of S = A, B, C, D, E:
A, B, C A, B, D
A, B, E A, C, D
A, C, E A, D, E
B, C, D B, C, E
B, D, E C, D, E
If we were to put set brackets around each of the above groups we would have the list of all three
element subsets of S.
The big question now is: how many k combinations are there? To answer this, rst note that
there are P(n, k) = n!/(nk)! dierent k permutations. Since each permutation contains k elements,
each dierent group will occur k! times. Then the number of dierent groups must be P(n, k)/k!.
Thus we have:
The number of combinations of k elements from an n-element set is
P(n, k)
k!
=
n(n 1)(n 2) (n k + 1)
k!
=
n!
(n k)!k!
and this value is denoted C(n, k) or
_
n
k
_
.
For example, we have listed above all three element subsets of a ve element set, and found that
there were 10 such subsets. This would indicate that
_
5
3
_
= 10.
28
Example 2.9 In how many ways can a committee of 5 people be chosen from a group of 17?
Since we are choosing a group of people, order is unimportant, and so this is a problem about
combinations. Thus
_
17
5
_
=
17!
5! 12!
=
355687428096000
120 479001600
= 6188
is the number we want.
As with permutations, using factorials this way is unnecessarily clumsy. Far better to use:
_
17
5
_
=
P(17, 5)
5!
=
17 16 15 14 13
5!
= 6188.
This helps keeps the calculations to a manageable size.
Example 2.10 In how many ways can committees of 4 and 6 people (with no person in common)
be chosen from a total of 21?
Well, suppose we pick the four-person committee rst. There are
_
21
4
_
= 5985
ways to do that. That leaves 17 people from which to pick the six-person committee. There are
_
17
6
_
= 12376
ways to do that. By the multiplication principle, there are
5985 12376 = 74070360
ways of picking the two committees.
But suppose we picked the six-person committee rst? Then we would have 15 people left from
which to pick the four-person committee. The total number of ways would be
_
21
6
__
15
4
_
= 54264 1365 = 74070360
which is precisely the same value we had before.
Listing combinations
By a slight revision of the algorithm for listing permutations, we can provide an algorithm to list
all k subsets of a set S = s
1
, s
2
, . . . , s
n
. As before, it will be recursive:
The only 1-subset of a one element set S = x is x.
29
List all subsets of the form
s
1
, P
where P is the list of elements of all k 1 subsets of S s
1
.
Next list all subsets of the form
s
2
, P
where P is the list of elements of all k 1 subsets of S s
1
, s
2
.
Next list all subsets of the form
s
3
, P
where P is the list of elements of all k 1 subsets of S s
1
, s
2
, s
3
.
Continue until we have listed the subset
s
nk+1
, s
nk+2
, . . . , s
n
.
If we apply this algorithm to listing the three elements subsets of S = A, B, C, D, E we will obtain
precisely the listing given above.
Some properties of combinations
We will be more interested in examining a few basic properties of the numbers
_
n
k
_
which we shall see much of in the next chapter.
Result 1.
_
n
0
_
= 1.
By denition, we have
_
n
0
_
=
n!
n!0!
=
n!
n!
= 1
using the fact that 0! = 1. It also follows that
_
n
n
_
= 1.
30
Result 2.
_
n
k
_
=
_
n
n k
_
.
This follows immediately from the denition. We have
_
n
k
_
=
n!
(n k)!k!
and if we replace k with n k throughout we obtain
_
n
n k
_
=
n!
(n (n k))!(n k)!
=
n!
k!(n k)!
=
n!
(n k)!k!
=
_
n
k
_
.
This can be a useful property if both n and k are large. For example:
_
173
169
_
=
_
173
4
_
=
173 172 171 170
4!
= 36041955.
Result 3.
_
n
k
_
=
_
n 1
k
_
+
_
n 1
k 1
_
.
This can be shown in two ways: algebraic, and combinatorial. The algebraic method use symbols
and properties of factorials; the combinatorial method uses denition in terms of the number of
subsets. We shall look at each of these.
For the combinatorial method, we start with the fact that
_
n
k
_
is the number of k-element subsets
of the n element set S = 1, 2, 3, . . . , n. Of these k-element subsets, some will contain the number
1, and some wont. We thus have:
_
n
k
_
= (number of subsets with the 1 in them) + (number of subsets without 1).
Consider the subsets containing 1. Each of these has the form
1, P
where P is a group of k 1 elements chosen from the set 2, 3, . . . , n. Since we are choosing k 1
elements from n 1 to form P, there are
_
n 1
k 1
_
subsets of this sort.
Now consider the subsets not containing 1. All these subsets then consist of k elements chosen
from 2, 3, . . . , n, and so there are
_
n 1
k
_
31
subsets of this sort. Putting these numbers into the above equation gives us
_
n
k
_
=
_
n 1
k 1
_
+
_
n 1
k
_
which is exactly what we wanted.
The algebraic method is just ddling about with symbols:
_
n 1
k
_
+
_
n 1
k 1
_
=
(n 1)!
(n k 1)!k!
+
(n 1)!
(n k)!(k 1)!
=
(n 1)!
(n k 1)!k(k 1)!
+
(n 1)!
(n k)(n k 1)!(k 1)!
=
(n 1)!
(n k 1)!(k 1)!
_
1
k
+
1
n k
_
=
(n 1)!
(n k 1)!(k 1)!
_
(n k) +k
k(n k)
_
=
(n 1)!
(n k 1)!(k 1)!
_
n
k(n k)
_
=
n(n 1)!
(n k)(n k 1)!k(k 1)!
=
n!
(n k)!k!
=
_
n
k
_
.
2.4 Stirlings approximation
We have seen that n! is a very fast growing function. Also, it is a function which is not easy to
compute. However, in many instances, we dont need an exact value, but just some idea of how big
a factorial might be. Then we may use Stirlings approximation:
If n is very large, then
n!

2n
_
n
e
_
n
and this approximation becomes more accurate as n increases.
Lets look at an example: 30!. If we use the factorial key on a calculator, we receive the value
30! 2.652528598 10
32
.
Applying Stirlings approximation, we obtain:
30!

60(30/e)
30
= 2.645170959 10
32
which is pretty close to the actual value.
32
Stirlings approximation can be used to calculate factorials such as 100! which cant be handled
by most calculators. The way to apply the approximation is to take logarithms (to the base 10) of
both sides:
log
10
n! log
10
(

2n(n/e)
n
)
= (1/2) log
10
(2n) +nlog
10
(n/e)
The last line can be easily done on a hand-held calculator. If n = 100, we nd that
log
10
(100!) (1/2) log
10
200 + 100 log
10
(100/e)
= (1/2)(2.798179868) + 100(1.56570552)
= 157.96964174
Now we remove the logarithm by raising 10 to the power of both sides:
100! 10
157.96964174
= 100
0.96964174
10
157
= 9.32484763 10
157
.
Exercises
The multiplication principle and permutations
1. Determine the number of injective functions from a set of m elements to a set of n elements,
when m and n are:
(a) 3 and 3 (b) 4 and 4 (c) 4 and 5 (d) 5 and 4 (e) m and n
2. (a) In how many ways can 4 jobs be assigned to 5 workers?
(b) Interpret this question as a questions about functions.
3. (a) In how many ways can 3 workers be selected for 3 jobs from a pool of 8 applicants?
(b) Interpret this question as a questions about functions.
4. In how many ways can n people be placed in a circle? (Two arrangements are considered the
same if they are rotations of each other.)
5. In how many ways can 3 pieces of fruit be given to 5 children if
(a) no child can have more than one piece of fruit?
(b) a child can have any number of pieces?
6. Repeat the previous question for the general case of n pieces of fruit being given to m children.
33
7. An athlete training for a triathlon every morning has a choice of 7 dierent runs, 6 dierent
places to swim, and 10 dierent bicycle routes. How many dierent training routines are
there?
8. Show that P(n, k) has the following recursive denition:
P(n, 0) = 1, P(n, k) = P(n 1, k) +kP(n 1, k 1) for k 1.
9. Determine the number of arrangements of letters in each of the words:
(a) ESSENCES (b) MISSISSIPPI (c) HIPPOPOTAMUS
(d) PSEUDOPSEUDOHYPOPARATHYROIDISM
Combinations
10. In Tattslotto, the player picks six numbers from forty.
(a) How many plays are there?
(b) A win is obtained when all six are chosen correctly. In how many ways can this be done?
(c) A second place win is when ve of the chosen numbers are correct. In how many ways
can this be done?
(d) A third place win is when four of the chosen numbers are correct. In how many ways
can this be done?
11. Determine the number of ways in which a committee of n persons be chosen from a list of m
persons, where n and m are:
(a) 2 and 5 (b) 5 and 7 (c) 3 and 8 (d) 4 and 20 (e) n and m
12. Two committees must be chosen from 20 people, one with 6 persons, the other with 3, and
neither committee having any people in common. In how many ways can this be done?
13. In one version of the card game Poker, hands of ve cards are dealt to each player.
(a) How many dierent hands are there?
(b) How many hands contain only spades?
(c) How many hands contain only one suit?
(d) A full house consists of three cards of one value, and two cards of another. How many
such hands are there?
14. The number of night watchmen employed at a large factory site is such that it is possible to
have a dierent set of four watchmen every night for a year. What is the smallest number of
watchmen for which this is possible?
34
Evaluation of combinatorial functions
15. Evaluate the following binomial coecients:
(a)
_
9
3
_
(b)
_
25
22
_
(c)
_
18
15
_
(d)
_
97
1
_
(e)
_
100
2
_
(f)
_
150
147
_
16. Find the smallest value of n such that one of the binomial coecients
_
n
k
_
is greater than:
(a) 100 (b) 1000 (c) 10, 000 (d) 1, 000, 000
17. Evaluate the following quotients of binomial coecients and write each answer as a fraction
in its lowest terms:
(a)
_
90
35
___
89
34
_
(b)
_
100
23
___
99
23
_
(c)
_
200
98
___
199
96
_
18. Using a computer program, and logarithms, or otherwise, determine the approximate values
of:
(a) 100! (b) 150! (c) 200! (d) 500! (e) 1000!
19. Use Stirlings formula to approximate each of the factorials in the previous question. How
close is Stirlings approximation to the results you found?
Other combinatorial numbers
20. The Bell numbers B
n
are dened to be the number of ways an n element set can be broken
up into subsets. For example, the 3 element set A, B, C can be broken up in ve ways:
A, B, C or A, B, C or B, A, C or C, A, B or A, B, C
and so B
3
= 5.
Determine the values of B
1
, B
2
and B
4
.
21. The Bell numbers can be generated by the following recursive formula:
B
0
= 1,
B
n+1
=
_
n
0
_
B
n
+
_
n
1
_
B
n1
+
_
n
2
_
B
n2
+ +
_
n
n 1
_
B
1
+
_
n
n
_
B
0
for n 1.
Use this formula to generate B
n
for n = 5, 6, 7, 8, 9, 10.
22. The Stirling numbers of the rst kind, denoted [
n
k
], are dened to be the coecients of x
k
in
the expansion of
x(x 1)(x 2) (x (n 1))
Write down values of [
n
k
] for all 1 n 3 and 1 k 3.
35
23. The Stirling numbers of the rst kind can be produced by the following recursive denition:
_
n
0
_
= 0,
_
n
n
_
= 1,
_
n
k
_
=
_
n 1
k 1
_
(n 1)
_
n 1
k
_
for 1 k n 1.
Use this to generate the rst eight rows of a Stirlings triangle of the rst kind.
24. The Stirling numbers of the second kind, denoted
n
k
, are dened to be the number of ways
in which an n element set can be broken up into k subsets. For example, the 3 element set
A, B, C can be split up into two subsets in three ways:
A, B, C or B, A, C or C, A, B
and so
3
2
= 3.
Write down values of
n
k
all n 3 and k 3.
25. The Stirling numbers of the second kind can be produced by the following recursive denition:
_
0
0
_
= 1,
_
n
0
_
= 0,
_
n
n
_
= 1,
_
n
k
_
=
_
n 1
k 1
_
+k
_
n 1
k
_
for 1 k n1.
Use this to generate the rst eight rows of a Stirlings triangle of the second kind.
26. By denition, we have
_
n
0
_
+
_
n
1
_
+
_
n
2
_
+ +
_
n
n
_
= B
n
Verify this for the rst eight rows of your second Stirling triangle.
36
Chapter 3
The binomial theorem
3.1 Statement and proofs
The binomial theorem can be stated as:
(1 +x)
n
=
_
n
0
_
+
_
n
1
_
x +
_
n
2
_
x
2
+ +
_
n
n 1
_
x
n1
+
_
n
n
_
x
n
. (3.1)
we prove this, rst note that it can easily be generalized to expansions of (x +y)
n
:
(x +y)
n
= x
n
_
1 +
y
x
_
n
= x
n
__
n
0
_
+
_
n
1
_
y
x
+
_
n
2
_
_
y
x
_2
+ +
_
n
n 1
_
_
y
x
_
n1
+
_
n
n
_
_
y
x
_
n
_
by replacing x in the statement above with y/x. This means we have
(x +y)
n
=
_
n
0
_
x
n
+
_
n
1
_
x
n1
y +
_
n
2
_
x
n2
y
2
+ +
_
n
n 1
_
xy
n1
+
_
n
n
_
y
n
. (3.2)
The numbers
_
n
k
_
because of their importance to this theorem, are called binomial coecients.
This is a very important theorem, and so we shall give two proofs.
Proof 1. We shall use induction on n. First note that when n = 1, we have
(1 +x)
1
= 1 +x =
_
1
0
_
+
_
1
1
_
x.
For the inductive step, we have
(1 +x)
n+1
= (x + 1)(1 +x)
n
.
37
We shall be making use of the result from chapter 2; that
_
n
k
_
=
_
n 1
k
_
+
_
n 1
k 1
_
but replacing n with n + 1, so that
_
n + 1
k
_
=
_
n
k
_
+
_
n
k 1
_
Now we have
(1 +x)
n+1
= (x + 1)(1 +x)
n
from above
= (x + 1)
__
n
0
_
+
_
n
1
_
x +
_
n
2
_
x
2
+ +
_
n
n 1
_
x
n1
+
_
n
n
_
x
n
_
=
_
n
0
_
x +
_
n
1
_
x
2
+
_
n
2
_
x
3
+ +
_
n
n 1
_
x
n
+
_
n
n
_
x
n+1
+
_
n
0
_
+
_
n
1
_
x +
_
n
2
_
x
2
+ +
_
n
n 1
_
x
n1
+
_
n
n
_
x
n
.
Now we can collect together the common powers of x:
(1 +x)
n+1
=
_
n
0
_
+
__
n
0
_
+
_
n
1
__
x +
__
n
1
_
+
_
n
2
__
x
2
+ +
__
n
n 1
_
+
_
n
n
__
x
n
+
_
n
n
_
x
n+1
.
By the addition result, the right hand side can be simplied to
_
n
0
_
+
_
n + 1
1
_
x +
_
n + 1
2
_
x
2
+ +
_
n + 1
n
_
x
n
+
_
n
n
_
x
n+1
.
Now we use the facts that
_
n
0
_
= 1 =
_
n + 1
0
_
and
_
n
n
_
= 1 =
_
n + 1
n + 1
_
to write the expression as
_
n + 1
0
_
+
_
n + 1
1
_
x +
_
n + 1
2
_
x
2
+ +
_
n + 1
n
_
x
n
+
_
n + 1
n + 1
_
x
n+1
.
But this is just the binomial theorem for the power n + 1. This completes the proof.
38
Proof 2. This is a combinatorial, rather than algebraic proof.
First note that any term in the expansion of (1 +x)
n
will contain a term taken from each of the
brackets in
(1 +x)(1 +x)(1 +x) (1 +x)
. .
n copies
Consider a term x
k
. To form this term, we take k lots of x from the n brackets in the expression.
Since this involves choosing k things from n, there are
_
n
k
_
ways of doing it. Thus the coecient of
x
k
in the expansion of (1 +x)
n
is just
_
n
k
_
. But this is precisely what the theorem says.
Having given some proofs, lets look at a few examples.
Example 3.1 Expand (1 2x)
5
using the binomial theorem.
We start by writing (1 2x) = (1 + (2x)). Now we can apply the theorem:
(1 2x)
5
= (1 + (2x))
5
=
_
5
0
_
+
_
5
1
_
(2x) +
_
5
2
_
(2x)
2
+
_
5
3
_
(2x)
3
+
_
5
4
_
(2x)
4
+
_
5
5
_
(2x)
5
= 1 + 5(2x) + 10(4x
2
) + 10(8x
3
) + 5(16x
4
) + 1(32x
5
)
= 1 10x + 40x
2
80x
3
+ 80x
4
32x
5
which is the expansion required.
Example 3.2 Expand (3x + 5y)
4
using the binomial theorem:
(3x + 5y)
4
=
_
4
0
_
(3x)
4
+
_
4
1
_
(3x
3
)(5y) +
_
4
2
_
(3x)
2
(5y)
2
+
_
4
3
_
(3x)(5y)
3
+
_
4
4
_
(5y)
4
= 81x
4
+ 4(27x
3
)(5y) + 6(9x
2
)(25y
2
) + 4(3x)(125y
3
) + 1(625y
4
)
= 81x
4
+ 540x
3
y + 1350x
2
y
2
+ 1500xy
3
+ 625y
4
.
This is the required expansion.
It is often the case that rather than performing a full expansion, we use the binomial theorem
to nd a particular coecient.
Example 3.3 Find the coecient of x
3
y
5
in the expansion of (7x 2y)
8
.
First note that a general term in the expansion (according to the binomial theorem), will be
_
8
k
_
(7x)
8k
(2y)
k
.
For the term we are given, we have k = 5. Thus the required coecient is
_
8
5
_
7
3
(2)
5
= 56(343)(32) = 614656
which is our coecient.
39
Example 3.4 Find the coecient of x in the expansion of (2x + 3/x)
9
.
For this expression, a general term is
_
9
k
_
(2x)
9k
_
3
x
_
k
.
This can be rewritten as
_
9
k
_
2
9k
3
k
x
92k
.
To obtain a exponent of 1, we require 9 2k = 1, or k = 4. Then we have
_
9
4
_
(2
5
)(3
4
) = 126(32)(81) = 326592
being the coecient we require.
3.2 Some binomial identities
We can obtain many relationships between the binomial coecients. Some can be obtained simply
by substituting particular values of x and y into the binomial theorem.
Example 3.5 Put x = 1 into equation 3.1. Then we have:
(1 + 1)
n
=
_
n
0
_
+
_
n
1
_
+
_
n
2
_
+ +
_
n
n 1
_
+
_
n
n
_
or:
_
n
0
_
+
_
n
1
_
+
_
n
2
_
+ +
_
n
n 1
_
+
_
n
n
_
= 2
n
.
We can prove this result directly, without using the binomial theorem. Recall that
_
n
k
_
is the number
of k element subsets of a set of size n, and the total number of subsets is 2
n
. Since the left hand
side gives the sum of all numbers of subsets of dierent sizes, the result follows immediately.
Example 3.6 Put x = 1 into equation 3.1. Then we have:
(1 1)
n
=
_
n
0
_

_
n
1
_
+
_
n
2
_
+
_
n
n 1
_
(1)
n1
+
_
n
n
_
(1)
n
or:
_
n
0
_

_
n
1
_
+
_
n
2
_
+ (1)
n1
_
n
n 1
_
+ (1)
n
_
n
n
_
= 0.
Lets try this with n = 7. We have;
_
7
0
_

_
7
1
_
+
_
7
2
_

_
7
3
_
+
_
7
4
_

_
7
5
_
+
_
7
6
_

_
7
7
_
= 1 7 + 21 35 + 35 21 + 7 1
= 0.
So it does work!
40
Example 3.7 Lets take the addition formula
_
n
k
_
=
_
n 1
k 1
_
+
_
n 1
k
_
and apply it repeatedly to the right hand side. First we obtain
_
n
k
_
=
__
n 2
k 2
_
+
_
n 2
k 1
__
+
__
n 2
k 1
_
+
_
n 2
k
__
and this can be simplied to
_
n
k
_
=
_
n 2
k 2
_
+ 2
_
n 2
k 1
_
+
_
n 2
k
_
.
Now apply the addition formula again to the right hand side:
_
n
k
_
=
__
n 3
k 3
_
+
_
n 3
k 2
__
+ 2
__
n 3
k 2
_
+
_
n 3
k 1
__
+
__
n 3
k 1
_
+
_
n 3
k
__
and this can be simplied to
_
n
k
_
=
_
n 3
k 3
_
+ 3
_
n 3
k 2
_
+ 3
_
n 3
k 1
_
+
_
n 3
k
_
.
If you look carefully, you will see that the coecients on the right hand side are themselves binomial
coecients. This pattern can be continued indenitely.
3.3 Pascals triangle
The binomial coecients can be placed in a triangular formation called Pascals triangle. It is
formed as follows:
The outer values of any row are 1.
For each row, values are obtained by adding the values of the two adjacent terms in the row
above.
That is, we have the formation
x y
z
with z = x +y.
41
The rst few rows of Pascals triangle are:
1
1 1
1 2 1
1 3 3 1
1 4 6 4 1
1 5 10 10 5 1
1 6 15 20 15 6 1
1 7 21 35 35 21 7 1
1 8 28 56 70 56 28 8 1
That the entries in Pascals triangle are in fact the binomial coecients follows from the addition
result. This is a very neat and easy way of generating binomial coecients for small values of n.
Many of the results about binomial coecients can be restated in terms of Pascals triangle; for
example:
1. The sum of all entries in row n is 2
n
.
2. The triangle is symmetric about the middle column.
Pascals triangle can also be used to establish further results about binomial coecients.
3.4 The multinomial theorem
The binomial theorem is handy for expansion of binomials, but what happens if we wish to expand
expressions such as
(x +y +z)
6
or
(3x 3y + 5z +w/2)
7
?
There is indeed a result which enables us to do this, but rst we need a denition and notation.
Suppose we have an integer n and integers k
1
, k
2
, . . . , k
r
which sum to n. That is:
k
1
+k
2
+ +k
r
= n.
Then we dene the multinomial coecient
_
n
k
1
, k
2
, . . . , k
r
_
by
_
n
k
1
, k
2
, . . . , k
r
_
=
n!
k
1
!k
2
! . . . k
r
!
.
42
For example:
_
7
2, 3, 2
_
=
7!
2!3!2!
=
5040
2 6 2
= 210.
We can now state a version of the multinomial theorem for three variables: the trinomial theorem:
(x +y +z)
n
=

_
n
a, b, c
_
x
a
y
b
z
c
where the sum is taken over all triples a, b, c for which a +b +c = n.
Example 3.8 Expand
(x +y +z)
5
.
This is where this theorem gets dicult. We rst have to nd all the triples a, b, c for which
a + b + c = 5, and then for each triple evaluate
_
5
a,b,c
_
. The following table provides all this
information:
a b c
_
5
a, b, c
_
a b c
_
5
a, b, c
_
a b c
_
5
a, b, c
_
5 0 0 1 4 0 1 5 3 2 0 10
0 5 0 1 4 1 0 5 1 1 3 20
0 0 5 1 0 2 3 10 1 3 1 20
0 1 4 5 0 3 2 10 3 1 1 20
0 4 1 5 2 0 3 10 1 2 2 30
1 0 4 5 2 3 0 10 2 1 2 30
1 4 0 5 3 0 2 10 2 2 1 30
Now the a, b, c values are the exponents of x, y and z, and the
_
5
a,b,c
_
values are the coecients.
Putting all this together produces:
(x +y +z)
5
= x
5
+y
5
+z
5
+ 5yz
4
+ 5y
4
z + 5xz
4
+ 5xy
4
+ 5x
4
z + 5x
4
y + 10y
2
z
3
+ 10y
3
z
2
+ 10x
2
z
3
+10x
2
y
3
+ 10x
3
z
2
+ 10x
3
y
2
+ 20xyz
3
+ 20xy
3
z + 20x
3
yz + 30xy
2
z
2
+ 30x
2
yz
2
+30x
2
y
2
z.
This is the full expansion.
Exercises
The binomial theorem
1. Expand
(a) (a +b)
5
(b) (x y)
4
(c)
_
x +
1
x
_
5
(d)
_
x
1
x
_
6
43
2. Find the coecients of
(a) x
2
y
3
in (x +y)
5
(b) x
3
y
3
in (3x + 2y)
6
(c) x in
_
3x
1
2x
_
7
(d) xy in (1 2xy)
7
(e)
x
2
y
2
in
_
x
y
+
y
x
_
4
(f) sin
2
cos in (sin cos )
3
3. By using appropriate values for x and y in the binomial theorem, show that
(a)
_
n
0
_
+
_
n
1
_
+ +
_
n
n
_
= 2
n
(b)
_
n
0
_
+ 2
_
n
1
_
+ 4
_
n
2
_
+ + 2
n
_
n
n
_
= 3
n
(c)
_
n
0
_

_
n
1
_
+
_
n
2
_
+ (1)
n
_
n
n
_
= 0
(d)
_
n
0
_
+k
_
n
1
_
+k
2
_
n
2
_
+ +k
n
_
n
n
_
= (k + 1)
n
(e) 2
n
_
n
0
_
2
n1
_
n
1
_
+ 2
n2
_
n
2
_
+ (1)
n
_
n
n
_
= 1
The multinomial theorem
4. Evaluate the following multinomial coecients:
(a)
_
6
2, 2, 2
_
(b)
_
10
1, 2, 3, 4
_
(c)
_
9
3, 3, 3
_
(d)
_
14
2, 3, 4, 5
_
5. Expand:
(a) (x +y +z)
3
(b) (1 +x +y)
4
(c)
_
1 +x +
1
x
_
3
(d) (1 x y)
4
(e) (x +y +z +w)
3
(f) (x 2y + 3z)
4
6. Find the coecients of
(a) x
2
yz in (x +y +z)
4
(b) xy in (1 +x +y)
3
(c) xyz in (1 +x +y +z)
3
(d) x
2
y
2
z
2
in (1+x+y+z)
8
(e) x in (2 + 3x + 4y)
5
(f) abcd in (2a + 3b + 4c +
5d)
4
7. By using appropriate values for the variables in the multinomial theorem, show that
(a)

a+b+c=n
_
n
a, b, c
_
= 3
n
44
(b)

k
1
+k
2
++kr=n
_
n
k
1
, k
2
. . . , k
r
_
= r
n
8. Show that
_
n
a, b, c
_
=
_
n 1
a 1, b, c
_
+
_
n 1
a, b 1, c
_
+
_
n 1
a, b, c 1
_
9. Generalize the identity in the previous question to more than three terms.
Combinatorial identities
10. Show that
__
n
0
_
+
_
n
1
_
+ +
_
n
n
__
2
=
_
2n
0
_
+
_
2n
1
_
+ +
_
2n
2n
_
11. By expressing each side in terms of factorials, show that
(a) k
_
n
k
_
= n
_
n 1
k 1
_
(b)
_
m
n
__
mn
k
_
=
_
m
k
__
mk
n
_
(c)
_
m
n
__
n
k
_
=
_
m
k
__
mk
n k
_
12. Use the result of the previous question to show that
_
n
1
_
2
_
n
2
_
+ 3
_
n
3
_
+ (1)
n
n
_
n
n
_
= 0
13. Show that
_
n
1
_
+ 2
_
n
2
_
+ 3
_
n
3
_
+ +n
_
n
n
_
= n2
n1
14. Use induction on n to show that
_
k
k
_
+
_
k + 1
k
_
+
_
k + 2
k
_
+ +
_
n
k
_
=
_
n + 1
k + 1
_
15. Show that
(a)
_
m
0
__
n
k
_
+
_
m
1
__
n
k 1
_
+
_
m
2
__
n
k 2
_
+ +
_
m
k
__
n
0
_
=
_
m+n
k
_
(b)
_
m
0
__
n
k
_
+
_
m
1
__
n
k + 1
_
+
_
m
2
__
n
k + 2
_
+ +
_
m
k
__
n
k +n
_
=
_
m+n
n +k
_
45
16. By evaluating the coecient of x
n
in both sides of (1 +x)
n
(1 +x)
n
= (1 +x)
2n
, show that
_
n
0
_
2
+
_
n
1
_
2
+ +
_
n
n
_
2
=
_
2n
n
_
17. By adding the expansions of (1 + 2)
2n
and (1 2)
2n
, show that
_
2n
0
_
+ 4
_
2n
2
_
+ 16
_
2n
4
_
+ + 4
n
_
2n
2n
_
=
1
2
(3
2n
+ 1)
46
Chapter 4
Limits
4.1 The idea
The basic idea of a limit is this: suppose we have a function f(x), and some value a, to which x
is allowed to get as close as we like. If the corresponding values of f(x) get closer and closer to a
value L, then we say
The limit of f(x) as x approaches a is L.
and we write this as
lim
xa
f(x) = L
4.2 Basic limits
Some examples:
1. f(x) = x
2
, a = 3.
Heres a little table of values close to 3, and corresponding values of f(x):
x f(x)
3.1 9.61
2.9 8.41
3.01 9.0601
2.99 8.9401
3.001 9.006001
2.999 8.994001
and we see that
lim
x3
x
2
= 9.
47
2. f(x) =

x, a = 5.
Again, heres a little table of values close to 5, and corresponding values of f(x):
x f(x)
5.1 2.25832
4.9 2.21359
5.01 2.23830
4.99 2.23383
5.001 2.23629
4.999 2.23584
and we see that
lim
x5

x 2.236
In both these examples, the value of the limit was equal to the value of the function. That is,
lim
x3
x
2
= 3
2
= 9
and
lim
x5

x =

5 2.236.
In general, if f(x) is continuous around x = a; that is, if the graph of the function has no breaks
near x = a, then
lim
xa
f(x) = f(a).
Examples of such continuous functions are:
polynomials:
x
3
2x
2
+ 7, x
17
32x
9
+ 102x
4
trigonometric functions:
sin(2x +), cos(x /3), tan(x/4)
exponential functions:
2
x
, e
2x3
, 3
x1/2
functions built up by mixing the above functions:
sin(2
x/3
), sin(3x) +x
2
, 2
cos x
48
4.3 Limits where the function is undened
There are many cases where the limit may exist even if the function itself is undened at the limit
point. A simple example is
lim
x0
x
x
.
Since x/x = 1 except for when x = 0, the function x/x is undened at x = 0. We cant simply
substitute 0 into x/x and get a result, since the expression 0/0 is undened. But the limit certainly
does exist, and is equal to 1.
Often a limit of this kind can be evaluated by simplifying f(x). In general, if f(x) = g(x)
everywhere except at x = a, and if g(x) is continuous, then
lim
xa
f(x) = g(a).
Heres an example:
lim
x3
x
2
9
x 3
.
Here (x
2
9)/(x 3) is undened at x = 3, but
x
2
9
x 3
=
(x + 3)(x 3)
x 3
= x + 3.
Thus
lim
x3
x
2
9
x 3
= lim
x3
x + 3 = 6.
A very important limit:
lim
x0
sin x
x
.
Use your calculator (make sure it is in Radian mode) to check the following table:
x
sin x
x
0.1 0.998334
0.1 0.998334
0.01 0.999983
0.01 0.999983
0.001 1.00000
0.001 1.00000
We see that
lim
x0
sin x
x
= 1.
49
Use your calculator to check the values for each of the functions in the following table and so evaluate
the limits lim
x0
f(x) :
x
1 e
x
x
1 cos x
x
2
ln(x + 1)
x
0.1 0.951630 0.499580 0.953102
0.1 1.051710 0.499580 1.053605
0.01 0.995020 0.500000 0.995033
0.01 1.005000 0.500000 1.005034
0.001 0.999500 0.500000 0.999500
0.001 1.001000 0.500000 1.000500
4.4 Limits at innity
If we draw the graph of y = 1/x:
we see that as x gets very large, the y values get very small. We can write this as:
lim
x
1
x
= 0.
Heres another calculator experiment; to nd the value of
lim
x
x
2
+ 1
x
2
x
.
x
x
2
+ 1
x
2
x
10 1.122222
100 1.010202
1, 000 1.001002
10, 000 1.000100
100, 000 1.000010
1, 000, 000 1.000001
50
Limits of the form
lim
x
p(x)
q(x)
where p(x) and q(x) are polynomials, can be evaluated by simple rules:
1. If the degree of q(x) is greater than the degree of p(x) then
lim
x
p(x)
q(x)
= 0.
2. If the degree of q(x) is less than the degree of p(x) then
lim
x
p(x)
q(x)
= .
3. If the degree of q(x) is equal than the degree of p(x) then
lim
x
p(x)
q(x)
=
coecient of highest power in p(x)
coecient of highest power in q(x)
4.5 The derivative as a limit
Given a function (f(x), and a value x = a, we dene the derivative of f(x) at x = a to be the
gradient of the tangent line to the graph of y = f(x) at the point (x, y) =
_
a, f(a)
_
. Figure 4.1
shows the graph of y = x
2
and the tangent line to it at x = 1.5, and the tangent has a slope of 3.
So the derivative of x
2
at x = 1.5 equals 3.
We can calculate the slope of the tangent by a limiting procedure. Pick some point x = b away
from x = a, and compute the gradient of the line between the two points on the curve
_
a, f(a)
_
and
_
b, f(b)
_
. We know that the gradient of such a line can be computed as follows:
gradient =
rise
run
=
f(b) f(a)
b a
.
If b = a +h this fraction can be rewritten as
f(a +h) f(a)
h
.
As b gets close to a; that is, as h (the distance between them) approaches zero, the gradient of the
lines approaches the gradient of the tangent line. Using the notation
d
dx
f(x)

x=a
51
2
4
6
2
4
6
1 2 3 1 2 3
Figure 4.1: A graph and a tangent.
for the derivative, we can now write:
d
dx
f(x)

x=a
= lim
h0
f(a +h) f(a)
h
For example, consider the case of f(x) = x
2
and x = 1. The derivative is equal to
lim
h0
(1 +h)
2
1
2
h
= lim
h0
1 + 2h +h
2
1
h
= lim
h0
2h +h
2
h
= lim
h0
2 +h
= 2
and this last value is the result we want.
52
Use the same method to nd the derivative, at x = 2, of x
3
:
d
dx
x
3

x=2
= lim
h0
(2 +h)
3
2
3
h
= lim
h0
(8 + 12h + 6h
2
+h
3
) 8
h
= lim
h0
12h + 6h
2
+h
3
h
= lim
h0
12 + 6h +h
2
= 12.
By a similar method we can calculate the general derivative f

(x) of a function f(x). We use the


result:
d
dx
f(x) = lim
h0
f(x +h) f(x)
h
.
For example, here is how we might calculate the derivative of x
2
:
d
dx
x
2
= lim
h0
(x +h)
2
x
2
h
= lim
h0
x
2
+ 2xh +h
2
x
2
h
= lim
h0
2xh +h
2
h
= lim
h0
2x +h
= 2x
Now use the same method to nd the derivative of 1/x:
53
d
dx
_
1
x
_
= lim
h0
_
1
x +h
_

_
1
x
_
h
= lim
h0
x (x +h)
x(x +h)
h
= lim
h0
x (x +h)
xh(x +h)
= lim
h0
h
xh(x +h)
= lim
h0
1
(x
2
+xh)
=
1
x
2
.
Exercises
1. Evaluate the following limits:
(i) lim
x2
2x (ii) lim
x0
2x (iii) lim
x3
4
(iv) lim
x1
(3x 1) (v) lim
x1/3
(3x 1) (vi) lim
x5
x
2
(vii) lim
x1
(x
2
3x + 7) (viii) lim
x4
(x + 3)
2009
(ix) lim
x4
(x
3
x
2
x 1)
2. Evaluate the following limits:
(i) lim
x2
x + 3
x + 2
(ii) lim
x5
x
2
25
x + 5
(iii) lim
x3
x
3
4
x
2
4
3. By performing any necessary algebraic simplication, evaluate the following limits:
54
(i) lim
x0
x
2
+x
x
(ii) lim
x1
x
2
+x 2
x
2
1
(iii) lim
x2
x
2
+x 2
x
2
4
(iv) lim
x1
x
2
3x + 2
x
2
1
(v) lim
x3
x
2
3x + 2
x
2
1
(vi) lim
x2
x
2
7x + 10
x 2
4. Using the result lim
x0
sin x/x = 1 if necessary, evaluate the following limits:
(i) lim
x0
1 + sin x
cos x
(ii) lim
x0
x
sin x
(iii) lim
x0
sin
2
x
x
2
(iv) lim
x0
sin2x
x
(v) lim
x0
tan 2x
3x
(vi) lim
x0
sin x
2x
2
+x
5. Evaluate the following limits:
(i) lim
x
x + 5
x + 3
(ii) lim
x
3x + 7
x
2
2
(iii) lim
x
x
2
+ 1
x + 1
(iv) lim
x
x + sin x
x + cos x
(v) lim
x
3x
3
7x
2
+ 9
x
3
44x
2
(vi) lim
x
x 3
x
2
+ 2x 6
6. Using a calculator, or a computer program, evaluate the following limits:
(i) lim
x

x + 1

x (ii) lim
x0
x

4 +x 2
(iii) lim
x
_
x
2
+ 1 x
(iv) lim
x
_
x
2
+x x (v) lim
x
x
3
_
_
1 +
1
x
3
_
4
1
_
(vi) lim
x
_
3x 1
4x 1
_
x
7. Evaluate each of the following derivatives by rst expressing them as limits:
(i)
d
dx
(x
2
)

x=1
(ii)
d
dx
(sin x)

x=0
(iii)
d
dx
_
1
x
_

x=2
(iv)
d
dx
(x
3
2x)

x=1
(v)
d
dx
_
x + 1
x 1
_

x=3
(vi)
d
dx
(

x)

x=1
8. Perform each of the following dierentiations by expressing each one in the form of a limit:
(i)
d
dx
(x
3
) (ii)
d
dx
_
sin(2x)
_
(iii)
d
dx
_
1
x + 1
_
(iv)
d
dx
_
x
x + 1
_
(v)
d
dx

x (vi)
d
dx
(tan x)
55
56
Chapter 5
Dierentiation
5.1 Introduction
Recall that the derivative of a function is the gradient of the tangent to the graph of the function.
We have used the notation
d
dx
f(x)
for the derivative. If y = f(x), then alternative notations for the derivative are:
y

, f

, y

(x), f

(x),
dy
dx
,
df
dx
.
We also know that
d
dx
f(x) = lim
h0
f(x +h) f(x)
h
.
It is the purpose of this chapter to develop some ecient rules for calculating derivatives.
57
5.2 Powers
Suppose y = x
n
, where n is a positive integer. Then:
dy
dx
= lim
h0
(x +h)
n
x
n
h
= lim
h0
_
x
n
+
_
n
1
_
hx
n1
+
_
n
2
_
h
2
x
n2
+
_
n
n 1
_
h
n1
x +
_
n
n
_
h
n
_
x
n
h
by the binomial theorem
= lim
h0
_
n
1
_
hx
n1
+
_
n
2
_
h
2
x
n2
+
_
n
n 1
_
h
n1
x +
_
n
n
_
h
n
h
as the x
n
terms cancel out
= lim
h0
_
n
1
_
x
n1
+
_
n
2
_
hx
n2
+
_
n
n 1
_
h
n2
x +
_
n
n
_
h
n1
=
_
n
1
_
x
n1
as all terms with an h in them go to zero
= nx
n1
.
We thus have our rst rule:
d
dx
x
n
= nx
n1
.
Although we have only demonstrated this for positive integral n, it is in fact true for all powers.
For example:
d
dx
x
4
= 4x
3
d
dx
x
25
= 25x
24
d
dx
x
1/3
=
1
3
x

1
3
1
d
dx
x
4.68
= 4.68x
3.68
=
1
3
x
4/3
In particular, the derivative of x
0
(= 1) is 0.
58
5.3 The addition rule
For discussion of all dierentiation rules, it will be convenient to change the notation. For a start,
consider the limit
lim
h0
f(x +h) f(x)
h
.
The top line represents a small change in f(x); the bottom line a small change in x. Using the
notation f, x for these small changes, we can write
df
dx
= lim
h0
f
x
.
Note that this is the same denition we have used all along; we are just writing it in a dierent way.
In fact, if f and x are both very small, we can write
df
dx

f
x
.
Thus the derivative is approximated by a fraction. Note that as f(x+h) f(x) = f, we can write
f(x +h) = f(x) + f, or f + f for short.
Suppose we know the derivatives of f(x) and g(x). What is the derivative of f(x) +g(x)? Using
the new notation
d
dx
(f +g) = lim
x0
(f + f +g + g) (f +g)
x
= lim
x0
f + g
x
as the f and g terms cancel out
= lim
x0
_
f
x
+
g
x
_
=
df
dx
+
dg
dx
taking the limits.
We can now state the addition rule for dierentiation:
d
dx
(f +g) =
df
dx
+
dg
dx
.
This can be written in simpler notation:
(f +g)

= f

+g

and the same result holds for subtraction:


(f g)

= f

59
5.4 Multiplication by a constant
By very similar means, we can show that
d
dx
kf(x) = k
d
dx
f(x)
or
(kf)

= kf

where k is a constant.
5.5 Polynomials
We now have all the equipment we need for dierentiating polynomials. Heres an example:
(x
2
+ 3x + 7)

= (x
2
)

+ (3x)

+ (7)

breaking up using the addition rule


= (x
2
)

+ 3(x)

+ 7(1)

further breaking up by taking out the coecients (using the rule


for multiplying by a constant)
= 2x + 3(1) + 7(0)
using the powers rule
= 2x + 3
Heres another one:
(3x
3
14x
2
+ 7x 9)

= (3x
3
)

(14x
2
)

+ (7x)

(9)

= 3(x
3
)

14(x
2
)

+ 7(x)

9(1)

= 3(3x
2
) 14(2x) + 7(1) 9(0)
= 9x
2
28x + 7.
5.6 The product and quotient rules
We will now develop rules for calculating the derivatives of a product fg and the quotient f/g of
two functions f and g. We have, by the (new) denition of the derivative:
60
d
dx
(fg) = lim
x0
(f + f)(g + g) (fg)
x
= lim
x0
(fg +gf +fg + fg) (fg)
x
= lim
x0
(gf +fg + fg
x
= lim
x0
_
g
f
x
+f
g
x
+ f
g
x
_
= g
df
dx
+f
dg
dx
as the last term goes to zero.
We thus have the product rule for dierentiation:
d
dx
(fg) = g
df
dx
+f
dg
dx
or, in simpler notation:
(fg)

= f

g +fg

For example, to dierentiate


(3x
2
+x)(x
4
5x
2
+ 7).
We have:
_
(3x
2
+x)(x
4
5x
2
+ 7)
_

= (3x
2
+x)

(x
4
5x
2
+ 7) + (3x
2
+x)(x
4
5x
2
+ 7)

= (6x + 1)(x
4
5x
2
+ 7) + (3x
2
+x)(4x
3
10x)
and this last result can be simplied by further algebraic manipulation.
61
The quotient rule can be obtained by very similar methods:
d
dx
_
f
g
_
= lim
x0
_
f + f
g + g
_

_
f
g
_
x
= lim
x0
fg +gf fg fg
x(g
2
+gg)
by subtracting the fractions and simplifying the result
= lim
x0
g
f
x
f
g
x
g
2
+gg
by cancelling terms in the top line and rewriting the result
= lim
x0
g
df
dx
f
dg
dx
g
2
and thus the quotient rule for dierentiation is
d
dx
_
f
g
_
=
g
df
dx
f
dg
dx
g
2
or in the simpler notation:
_
f
g
_

=
f

g fg

g
2
.
For example:
d
dx
_
x
2
+x
x
3
x
4
_
=
(x
2
+x)

(x
3
x
4
) (x
2
+x)(x
3
x
4
)

(x
3
x
4
)
2
=
(2x + 1)(x
3
x
4
) (x
2
+x)(3x
2
4x
3
)
(x
3
x
4
)
2
and of course this can be further simplied by algebraic manipulation.
5.7 The chain rule
Suppose we have a function of a function:
y = f
_
g(x)
_
.
62
We shall see how to evaluate the derivative
dy
dx
=
df
dx
.
We have the above approximation, and by basic algebra of fractions:
f
x
=
f
g
g
x
(the gs cancel out). Taking the limit as all these small changes approach zero gives us the chain
rule for dierentiation:
df
dx
=
df
dg
dg
dx
Heres an example; to nd the derivative of
(x
3
+x)
7
.
We have f
_
g(x)
_
= (x
3
+x)
7
, so g(x) = x
3
+x and f(g) = g
7
. Thus:
df
dx
=
df
dg
dg
dx
= 7g
6
(3x
2
+ 1)
= 7(x
3
+x)
6
(3x
2
+ 1)
Heres another example; to dierentiate
1
x
4
+x
2
.
We have
1
x
4
+x
2
= (x
4
+x
2
)
1
so f
_
g(x)
_
= (x
4
+x
2
)
1
, with
g(x) = x
4
+x
2
f(g) = g
1
.
Then
df
dx
=
df
dg
dg
dx
= g
2
(4x
3
+ 2x)
=
4x
3
+ 2x
(x
4
+x
2
)
2
63
5.8 Another look at the quotient rule
We can use the product rule and the chain rule to obtain the quotient rule easily:
_
f
g
_

=
_
fg
1
_

= f

g
1
+f(g
1
)

= f

g
1
+f
_
1g
2
g

. .
using the chain rule
=
f

g

fg

g
2
=
f

g fg

g
2
5.9 Trigonometric functions
First, the derivative of sin x:
d
dx
sinx = lim
h0
sin(x +h) sinx
h
= lim
h0
(sin xcos h + sin hcos x) sin x
h
by the addition formula for sine
= lim
h0
sin x(cos h 1) + sin hcos x
h
= lim
h0
_
sinx
cos h 1
h
+
sin h
h
cos x
_
= cos x, by evaluating the individual limits
64
Thus:
d
dx
sin x = cos x.
We can use this result to dierentiate other trigonometric functions:
d
dx
cos x =
d
dx
sin
_

2
x
_
= cos
_

2
x
_
(1) by the chain rule
= (sin x)(1)
= sin x
and so:
d
dx
cos x = sinx.
And:
d
dx
tan x =
d
dx
sin x
cos x
=
(sin x)

(cos x) (sin x)(cos x)

cos
2
x
by the quotient rule
=
(cos x)(cos x) (sin x)(sin x)
cos
2
x
=
cos
2
x + sin
2
x
cos
2
x
=
1
cos
2
x
= sec
2
x
from which we see that
d
dx
tan x = sec
2
x.
65
5.10 Exponential and logarithmic functions
The function y = e
x
has this important property:
d
dx
e
x
= e
x
.
It is in fact the only function (up to a multiplicative constant) which is equal to its own derivative.
This is one of the many reasons that this particular function is so important. We can generalize
this by using the chain rule to obtain:
d
dx
e
f(x)
= f

(x)e
f(x)
.
Some examples:
d
dx
e
2x
= (2x)

e
2x
d
dx
e
sin x
= (sin x)

e
sin x
= 2e
2x
= cos xe
sin x
d
dx
e
1/x
=
_
1
x
_

e
1/x
d
dx
e
e
x
= (e
x
)

e
e
x
=
1
x
2
e
1/x
e
x
e
e
x
=
The inverse function of y = e
x
is the natural logarithm y = log
e
x; written y = ln x for short. Its
derivative is:
d
dx
ln x =
1
x
and by using the chain rule we can show that
d
dx
ln f(x) =
f

(x)
f(x)
.
5.11 lHpitals rule
We have seen that limits can help in evaluating derivatives. Here we go the other way round, and
show how derivatives can help us evaluate limits. Suppose we have a limit of the form
lim
xa
f(x)
g(x)
66
where both f(a) = g(a) = 0. We cant just substitute a into the fraction, as we would obtain 0/0,
which is undened. Sometimes we can factorize f(x) and g(x), and cancel a common factor, but
there are many occasions where we cant even do that. For example:
lim
x0
1 e
x
x
, lim
x0
1 cos

x
x
, lim
x1/2
2x sinx
4x
2
1
.
Heres a way to evaluate such a limit. Suppose h = x a, so that x = a +h. Then as x approaches
a, the value h approaches 0. We can then write:
lim
xa
f(x)
g(x)
= lim
h0
f(a +h)
g(a +h)
.
Since f(a) = g(a) = 0, we can subtract these from the top and bottom lines of the fraction without
changing their values. Thus the limit can be written as
lim
h0
f(a +h) f(a)
g(a +h) g(a)
and dividing top and bottom by h gives us:
lim
h0
f(a +h) f(a)
h
g(a +h) g(a)
h
=
f

(a)
g

(a)
.
We thus have:
lim
xa
f(x)
g(x)
=
f

(a)
g

(a)
assuming that g

(a) is non-zero. This is one version of lHpitals rule; a slightly stronger version is
If f(a) = g(a) = 0, then lim
xa
f(x)
g(x)
= lim
xa
f

(x)
g

(x)
.
An example:
lim
x3
x
2
9
x 3
.
We can do this by factorizing and cancelling, but using lHpitals rule gives us
lim
x3
2x
1
= lim
x3
2x
= 6.
67
Another:
lim
x1
sin x

x 1
= lim
x1
cos x
1
2
x
1/2
1
taking derivatives of top and bottom
=

1/2
= 2.
Exercises
1. For each of the following functions, evaluate y

= dy/dx and y

= d
2
y/dx
2
:
(i) y = x
2
2x + 7 (ii) y = 3x
3

2
7
x
2
+ 42 (iii) y = 100x
100
x
(iv) y = 1 +x +
x
2
2
2
+
x
3
3
3
(v) y = x(x + 1)(x + 2) (vi) y = (x
2
1)(x
2
+ 1)
2. Use the product or quotient rules (or, if necessary, both) to dierentiate the following functions:
(i) (x
2
+ 1)(x
3
x) (ii) (1
x
2
3
)(1 +
x
3
2
) (iii)
1 +x
1 x
(iv)
x
2
+ 1
x
2
+x + 1
(v)
x
1 x
2
(vi)

x
1 +x
3
3. Use the chain rule to dierentiate the following functions:
(i) (1 +x
2
)
5
(ii)
_
1 +x
2
(iii)
1
(x
2
x)
3
4. Dierentiate the following functions:
(i) (x + 1)
2/3
(ii) x
_
x
2
+ 1 (iii)
3

x
2
+ 3
x
(iv) (3x
2
+ 5x + 1)
3/2
(v) (2x + 7)
1/5
(vi) 3(2x
1/2
+ 1)
1/3
5. Dierentiate the following trigonometric functions:
(i) sin 2x (ii) cos x
2
(iii) tan
_
x

+ 1
_
(iv) sec
2
x (v) sin
2
x + cos
2
x (vi) sec
2
x tan
2
x
6. Dierentiate the following exponential and logarithmic functions:
68
(i) e
3x
(ii) e
sinx
(iii) sin(e
x
)
(iv) ln
e
x
1 +e
x
(v)
e
x
e
x
e
x
+e
x
(vi) e
1/x
(vii) (ln x)
3
(viii) ln
_
1
x
_
(ix) ln(tan x + sec x)
(x) ln(ln x) (xi) ln(x
_
x
2
+ 1) (xii) x
_
sin(ln x) + cos(ln x)
_
7. Use lHpitals rule to evaluate the following limits:
(i) lim
x0
sinx
2
x
(ii) lim
x1
x
3
1
4x
2
x 3
(iii) lim
x0
cos x 1
x
2
(iv) lim
x/3
cos x 1/2
x /3
(v) lim
x2

x
2
+ 5 3
x
2
4
(vi) lim
x0
sin x x
x
3
(vii) lim
x/2
1 sin x
1 + cos 2x
(viii) lim
x0
2x
x + 7

x
(ix) lim
x0
x(cos x 1)
sin x x
69
70
Chapter 6
Graphical Applications Of
Dierentiation
6.1 Introduction
We have seen, in previous chapters, how to calculate derivativesfrom rst principles (using limits)
and by the application of various rules. We are now going to investigate some applications of
derivatives; in particular tangent lines and curve sketching.
6.2 Tangent lines
We have dened the derivative f

(x) as being the gradient of the tangent to the graph y = f(x).


But what is the equation of this tangent line?
Suppose we have a function y = f(x), and we choose some particular point x = a. The
corresponding y value will be f(a). The gradient of the tangent line is f

(a) and we know that the


equation of a line with gradient m which passes through a point (A, B) is
y B
x A
= m
or
y = m(x A) +B
= mx + (B mA).
In our case,
A = a
B = f(a)
m = f

(a)
71
and so the equation of the tangent line is
y = f

(a)(x a) +f(a). (6.1)


Heres an example; to nd the equation of the tangent line to y = x
2
+ 1 at x = 2. Here a = 2,
f(a) = 2
2
+ 1 = 5, and f

(x) = 2x, so f

(a) = 4. Thus
y = 4(x 2) + 5
or y = 4x 3
as the required equation.
Heres another example: the tangent line to y = x
3
2x
2
+x at x = 1. Here
a = 1
f(a) = (1)
3
2(1)
2
+ (1)
= 4
f

(x) = 3x
2
4x + 1
and so f

(a) = 8.
Finally
y = 8(x (1)) + (4)
= 8(x + 1) 4
= 8x + 4
is the equation we require.
6.3 Approximations
There are many instances in mathematics where an exact answer to a problem may be impossible
or too time-consuming to evaluate. In such a situation we may be satised with a reasonable
approximation to the solution. We can obtain approximations using tangent lines.
The idea is this: suppose we have a function y = f(x), and some value x = a for which the
function value f(a) is known. If we choose some value a +h close to a (that is, h is close to zero),
we can use the values on the tangent line to approximate those of the function values f(a + h).
That is:
f(a +h) f

(a)(a +h) + (f(a) af

(a)) from equation 6.1


= af

(a) +hf

(a) +f(a) af

(a)
= f(a) +hf

(a).
72
We thus have a formula for tangent line approximation:
f(a +h) f(a) +hf

(a). (6.2)
Figure 6.1 illustrates the idea:
f(x)
a a +h
f(a) +hf

(a)
f(a +h)
Figure 6.1: Using the tangent line for approximation
Clearly the bigger the value of h, the worse the approximation.
Heres an example; to approximate

63 by using the tangent line to f(x) =



x at x = 64.
Given
f

(x) =
1
2

x
and so that f

(64) = 1/16, the tangent line is


y =
1
16
(x 64) + 8
=
1
16
x + 4.
Substituting x = 63 into this equation, we obtain
y =
1
16
63 + 4
= 7.9375
as our approximation.
A dierent approach would be to use the formula given in equation 6.2 for tangent line approx-
imations. Here h = 1, f(a) = 8, f

(a) = 1/16, and so


f(63) 8
1
16
= 7.9375
73
as before.
As

63 = 7.9372539 we see that our approximation is remarkably accurate.


Another example: to approximate
3

28. We have f(x) = x


1/3
, and a = 27 (since we know that
(27)
1/3
= 3). We also have f

(x) =
1
3
x
2/3
and so f

(a) = 1/27.
The tangent line is thus
y =
1
27
x +
_
3 27
1
27
_
=
1
27
x + 2.
Substituting x = 28 for x in this equation gives us
y =
1
27
28 + 2
= 3.037037
as our approximation.
Alternatively, using equation 6.2, and using h = 1:
(28)
1/3
(27)
1/3
+ (1)
1
27
= 3 +
1
27
= 3.037037
as before.
Since (28)
1/3
= 3.03658 our approximation is fairly accurate.
Another example: nd an approximation to
1
9.9
, using a = 10 and h = 0.1. Since f(x) = 1/x,
we have f

(x) = 1/x
2
. Then the tangent line at a = 10 is
y = 0.01(x 10) + 0.1
=
and substituting x = 9.9 into this equation gives
1
9.9
0.01(0.1) + 0.1
= 0.001 + 0.1
= 0.101
6.4 Polynomial curve sketching
To sketch the graph of a polynomial, we should aim at determining all intercepts, turning points,
and points of inexion. In practice we may not be able to determine all of these, but we should still
be able to sketch the curve reasonably accurately.
As an example, we shall sketch the curve y = x
3
x
2
x + 1. We shall proceed in stages.
74
1. Intercepts. The y intercept is the constant term: 1. To nd x intercepts, we must solve the
equation
x
3
x
2
x + 1 = 0.
This is best done by trial and error; having found a value which works, we can perform a
polynomial division to nd the others. In this case, try x = 1:
(1)
3
(1)
2
(1) + 1 = 0
and so 1 is an x intercept. To nd the others, divide x 1 into x
3
x
2
x + 1 = 0; we will
obtain
x
3
x
2
x + 1 = (x 1)(x
2
1).
The other intercepts are thus the solutions of
x
2
1 = 0
and are 1. Note that the value x = 1 has appeared twice. This means that the curve touches
the x axis at x = 1, but does not actually cross the axis there.
2. Turning points. We have
y

= 3x
2
2x 1
= (3x + 1)(x 1)
and so the turning points are
x =
1
3
, x = 1
for which the corresponding y values are
y = 1.185, y = 0.
3. Points of inexion. We have
y

= 6x 2
and so the point of inexion is x = 1/3, with corresponding y value y = 0.59.
The graph can be sketched as shown in gure 6.2.
As another example, consider the function y = x
3
2x
2
+x + 1. We proceed as before:
75
0.5
1.0
1.5
0.5
1.0
0.5 1.0 1.5 0.5 1.0
Figure 6.2: The graph of y = x
3
x
2
x + 1
1. Intercepts. The y intercept is 1. To nd the x intercept, we evaluate y for dierent values of
x, hoping to nd a zero value. This is what we obtain:
x 2 1 0 1 2
y 17 3 1 1 3
We dont nd a zero value, but we do notice that the values of the function change from neg-
ative to positive between 1 and 0. This means that there must be an x intercept somewhere
between these two x values. So even if we dont know the exact value of the x intercept, we
know roughly where it is.
2. Turning points. We have y

= 3x
2
4x + 1 and solving y

= 0 gives us x = 1/3 and x = 1,


with corresponding y values 1.148 and 1.
3. Points of inexion. Since y

= 6x4, then the point of inexion is the solution of 6x4 = 0;


or x = 2/3, with y = 1.074.
The graph can be sketched as shown in gure 6.2.
6.5 A note on polynomial evaluation
If we wish to evaluate a polynomial for a large number of values of x, we should have an ecient
technique for doing so. Another diculty is that calculators can in general not evaluate powers of
76
0.5
1.0
1.5
0.5
1.0
0.5 1.0 1.5 0.5
Figure 6.3: The graph of y = x
3
2x
2
+x + 1
negative numbers. We shall demonstrate a technique for evaluating polynomials by an example: to
evaluate f(1.3) for f(x) = x
3
2x
2
+ 4x 7. First of all, note that we can rewrite the polynomial
as follows:
x
3
2x
2
+ 4x 7 = ((x 2)x + 4)x 7.
We can evaluate the polynomial at x = 1.3 as follows
1.3 2 = 0.7
1.3 = 0.91
+4 = 3.09
1.3 = 4.017
7 = 2.983
as the required result. Try to evaluate this same polynomial at x = 1.26:
1.26 2 = 3.26
1.26 = 4.1076
+4 = 8.1076
1.26 = 10.215576
7 = 17.215576
77
as the result. Now try to evaluate this result by the standard method of evaluating powers,
multiplying them by their coecients, and adding the results. You should nd that this new
method, as well as saving keystrokes on your calculator, is much easier to do.
To save even further on keystrokes, you can enter the x value into the calculators memory, and
then recall it each time you need it, rather than entering it each time.
6.6 Rational function curve sketching
To sketch a rational function, we need to determine all intercepts, turning points and asymptotes.
In general calculating the second derivative by hand will be too dicult, and so we will not bother
to nd points of inexion. Further information about the graph may be obtained from symmetry
considerations, and its sign (positive or negative) over regions of its domain.
For example, sketch the graph of
y =
x
x + 2
.
1. Intercepts. The y intercept is obtained by substituting 0 for x; the result is y = 0. To obtain
the x intercepts, we solve the equation y = 0; this means setting the top line of the function
to zero and solving the resulting equation. We get x = 0, and so (0, 0) is the only intercept.
2. Turning points. By using the quotient rule, we nd that
y

=
2
(x + 2)
2
and setting this to zero gives the equation 2 = 0, which can be interpreted to mean, in this
instance, that there are no turning points.
3. Asymptotes. The vertical asypmtotes are the places where the bottom line of the function is
equal to zero. Solving
x + 2 = 0
gives x = 2, so that this is the position of the vertical asymptote. The horizontal asymptotes
are the values of
lim
x
y and lim
x
y
which can easily be found to be equal to 1 in both cases.
The graph can be sketched as shown in gure 6.4.
As another example, consider the function
y =
x
2
4
x
2
4x + 3
.
78
2
4
2
4
2 4 2 4
Figure 6.4: The graph of y =
x
x + 2
1. Intercepts. The y intercept is 4/3 (substituting 0 for x); the x intercepts are the solutions
of
x
2
4 = 0
and are x = 2 and x = 2.
2. Turning points. We can show that
y

=
4x
2
+ 14x 16
(x
2
4x + 3)
2
and solving y

= 0 leads to the equation 4x


2
+ 14x 16 = 0, for which there are no (real)
solutions. Thus there are no turning points.
3. Asymptotes. The vertical asymptotes are the solutions of x
2
4x+3 = 0; which are x = 1 and
x = 3; the horizontal asymptotes are the limiting values of y as x goes to innity or negative
innity. In each case the value is 1
We have almost enough information to sketch the graph; however we dont know where the graph
sits in the region between x = 1 and x = 3. The trick here is to consider the signs of the top
and bottom lines of the function, and hence the signs of the function. We break the domain of the
function up into sections by the x intercepts and the vertical asymptotes:
79
x < 2 2 < x < 1 1 < x < 2 2 < x < 3 x > 3
top + + +
bottom + + +
y + + +
The graph can be sketched as shown in gure 6.5.
2
4
6
2
4
2 4 6 2 4
Figure 6.5: The graph of y =
x
2
4
x
2
4x + 3
6.7 A note on symmetry
Further help on drawing graphs of both polynomial and rational functions can be obtained by
investigating symmetry. We recall that a function f(x) is
1. even if f(x) = f(x); the graph of an even function is mirror-symmetric in the y axis,
2. odd if f(x) = f(x); the graph of an odd function has 180

rotational symmetry about the


origin.
80
In general a function containing only even powers of x is an even function; a function containing
only odd powers of x is odd. The following table gives some examples of functions which are even,
odd, or neither:
even odd neither
x
4
2x
2
+ 1 x
5
4x
3
+ 2x x
3
+ 2x
2
1
x
2
x
2
+ 4
1
x
3
2x
x
2
+ 1
x 1
Note that a constant term is an even power of x, since 1 = x
0
, and so such a function as x
3
+x +4
is neither even nor odd, since it contains a mixture of odd and even powers of x.
Exercises
1. Find the equation of the tangent line to each of the following functions at the point indicated:
(i) y = x
2
, (2, 4) (ii) y = sinx, (/4, 1/

2)
(iii) y =
1
x
, (2, 0.5) (iv) y =
1
1 +x
2
, (1/2, 4/5)
(v) y =
_
9 x
2
, (

2,

7) (vi) y =
x 1
x + 1
, (1, 0)
(vii) y = (x
2
1)
3
, (2, 27) (viii) y = cos
3
x, (/3, 1/8)
(ix) y = e
sin x
, (0, 1)
2. Find the equation of the tangent line to the function at the point x = a in each of the following,
and use it to approximate the function value at the given point:
(i) f(x) =

x, a = 100, f(102) (ii) f(x) =


3

x, a = 125, f(127)
(iii) f(x) =
1
x
, a = 2, f(2.1) (iv) f(x) =
x
x + 1
, a = 1, f(0.9)
(v) f(x) = x
3.2
, a = 1, f(1.15) (vi) f(x) =
_
1 x
2
, a =
4
5
, f(0.79)
(vii) f(x) =
1
1 +x
2
, a = 2, f(1.9) (viii) f(x) =
x

1 x
2
, a = 0.6, f(0.62)
3. By nding any intercepts, local maxima and minima, and points of inection, sketch the
graphs of the following polynomial functions:
(i) y = x
3
9x
2
+ 24x 19 (ii) y = x
3
3x
2
x 4
(iii) y = 3x
4
4x
3
+ 1 (iv) y = x
3
6x
2
+ 9x + 1
(v) y = x
3
+ 3x
2
+ 3x + 2 (vi) y = x
4
2x
2
+ 2
(vii) y = x
5
+x 1 (viii) y = x
4
4x
2
+ 5
(ix) y = x
4
6x
3
+ 11x
2
6x
81
4. By nding possible symmetry, asymptotes, intercepts, local maxima and minima and points
of inection, sketch the graphs of the following rational functions:
(i) y =
x
x + 1
(ii) y =
x
x
2
+ 1
(iii) y =
x
2
4
x
3
+ 1
(iv) y =
x
2
x
2
+ 1
(v) y =
1
x
3
1
(vi) y =
x 1
x
2
4
(vii) y =
x
2
1
x
2
4
(viii) y =
x
2
+ 1
x
2
4x + 3
(ix) y =
x 1
x
2
(x 2)
82
Chapter 7
Solution of equations
7.1 Introduction
Some equations can be solved exactly; that is, in closed form. For example:
Example 7.1 x
2
x 1 = 0 has the solutions x = (1

5)/2.
Example 7.2 sin x = 0.5 has the solutions x = 2n +/6 for any n.
Example 7.3 2
x
= 3 has the solution x = ln 3/ ln 2.
Other equations cannot be so solved, for example:
Example 7.4 x
5
+x
2
1 = 0, which has the solution x 0.8087306005.
Example 7.5 x
2
e
x
= 0, which has the solution x 0.7034674225.
For such equations we require a method of solution which will enable us to calculate the solution
numerically to any desired degree of accuracy. The most important class of such methods is that of
iterative methods.
7.2 Iterative Methods
The general idea is that we pick a starting value x
0
and generate a sequence x
1
, x
2
, x
3
, . . . according
to the scheme:
x
n+1
= g(x
n
)
where the function g(x) is chosen by one of the methods to be described. The values x
n
are called
successive approximations or iterates. If the sequence satises the condition
lim
n
[x
n+1
x
n
[ = 0
83
then we say that the sequence converges to a solution of the original equation. Such a process,
where x
n+1
depends only on the immediately preceding value x
n
is called a one-point iteration
scheme. If x
n+1
depends on more than one preceding value, then the scheme is called a two-point
or three-point (and so on) iteration scheme, depending on the number of previous values required
to calculate the new value x
n+1
.
7.2.1 The Starting Value
The starting value x
0
of an iterative process to solve the equationf(x) = 0 is best obtained graphi-
cally, either by plotting the graph y = f(x)and seeing where it cuts the x-axis, or better, writing the
equation in the form f
1
(x) = f
2
(x), plotting the graphs of y = f
1
(x) and y = f
2
(x) and seeing where
they intersect.For example, the equation x
5
+ x
2
1 = 0 can be written in the form x
5
= 1 x
2
.
The graphs y = x
5
and y = 1 x
2
can be easily sketched:
x
5
1 x
2
Figure 7.1: Intersection of graphs
and their intersection can be seen to be approximately at x = 0.8. Similarly, the equation x
2
e
x
= 0
can be written in the form x
2
= e
x
. The graphs y = x
2
and y = e
x
can be easily sketched:
1
x
2
e
x
Figure 7.2: Another intersection of graphs
and their intersection can be seen to be approximately at x = 0.7.
84
7.2.2 Simple Iteration
If we rewrite the equation f(x) = 0 as x = g(x), then a solution to the original equation will also
be a solution of the second. A value x that satises x = g(x) is called a xed point of g(x), and a
xed point can be found by means of the iteration scheme x
n+1
= g(x
n
). That this works is the
substance of the following result:
If a sequence x
n
is dened by x
n+1
= g(x
n
) and lim
n
x
n
= x exists, then x is a xed point
of g(x).
We shall test this by way of the equation x
5
+ x
2
1 = 0. The diculty here is that there are
several dierent ways of rewriting this equation to have the desired form:
1. x =
5

1 x
2
2. x =

1 x
5
3. x = 1/

1 +x
3
We shall try each of these, using x
0
= 0.8 as the starting value:
x
n+1
=
5
_
1 x
2
n
_
1 x
5
n
1/
_
1 +x
3
n
x
0
0.8 0.8 0.8
x
1
0.815193 0.819951 0.813250
x
2
0.803763 0.793329 0.806382
x
3
0.812441 0.828104 0.809948
x
4
0.805898 0.781392 0.808098
x
5
0.810857 0.841841 0.809059
We see that the rst and third iteration schemes converge, but the rst does so more slowly, and
the second divergesthe values x
n
get further and further away from the required solution. The
following result gives the desired information:
The scheme x
n+1
= g(x
n
) converges for a starting value x
0
if [g

(x)[ < 1 for all x in an open


interval (a, b) that includes x
0
.
We can perform a rough and ready check to see if our iteration will converge by checking the value
of [g

(x
0
)[. If this value is greater than or equal to one, we can be sure that the iteration will not
converge. If however the value is less than one, we can proceed with some condence. Consider the
three iterations above:
85
g(x) [g

(0.8)[
5

1 x
2
0.7246160972

1 x
5
1.248854782
1/

1 +x
3
0.7807200582
This indicates that the rst and third iteration schemes converge, but that the second will not, and
this is precisely what happened above.
7.3 The Newton-Raphson Method
Suppose we have an equation f(x) = 0 to be solved, and suppose that x = a is a rough approximation
to the solution. That is, a is a value that is near to the solution. Suppose we draw the tangent line
to the graph y = f(x) at x = a and see where it intersects the x-axis, as shown in gure 7.3.
b
a
f(x)
Figure 7.3: Tangent line at an approximation
The intersection b of the tangent line with the x-axis should be a better approximation to the
solution. We can nd b in terms of a by recalling from chapter 6 that the equation of the tangent
is y f(a) = f

(a)(x a). When y = 0, x = b so we obtain the equation 0 f(a) = f

(a)(b a).
Solving this equation for b gives the result:
b = a
f(a)
f

(a)
.
86
We can now use b to nd a further better approximation, and so on. All these solutions can be
written in iterative form; starting with suitable approximation x
0
to the solution:
x
n+1
= x
n

f(x
n
)
f

(x
n
)
.
This method of approximating solutions to equations is called the Newton-Raphson method, or
sometimes just Newtons method.
Example 7.6 We shall now consider an example; as before we shall take the equation x
5
+x
2
1 = 0.
Then:
x
f(x)
f

(x)
= x
x
5
+x
2
1
5x
4
+ 2x
.
Thus the required iteration scheme is:
x
n+1
= x
n

x
5
n
+x
2
n
1
5x
4
n
+ 2x
n
.
Using the starting value x
0
= 0.8 as before gives the following values:
x
1
= 0.8088596491
x
2
= 0.8087306283
x
3
= 0.8087306003
x
4
= 0.8087306005
This example illustrates one of the greatest advantages of this methodwhen it converges, it does
so extremely fast.
Example 7.7 Another example, to solve x
2
e
x
= 0 from a starting value of x = 0.7. We have:
x
f(x)
f

(x)
= x
x
2
e
x
2x e
x
.
Thus the required iteration scheme is:
x
n+1
= x
n

x
2
n
e
xn
2x
n
e
xn
.
Using the starting value x
0
= 0.7 gives the following values:
x
1
= 0.7034721896
x
2
= 0.7034674225
x
3
= 0.7034674225
x
4
= 0.7034674225
and as before we see we have a very fast convergence to the solution.
87
7.3.1 Pitfalls with Newtons method
When Newtons method works, it does so very fast. However, there are many ways in which it may
fail to work. Here are some of them:
1. One of the iterates x
n
may satisfy f

(x
n
) = 0. That is, we may land on a turning point of
f(x). But this means we cant calculate x
n+1
, as it would require a division by zero.
2. We may have a cycling property, where instead of converging to a solution, the values
x
0
, x
1
, x
2
, x
3
. . . . cycle about the solution without ever getting closer to it. Figure 7.4 shows
the geometric interpretation of this.
x
0
x
1
f(x)
Figure 7.4: Cycling values
This situation may occur if the equation f(x) = 0 has no solution.
3. A slight variation on this may be see if we try to solve x
3
x 3 = 0, with the starting value
x
0
= 3. The values cycle about as shown in gure 7.5.
7.3.2 Convergence of Newtons method
By the result given for convergence of a simple iteration scheme, it follows that the Newton-Raphson
method will converge if

d
dx
_
x
f(x)
f

(x)
_

< 1
for all x in a neighbourhood of the solution. This derivative can be calculated:
d
dx
_
x
f(x)
f

(x)
_
= 1
_
f

(x)
_
2
f(x)f

(x)
_
f

(x)
_
2
=
f(x)f

(x)
_
f

(x)
_
2
88
x
0
x
1
x
2
x
3
f(x) = x
3
x 3
Figure 7.5: Repeating values
and hence we have the following result:
The Newton-Raphson method converges for a given starting value x
0
if

f(x)f

(x)
_
f

(x)
_
2

< 1
for all x in an open interval (a, b) that includes x
0
.
The major disadvantage of the Newton-Raphson method is that at each step not only does the
value of the function f(x) have to be calculated, but also the value of the derivative. This can be
a serious disadvantage in two ways:
1. If the calculations are being done by hand and the derivative is too complex an expression for
calculation.
2. If the calculations are being done by a numerical computer program, the program will require
an extra routine for the calculation of the derivatives.
Neither of these are problems if we are using a computer algebra package like Maple, which can
perform derivatives with ease.
Exercises
1. Write each of the following equations in the form f(x) = g(x), and by plotting the functions
y = f(x) and y = g(x) and nding an approximate intersection, nd an approximate solution
to the equation:
89
(a) x
3
+x 3 = 0 (b) x
3
+x
2
1 = 0 (c) sin x 2 1/x = 0
(d) e
x
x
2
+ 1 = 0 (e) x
2
e
x
1 = 0 (f) xe
x
1 = 0
Hint: For equation (e), divide through by x
2
rst; for equation (f), divide through by x rst.
2. Apply the same approach to the equation x
3
+x
2
2x3 = 0 to nd an approximate solution.
3. The equation x
3
+ x
2
2x 3 = 0 can be written in the form x = g(x) in several dierent
ways:
(a) x =
3

3 + 2x x
2
(b) x =

3 + 2x x
3
(c) x =
_
2x + 3
x + 1
(d) x =
3 x
2
x
2
2
(e) x =
3
x
2
+x 2
For each of the functions g(x) above, determine the value of [g

(x
0
)[, where x
0
is the approx-
imate solution you found in question 2.
4. Based on your answer to the previous question, which of the iterations x
n+1
= g(x
n
) is likely
to converge?
5. Apply those iterations, starting with your value x
0
.
6. Apply Newtons method to the equation of question 2.
7. Apply Newtons method to each of the equations in question 1, using the starting values you
have found.
90
Chapter 8
Concepts of integration
8.1 Introduction
Historically, integration developed from the problem of nding areas and volumes. For example,
suppose we are to nd the area under the curve y = 1/(x + 1)
2
between x = 0 and x = 1. We may
approximate this volume by 5 small rectangles, each of width 0.2. We have the choice of deciding
whether the heights of the rectangles are to be taken as the function value on their left hand sides,
or their right hand sides.
Figure 8.1 shows both possibilities.
0.2
0.4
0.6
0.8
1.0
0 0.2 0.4 0.6 0.8 1.0
0.2
0.4
0.6
0.8
1.0
0 0.2 0.4 0.6 0.8 1.0
Figure 8.1: Approximating areas with rectangles
In the left diagram of this gure, the left end of each interval is used to provide the height of the
rectangles; in the right hand diagram the right end of each interval is used to provide the heights
91
of the rectangles. The total area of all the rectangles in the left hand gure is
(0.2)
1
(1 + 0)
2
+ (0.2)
1
(1 + 0.2)
2
+ (0.2)
1
(1 + 0.4)
2
+ (0.2)
1
(1 + 0.6)
2
+ (0.2)
1
(1 + 0.8)
2
= (0.2)
_
1
1
+
1
1.44
+
1
1.96
+
1
2.56
+
1
3.24
_
0.5808
and the total area of all the rectangles in the right hand gure is
(0.2)
1
(1 + 0.2)
2
+ (0.2)
1
(1 + 0.4)
2
+ (0.2)
1
(1 + 0.6)
2
+ (0.2)
1
(1 + 0.8)
2
+ (0.2)
1
(1 + 1)
2
= (0.2)
_
1
1.44
+
1
1.96
+
1
2.56
+
1
3.24
+
1
4
_
0.4308
Neither of these approximations is particularly good; in the rst case the rectangles go too much
over the curve, and in the second case they dont ll up nearly enough of the total area under the
curve.
We can get a better approximation by using thinner rectangles; suppose we use rectangles of
width 0.1, and take the left hand sides as height. Then the total area is:
(0.1)
1
(1 + 0)
2
+ (0.1)
1
(1 + 0.1)
2
+ (0.1)
1
(1 + 0.2)
2
+ + (0.1)
1
(1 + 0.8)
2
+ (0.1)
1
(1 + 0.9)
2
= (0.1)
_
1
1
+
1
1.21
+ +
1
3.24
+
1
3.61
_
0.53896
We can go still better by taking rectangles of even thinner widths; if we took rectangles of width
0.01 the total area is:
(0.01)
_
1
1
+
1
1.01
2
+
1
1.02
2
+ +
1
1.98
2
+
1
1.99
2
_
0.5038
In general, if x is the width of the rectangles, and 1/(x + 1)
2
the height of a rectangle, we can
express their sum as
1

x=0
1
(1 +x)
2
x.
The limit obtained as x approaches 0 is the integral of 1/(x + 1)
2
over the region [0, 1] and is
written
_
1
0
1
(x + 1)
2
dx.
92
Thus we can consider the integral as the limit of a sum. In particular, consider the summation
values for dierent rectangle widths for our original problem (and putting a few new ones in):
x

1/(x + 1)
2
x
0.2 0.5808
0.1 0.5390
0.01 0.5038
0.001 0.5004
0.0001 0.5000
0.00001 0.5000
It seems as though the limiting value of the sums is approximately 0.5 = 1/2 which is in fact the
value of the integral.
This summation method, although crude, will work for nding any area.
Here, for example, we use the same method for nding the area under the graph y = e
x
between
x = 0 and x = 1. (The exact value is 1
1
e
0.63212065.)
When x = 0.2,

e
x
x = 0.2
_
e
0
+e
0.2
+e
0.4
+e
0.6
+e
0.8
_
= 0.69743827.
When x = 0.1,

e
x
x = 0.1
_
e
0
+e
0.1
+e
0.2
+ +e
0.8
+e
0.9
_
= 0.666425326.
Then the table of sums for dierent values of x is:
x

e
x
x
0.2 0.69743827
0.1 0.66425326
0.01 0.63528642
0.001 0.63243661
0.0001 0.63215216
0.00001 0.63212372
0.000001 0.63212087
Again, we see that as x 0, the limiting value of the sum is the result we require.
The relationship with dierentiation
Suppose we dene
F(x) =
_
x
a
f(x) dx.
93
That is, F(x) is the area under the curve y = f(x) between a xed value a and x as shown in
gure 8.2.
a x
y = f(x)
Figure 8.2: The area under a curve
For example, if f(x) = x
2
, and a = 1, then
F(1) = 0
F(2) = 2
1
3
.
The relationship between this area function and f(x) is given by one form of the Fundamental
Theorem of Calculus:
_
x
a
f(x) dx = F(x)
where F(x) is an antiderivative of f(x).
Another version of this result, useful for calculating denite integrals, is:
_
b
a
f(x) dx = F(b) F(a)
where F(x) is an antiderivative of f(x).
8.2 Evaluating integrals
The antiderivative, or indenite integral of a function f(x), is a function F(x) for which
d
dx
F(x) = f(x)
94
and we write
_
f(x) dx = F(x) +C.
For example, since
d
dx
x
2
= 2x,
we have
_
2xdx = x
2
+C.
Powers
We know that
d
dx
x
n
= nx
n1
or that
d
dx
x
n+1
= (n + 1)x
n
.
Dividing both sides by n + 1 gives us the equation
d
dx
_
1
n + 1
x
n+1
_
= x
n
.
We thus have:
_
x
n
dx =
1
n + 1
x
n+1
+C.
If n = 1 this formula cant be used, as we would obtain
x
0
0
, which is undened. In this case,
_
x
1
dx = ln [x[ +C.
The modulus signs are included to ensure that the result is true for x < 0, when ln x is undened.
Putting these together:
_
x
n
dx =
_

_
1
n + 1
x
n+1
+C if n ,= 1,
ln [x[ +C if n = 1.
95
a b
f(x)
g(x)
Figure 8.3: The area between two curves
8.3 Area between curves
Given two curves y = f(x) and y = g(x), and two lines x = a and x = b, the region bounded by
them, as shown in gure 8.3.
The shaded region has area
_
b
a
f(x) g(x) dx.
If we are not given the values a and b, then the area between the curves is evaluated by rst nding
the points where the curves intersect. These points are found by solving the equation
f(x) g(x) = 0.
If these points of intersection are c and d, then the required area is
_
d
c
f(x) g(x) dx.
This is illustrated in gure 8.4.
For example, to nd the area between the curves y = x
2
and y =

x. We rst nd the
intersection points:
x
2

x = 0
x
2
=

x
x
4
= x
x
4
x = 0
x(x
3
1) = 0
x = 0, 1
96
c d
f(x)
g(x)
Figure 8.4: The area between two intersecting curves
Then the area is
_
1
0

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

1
3
x
3
_
1
0
=
_
2
3

1
3
_

_
0 0
_
=
1
3
.
As another example, nd the area between the curves y = x
3
x and y = x
2
1. We rst nd the
intersection points:
x
3
x (x
2
1) = 0 x
3
x
2
x + 1 = 0.
By trial and error, we nd that x = 1 is a solution, and by polynomial division that
x
3
x
2
x + 1 = (x 1)(x
2
1)
= (x 1)(x 1)(x + 1)
= (x 1)
2
(x + 1)
from which we see that the points of intersection are x = 1 and x = 1.
97
Then the area is
_
1
1
x
3
x
2
x + 1 dx =
_
1
4
x
4

1
3
x
3

1
2
x
2
+x
_
1
1
=
_
1
4

1
3

1
2
+ 1
_

_
1
4
+
1
3

1
2
1
_
=
4
3
.
Exercises
1. Approximate the following denite integrals by (a) strips of width x = 0.2, and (b) strips of
width x = 0.1:
(i)
_
1
0
x
3
dx (ii)
_
2
1

xdx (iii)
_
3
2
1

x
dx (iv)
_
1
0
x
1/3
dx
(v)
_
2
1
2x x
2
dx (vi)
_
1/2
1/2
x
5
dx (vii)
_
1
0
1
1 +x

1
2 +x
dx (viii)
_
2
1
1
x
dx
In each case assume the function values are taken on the left side of the strips, as shown in
the left hand diagram of gure 8.1.
2. Evaluate the integrals in question 1, and compare your answers with your approximations.
3. Evaluate the following denite integrals:
(i)
_
1
0
x
3
(1 +x)
2
dx (ii)
_
2
1
(3x
2
+ 2x + 4) dx (iii)
_
3
1
(x 1)
3
dx
(iv)
_
9
1
_

x
2

x
_
dx (v)
_
1
1
(x
2
+ 1)
2
dx (vi)
_
2
1
_
x
1
x
_
2
dx
(vii)
_
1
0
e
2x
dx (viii)
_
1
1
e
x
e
x
dx (ix)
_
2
1
1
e
3x
dx
4. (OPTIONAL.) Using Maple, much of the hard work can be taken out of integral approxi-
mations. Start up Maple, enter the following commands:
> with(Student[Calculus1]):
> RiemannSum(x^2,x=1..2,method=left,partition=10,output=value):
> evalf(%);
This should give you the approximation to the integral
_
2
1
x
2
dx
using rectangles of width 0.1. Now try using thinner rectangles;
98
> RiemannSum(x^2,x=1..2,method=left,partition=100,output=value):
> evalf(%);
which should give you the sum of rectangles of width 0.01.
Using Maple in this manner, evaluate the following integrals by nding the total sum of
rectangles of width x = 0.1, 0.01, 0.001, 0.0001, 0.00001, and guessing the limit as x 0:
(i)
_
1
0
(1 +x
2
)
1/3
dx (ii)
_
1
0
sin x
2
dx (iii)
_
1
0
_
1 x
3
dx
(iv)
_
1
0
_
1
1
4
sin
2
xdx (v)
_
1
0
_
3 x
2
1 x
2
dx (vi)
_
1
0

cos xdx
(vii)
_
2
1
1 e
x
x
dx (viii)
_
2
1
x
1/x
dx
5. Find the areas of the regions bounded by:
(a) the x axis, the graph of y = x
3
, and the lines x = 1 and x = 5,
(b) the graphs of y = x
2
+ 5 and y = x
3
, and the lines x = 1 and x = 5,
(c) the graphs of y = x
3
and y = x
4
, and the lines x = 0 and x = 1,
(d) the graphs of y =

x and y = x 2, and the line x = 2.5 and x = 3.5,


(e) the graphs of y = x
2
and y = 8 x
2
,
(f) the graphs of y = x
2
and y = x
3
,
(g) the graphs of y = x
3
and y = 4(x
2
x),
(h) the graphs of y = x
2
, y = 3x + 4 and y = 2 x.
99
100
Chapter 9
Methods of Integration
9.1 Integration by substitution
This is really just the chain rule in reverse. We shall do a few examples.
1. Evaluate the integral:
_
(1 +x
2
)
3
2xdx.
Note that the function to be integrated consists of two parts: (1 + x
2
)
3
and 2x. Notice also
that 2x is the derivative of 1 +x
2
. We shall thus make the substitution u = 1 +x
2
, for which
du
dx
= 2x. We can now rewrite the original integral as
_
u
3
du
dx
dx.
The dxs cancel out, and we are left with
_
u
3
du =
1
4
u
4
+C
=
1
4
(1 +x
2
)
4
+C
which is the result we want.
2. Evaluate the integral
_
1
x(ln x)
2
dx.
We know that
d
dx
ln x =
1
x
101
and so we can write
_
1
x(ln x)
2
dx =
_
1
x
1
(ln x)
2
dx
=
_
du
dx
1
u
2
dx
by making the substitution u = ln x. Then we have:
_
du
dx
1
u
2
dx =
_
1
u
2
du
=
_
u
2
du
= u
1
+C
=
1
ln x
+C
as the required integral.
3. Evaluate the integral
_
xcos(x
2
) dx.
We would like to make the substitution u = x
2
, but there is a slight diculty; the derivative
of x
2
is 2x, and we only have an x. We can x this with a neat trick; rewrite the integral as
_
1
2
2xcos(x
2
) dx.
Now we can make the substitution:
_
1
2
du
dx
cos udx =
_
1
2
cos udu
=
1
2
sin u +C
(since
d
du
sin u = cos u, then
_
cos udu = sin u)
=
1
2
sin(x
2
) +C.
Another way of looking at this type of integral is to make the substitution u = x
2
so that
du
dx
= 2x
102
and so that
x =
1
2
du
dx
.
The integral can then be immediately written as
_
1
2
du
dx
cos udx
and we can proceed as before.
9.2 Integration by parts
This is the product rule for dierentiation in reverse. The product rule can be written as
(uv)

= u

v +uv

.
Integrating both sides, and using the fact that integration is the opposite of dierentiation:
uv =
_
u

v dx +
_
uv

dx
and rearranging, gives us the rule for integration by parts:
_
uv

dx = uv
_
u

v dx.
We shall look at some examples.
1. Evaluate
_
xcos xdx.
The immediate diculty is to choose which of the functions x and cos x to be u, and which
to be v

. We want to make the choice in such a way so that the integral on the right hand
side is easier to evaluate than the original integral. Since we dont know which to choose, try
u = cos x, v

= x
and so
u

= sin x, v =
1
2
x
2
.
Then, using the integration by parts formula:
_
cos x
. .
u
x
..
v

dx = cos x
. .
u
1
2
x
2
..
v

_
sinx
. .
u

1
2
x
2
..
v
dx
103
But the integral on the right is even more complicated then our original, as the power of x
has increased. So we seem to have made a tactical error. So try
u = x, v

= cos x
and so
u

= 1, v = sin x.
Using the formula:
_
x
..
u
cos x
. .
v

dx = x
..
u
sin x
..
v

_
1
..
u

sin x
..
v
dx
and so
_
xcos xdx = xsin x
_
sinxdx
= xsin x (cos x) +C
= xsin x + cos x +C
which is the result we require.
2. Evaluate
_
xln xdx.
Again, we start by making a guess; try
u = x, v

= ln x.
But theres a diculty here: what is v, the antiderivative of ln x? Since we dont know this,
we are forced to use the other alternative:
u = ln x, v

= x
for which
u

=
1
x
, v =
1
2
x
2
.
Then, applying the formula:
_
xln xdx =
1
2
x
2
ln x
_
1
x
1
2
x
2
dx
=
1
2
x
2
ln x
_
1
2
xdx
=
1
2
x
2
ln x
1
4
x
2
+C
as the nal result.
104
Sometimes we may have to integrate by parts more than once; for example, to evaluate
_
x
2
sin xdx.
Choosing
u = x
2
, v

= sin x
so that
u

= 2x, v = cos x
we have
_
x
2
sin xdx = x
2
(cos x)
_
2x(cos x) dx
= x
2
cos x +
_
2xcos xdx.
Now for this new integral on the right, we use integration by parts again, with
u = 2x, v

= cos x
so that
u

= 2, v = sin x.
Then
x
2
cos x +
_
2xcos xdx = x
2
cos x + 2xsin x
_
2 sin xdx
= x
2
cos x + 2xsin x + 2 cos x +C
which is what we want.
This type of repeated integration by parts can be more easily achieved by tabular integration:
sin x
cos x
sin x
cos x
x
2
2x
2
0


d
dx
_
dx
+

+
105
The expressions in the left hand column are the derivatives of x
2
; the expressions in the right hand
column are the antiderivatives of sin x. The terms are multiplied along the diagonal arrows, and
then multiplied by 1 according to the sign on the arrow. These products are then added to give
the nal result:
+(x
2
)(cos x) (2x)(sin x) + (2)(cos x) +C = x
2
cos x + 2xsin x + 2 cos x +C
which is the result we obtained above.
This method is really only suitable for integrals of the form
_
p(x)q(x) dx
where p(x) is a polynomial and q(x) is a function which can be repeatedly antidierentiated as
many times as we needthis means that q(x) is either an exponential or trigonometric function.
Choosing u and v

We have seen that the success of an integration by parts depends on choosing the correct functions
to be u and v

. A convenient rule for making this decision is the LIATE rule: given an integration
by parts problem
_
p(x)q(x) dx
choose as u whichever of p(x) or q(x) occurs highest in this table:
Logarthmic
Inverse trigonometric
Algebraic
Trigonometric
Exponential
Thus for
_
xln xdx we have an algebraic function x and a logarithmic function ln x. Since loga-
rithmic functions occur higher up the table than algebraic functions, we choose u = ln x. And for
_
xsin xdx, we have an algebraic function x and a trigonometric function sinx. Since algebraic
functions occur higher up the table than trigonometric functions, we choose u = x.
Exercises
1. Evaluate the following indenite integrals by using a suitable substitution:
106
(i)
_
sin
10
xcos xdx (ii)
_
sec
2
x

1 tan
2
x
dx (iii)
_
x
_
1 +x
2
dx
(iv)
_
sin x
cos x
dx (v)
_
x
2
exp(x
3
) dx (vi)
_
sinx

1 + cos x
dx
(vii)
_
xcos(x
2
) dx (viii)
_
tan xdx (ix)
_
sin xe
cos x
dx
(x)
_
x
2
(7x
3
+ 1)
1/3
dx (xi)
_
e
x
1 +e
2x
dx (xii)
_
sin
3
xdx
(xiii)
_
x
x
2
+ 1
dx (xiv)
_
1
(1 +x
2
) tan
1
x
dx (xv)
_
exp(tan
1
x)
1 +x
2
dx
(xvi)
_
ln x
x
dx
2. Evaluate the following indenite integrals by using the method of integration by parts:
(i)
_
xsin xdx (ii)
_
x
3
cos xdx (iii)
_
xln xdx (iv)
_
(ln x)
2
dx
(v)
_
x
3
ln xdx (vi)
_
x
2
e
4x
dx (vii)
_
xcos 3xdx (viii)
_
xtan
1
xdx
(ix)
_
x
2
(ln x)
2
dx (x)
_
sin
1
xdx (xi)
_
tan
1
xdx (xii)
_
xsec
2
xdx
107
108
Chapter 10
Numerical Integration
10.1 Introduction
We know that to evaluate a denite integral we may use the fundamental theorem of calculus: if
F(x) is an antiderivative of f(x), then
_
b
a
f(x) dx = F(b) F(a).
However, there may be some problems with using this result. It may be that the function f(x) does
not have an antiderivative expressible in terms of simple functions, or the antiderivative might be
so complicated as to make the application of the theorem too dicult.
In many situations we are not so much interested in a closed form result for the integral, but a
numeric result. Then we can bypass the whole business of anti-dierentiation and substitution into
complicated functions, and attempt to solve the integral numerically. This is the subject of this
chapter.
10.2 Rectangles
Recall from SCM1711 that we can approximate an integral in terms of rectangles.
For example, suppose we wish to approximate the integral
_
3
1
1
x
2
5x + 7
dx.
(The exact answer is

3/3 1.813799.) If we use ve rectangles, they will have width (31)/5 =


0.4, and the approximation will be
(0.4)f(0) + (0.4)f(0.4) + (0.4)f(0.8) + (0.4)f(1.2) + (0.4)f(1.6)
where
f(x) =
1
x
2
5x + 7
.
109
Performing the arithmetic produces a value of roughly 1.662502, which is too low. We have taken
the height of our rectangle at the left hand side of each one. If we use the right hand side, the
approximation is
(0.4)f(0.4) + (0.4)f(0.8) + (0.4)f(1.2) + (0.4)f(1.6) + (0.4)f(2) 1.929169
which is too high. Both are shown in gure 10.1. You can see that it would take a lot of rectangles
to obtain a good approximation to the integral.
1 2 3
Using the left hand side
1 2 3
Using the right hand side
Figure 10.1: Approximating an integral by rectangles
10.3 The Trapezoidal rule
Rather than use rectangles, a better approximation can be obtained by taking a trapezoid as the
shape under the integral. This is shown in gure 10.2.
The area of a trapezoid is equal to the product of its width and the average of the heights of its
sides. So the trapezoid in gure 10.2 has area
2
f(1) +f(3)
2
=
4
3
1.333333.
In general, we can approximate any integral with a trapezoid, and the general result is the trapezoidal
rule for numerical integration:
_
b
a
f(x) dx (b a)
f(a) +f(b)
2
=
b a
2
_
f(a) +f(b)
_
.
As we see from the example, applying a single trapezoid does not give a particularly good result.
110
1 2 3
Figure 10.2: The trapezoidal rule
We will do better by breaking the integral up into smaller regions, and applying the trapezoidal
rule separately to each one. Figure 10.3 shows how this is done. The use of the trapezoidal rule in
this way is called the compound trapezoidal rule.
1 2 3
Figure 10.3: The compound trapezoidal rule
You can see that the trapezoids ll up the area under the graph far better than the rectangles
did. Thus we should expect that the compound trapezoidal rule would give a more accurate result
than just using rectangles. For our example, the compound trapezoidal rule can be evaluated as
0.4
f(1) +f(1.4)
2
+0.4
f(1.4) +f(1.8)
2
+0.4
f(1.8) +f(2.2)
2
+0.4
f(2.2) +f(2.6)
2
+0.4
f(2.6) +f(3)
2
and the result of this is roughly
1.795835
111
which is a lot closer to the exact result than either of rectangle approximations.
If we examine the above expression for the compound trapezoidal rule, it can be written as:
0.4
2
_
[f(1) +f(1.4)] +[f(1.4) +f(1.8)] +[f(1.8) +f(2.2)] +[f(2.2) +f(2.6)] +[f(2.6) +f(3)]
_
and this can be simplied to
0.4
2
_
f(1) + 2f(1.4) + 2f(1.8) + 2f(2.2) + 2f(2.6) +f(3)
_
.
To evaluate an integral
_
b
a
f(x) dx
by breaking up the integral into ve segments and applying the trapezoidal rule to each, we rst
notice that the width h of each trapezoid will be
h =
b a
5
.
The expression for the compound trapezoidal rule can then be written as
h
2
_
f(a) + 2f(a +h) + 2f(a + 2h) + 2f(a + 3h) + 2f(a + 4h) +f(b)
_
where by denition of h we have a + 5h = b.
In general we can break our integral up into n segments, and then the compound trapezoidal
rule is:
_
b
a
f(x) dx
h
2
_
f(a) + 2f(a +h) + 2f(a + 2h) + +f(a + (n 1)h) +f(b)
_
where
h =
b a
n
.
So to use this rule with 10 segments, we have
h =
3 1
10
= 0.2
and the result is
0.2
2
_
f(1) + 2f(1.2) + 2f(1.4) + 2f(1.6) + + 2f(2.6) + 2f(2.8) +f(3)
_
1.809343.
This result is getting closer to the exact result.
112
10.4 Simpsons rule
Simpsons rule works by nding a parabola which goes through the end points and mid points of the
function. For our example, we need to nd a parabola which passes through the points (1, f(1)),
(2, f(2)) and (3, f(3)). The integral of that parabola between 1 and 3 is the approximation we shall
use.
1 2 3
Figure 10.4: Simpsons rule
Figure 10.4 illustrates the idea. The dark parabola is tted to the three points on the curve,
and the shaded area under the parabola is the approximation to the integral. In this example, the
parabola has equation

1
3
x
2
+
5
3
x 1
and so the approximation is
_
3
1

1
3
x
2
+
5
3
x 1 dx =
16
9
1.777778
Even with a single parabola, this is a reasonable approximation to the exact result.
To develop Simpsons rule, we shall start with the simple case of evaluating an integral between
1 and 1:
_
1
1
f(x) dx.
Here we need to nd a parabola which passes through the points (1, f(1)), (0, f(0)) and (1, f(1)).
113
Suppose the parabola is Ax
2
+Bx +C. Then integrating it between 1 and 1 produces:
_
1
1
Ax
2
+Bx +C dx =
_
A
3
x
3
+
B
2
x
2
+Cx
_
1
1
=
_
A
3
(1)
3
+
B
2
(1)
2
+C(1)
_

_
A
3
(1)
3
+
B
2
(1)
2
+C(1)
_
=
A
3
_
1 (1)
_
+
B
2
_
1 (1)
_
+C
_
1 (1)
_
=
2A
3
+ 2C
=
1
3
(2A + 6C).
To nd the parabola, we require that Ax
2
+ Bx + C is equal to the function at the points 1, 0
and 1. Thus:
A(1)
2
+B(1) +C = f(1)
A(0)
2
+B(0)
2
+C = f(0)
A(1)
2
+B(1) +C = f(1)
or more simply:
A B +C = f(1)
C = f(0)
A +B +C = f(1).
Adding the rst and last equations produces
2A + 2C = f(1) +f(1).
Recall that from the integral above the value we require is
1
3
(2A + 6C).
Then
2A + 6C = 2A + 2C + 4C
= f(1) +f(1) + 4f(0).
This gives us a simple version of Simpsons rule:
_
1
1
f(x) dx
1
3
_
f(1) + 4f(0) +f(1)
_
.
This can be easily adjusted to other intervals. If we integrate between h and h, then the rule is
_
h
h
f(x) dx
h
3
_
f(h) + 4f(0) +f(h)
_
.
114
Suppose we now integrate between a and b, where the distance between them is 2h, just as in the
last integral. This produces Simpsons rule:
_
b
a
f(x) dx
h
3
_
f(a) + 4f(a +h) +f(b)
_
where
h =
b a
2
.
For our example integral, Simpsons rule gives us
2
3
_
f(1) + 4f(2) +f(3)
_
=
2
3
(0.333333 + 4(1) + 1)
= 1.777778
which is the value we obtained earlier.
As with the trapezoidal rule, Simpsons rule can be applied to multiple intervals; however they
must be an even number. Then the composite Simpsons rule is:
_
b
a
f(x) dx
h
3
_
f(a) + 4f(a +h) + 2f(a + 2h) +
+f(a + (n 2)h) + 4f(a + (n 1)h +f(b)
_
where
h =
b a
n
and n is an even number.
The trick with Simpsons rule is to remember that the coecients of the function values are
1, 4, 2, 4, 2, 4, 2, . . . , 2, 4, 2, 4, 1
through the expression.
Simpsons rule can also be written in the form
_
b
a
f(x) dx
h
3
_
f(a) + 4f(a +h) + 2f(a + 2h) +
+f(a + (2n 2)h) + 4f(a + (2n 1)h +f(b)
_
where
h =
b a
2n
.
115
This second form places no restrictions on n.
Lets experiment with our integral, using 4 intervals. First we have
h =
3 1
4
=
1
2
.
Then Simpsons rule produces
1/2
3
_
f(1) + 4f(1.5) + 2f(2) + 4f(2.5) +f(3)
_
1.825397.
Already this is getting quite close to the correct result.
The following table shows the results of applying our dierent approximations to varying num-
bers of intervals. As you see, Simpsons rule gives the best results (it is accurate to 6 decimal places
for 100 intervals).
Rectangles
n Left Right Trapezoidal Simpson
2 1.333333 2 1.666667 1.777778
10 1.742676 1.876010 1.809343 1.813846
20 1.779354 1.846021 1.812688 1.813802
100 1.807088 1.820422 1.813755 1.813799
10.5 Back to rectanglesthe midpoint rule
All the approximations we have discussed so far are examples of closed formulas, in that they use
the function values at both ends of the interval of integration. But there is a class of integration
approximations which use only function values inside in integral, and these are called open formulas.
The simplest is the midpoint rule, which approximates the integral by a rectangle whose height is
taken by the function value in the centre of the interval:
_
b
a
f(x) dx (b a)f
_
b +a
2
_
.
This is illustrated in gure 10.5.
As with all the other approximations, the midpoint rule is best used in a composite version. If
we apply it using ve intervals to our test integral, the end points of the intervals are
1, 1.4, 1.8, 2.2, 2.6, 3
and so the midpoints are
1.2, 1.6, 2, 2.4, 2.8.
116
1 2 3
Figure 10.5: The midpoint rule
Then the composite midpoint rule for our integral will be
0.4(f(1.2) +f(1.6) +f(2) +f(2.4) +f(2.8)) 1.822851
and this is far more accurate than either of the rectangle rulesit is even closer than the trapezoidal
rule.
The composite midpoint rule is illustrated in gure 10.6.
1 2 3
Figure 10.6: The composite midpoint rule
117
In general, the composite midpoint rule has the form:
_
b
a
f(x) dx
b a
n
_
f(a +h) +f(a + 3h) + +f(a + (2n 1)h)
_
where
h =
b a
2n
.
If we produce a table of values for dierent numbers of intervals:
n Midpoint
2 1.904762
10 1.816032
20 1.814356
100 1.813822
we see that the results compare very favourably with the trapezoidal rule.
Exercises
1. Write out the trapezoidal rule for a general integral of the form
_
1
0
f(x) dx
with four intervals.
2. Write out the trapezoidal rule for a general integral of the form
_
b
a
f(x) dx
with four intervals.
3. Repeat questions 1 and 2 but for Simpsons rule.
4. For each of the following integrals:
(i)
_
4
1

xdx (ii)
_
2
1
1
x
dx (iii)
_
1
1/3
1
x
2
dx
(iv)
_
1
0
x
1/3
dx (v)
_
1/2
1/2
e
x
dx (vi)
_
1
1/2
x
5
dx
(a) Evaluate the integral exactly using the fundamental theorem of calculus.
(b) Evaluate the integral using the trapezoidal rule with 2, 4 and 10 intervals.
118
(c) Evaluate the integral using Simpsons rule with 2, 4 and 10 intervals.
(d) Evaluate the integral using the midpoint rule with 2, 4 and 10 intervals.
5. The integral
_
/2
0
1
_
1
1
4
sin
2
(x)
dx
arises in studying the theory of pendulums.
Using Simpsons rule with 2, 4, 6, . . . intervals, evaluate this integral until you have accuracy
to three decimal places.
6. Repeat the above problem but for the integral
_
2
0
_
4 + 5 sin
2
(x) dx
7. Repeat the above problem but for the integral
_
1
0
e
x
2
dx
119
120
Chapter 11
Dierential equations
11.1 Introduction
A dierential equation is an equation relating a variable to its derivatives. Examples are:
dy
dx
= x
2
+y
2
dy
dx
2y = 3e
x
d
2
y
dx
2
2y
dy
dx
+y
2
x
2
= 0.
Dierential equations are some of the most useful mathematical techniques known. Many physical
and real-world systems can be modelled using dierential equations, and the study of dierent types
of and methods of solution is one of the biggest areas in the entire range of mathematics.
We shall only look at rst order dierential equations, where the only derivative involved is the
rst derivative (such as in the rst two equations in the above examples), and we shall only look at
dierential equations of the form
dy
dx
= f(x, y).
Such equations are readily solved by integration.
11.2 Simple dierential equations
Example 11.2.1. We can take as an example the following d.e:
dy
dx
= x
2
, y(0) = 1.
We notice that not only do we have the equation itself, but also an initial condition, giving a value
of y for a particular value of x. Such a problem, involving both a dierential equation and an initial
condition, is called an initial value problem.
121
This problem can be simply solved by multiplying out by dx:
1.dy = x
2
dx, y(0) = 1
and integrating both sides:
_
1 dy =
_
x
2
dx
which produces
y =
1
3
x
3
+C.
Now we can use the inital condition to nd C: substituting 0 fo x and 1 for y:
1 =
1
3
0
3
+C
or C = 1. The solution of the original problem is then
y =
1
3
x
3
+ 1.
Clearly this technique can be used to solve all equations of the sort
dy
dx
= f(x).
Example 11.2.2.
dy
dx
=
1
y
, y(0) = 1.
To solve this problem, we rst rewrite the equation so that all the terms involving y are on one side
of the equals sign, and all the terms involving x are on the other. We can do this by multiplying
both sides by dx, and multiplying both sides by y. This gives us:
y dy = dx.
Now we put integration signs on both sides:
_
y dy =
_
dx
and perform those integrations:
1
2
y
2
= x +C.
Now we can use the initial condition to nd C. We are given the value 1 for y when x = 0, so
substituting 0 for x and 1 for y:
1
2
1
2
= 0 +C
so that C = 1/2. Thus:
1
2
y
2
= x +
1
2
y
2
= 2x + 1
y =

2x + 1
as the nal answer we require.
122
Example 11.2.3. Solve the initial value problem
dy
dx
= 3(y 4), y(0) = 12.
As before, rewrite:
dy
y 4
= 3 dx
and place integration signs on both sides:
_
dy
y 4
=
_
3 dx
Now evaluate the integrals:
ln(y 4) = 3x +C.
To nd C, use the initial value; substitute 0 for x and 12 for y:
ln 8 = 3(0) +C
and so C = ln 8. Finally:
ln(y 4) = 3x + ln 8
y 4 = e
3x+ln 8
y 4 = 8e
3x
y = 8e
3x
+ 4
as the answer we require.
11.3 Separable variables
The dierential equations seen in the last section could all be solved by moving the xs and ys
around until we could perform two simple integrations. The method of separable variables is the
formal name given to this type of solution. It can be for dierential equations
dy
dx
= f(x, y)
where f(x, y) can be split up into a product or fraction of a function of x, and another function of
y.
123
Example 11.3.1. Solve the initial value problem
dy
dx
= x
2
y
3
, y(1) = 2,
Start by separating the variables: in this case divide both sides by y
3
, and multiply out by dx:
1
y
3
dy = x
2
dx.
Now we can perform these two integrations:

1
2y
2
=
1
3
x
3
+C.
Entering x = 1 and y = 2 from the initial condition:

1
8
=
1
3
+C
gives
C =
11
24
.
The solution to the problem is then

1
2y
2
=
1
3
x
3

11
24
.
If we like, we can continue and rewrite this equation in the form y = f(x):
y =
_
12
11 8x
3
.
Example 11.3.2. Solve the initial value problem
dy
dx
=
y
2
x
2
, y(2) = 1.
As before, we separate everything out:
1
y
2
dy =
1
x
2
dx
and integrate:
_
1
y
2
dy =
_
1
x
2
dx
This produces

1
y
=
1
x
+C.
124
Plugging in the initial conditions x = 2 and y = 1:

1
1
=
1
2
+C.
or C = 1/2. So:

1
y
=
1
x

1
2
or
y =
2x
x + 2
.
11.4 Population growth
This is an important application of this type of dierential equation. In many cases, the rate of
growth of a population is proportional to a power of its size. This can be written as a dierential
equation:
dp
dt
= kp

.
Generally (but not always), = 1 and so
dp
dt
= kp.
This means that the bigger the population, the faster it grows. We shall look at some examples.
Example 11.4.1. The population of a city is observed to satisfy the dierential equation
dp
dt
=
1
50
p.
In 1990 a census revealed that its population was 155, 420. What will be its population in the year
2000?
If we rewrite, we obtain the integrals
_
dp
p
=
_
1
50
dt
which can be evaluated to give
ln p =
1
50
t +C.
Suppose that t measures years from 1990, so our initial condition is that when t = 0, p = 155, 420.
Substituting these values:
ln(155, 420) =
1
50
(0) +C
125
and so C = ln(155, 420). At the year 2000, t = 10, and so
ln p =
1
50
(10) + ln(155, 420).
Thus
p = (155, 420)e
1/5
189, 830.
Example 11.4.2. A colony of bacteria is observed to double in size every 6 hours. At 7:00am
there were 4500 bacteria; when will the population be 10,000?
We have the initial value problem
dp
dt
= kp, p(0) = 4500
where t measures time, elapsed in hours, from 7:00am. Then, as we have done for our other
problems, rewrite and integrate:
_
dp
p
=
_
k dt
or
ln p = kt +C.
Using the initial condition:
ln 4500 = k(0) +C
and so C = ln 4500. To nd k, we use the fact that after 6 hours, the population will have doubled
from 4500 to 9000 and so
p(6) = 9000.
Substituting these values into the equation:
ln 9000 = k(6) + ln 4500
gives
k =
ln 9000 ln 4500
6
=
1
6
ln
_
9000
4500
_
=
1
6
ln 2.
126
The equation relating p and t is now
ln p =
1
6
(ln 2)t + ln4500.
When p = 10, 000, we have:
ln 10, 000 =
1
6
(ln 2)t + ln 4500
and so
t =
ln 10, 000 ln4500
1
6
(ln 2)
=
6(ln 10, 000 ln 4500)
ln 2
6.912.
Thus the population of bacteria is 10,000 at 6.912 hours past 7am; that is, at about 1:55pm.
11.5 Newtons law of cooling
Newtons law of cooling states that the rate of change of temperature of an object is proportional
to the dierence between the temperature of the body and the surrounding temperature. This is
easily expressed as a dierential equation, using t for time, M for temperature (because it gets too
confusing if we use T), and s for the surrounding temperature:
dM
dt
= k(M s)
where k is a constant. The form of this equation, and thus the method of solution, is very similar
to the population equation.
Example 11.5.1. Molten iron is produced from a blast furnace operating at 1500

. After an hour
in a room at 20

it has cooled to 500

. What will be its temperature after another hour? When


will its temperature be 100

?
The equation is:
dM
dt
= k(M 20), M(0) = 1500, M(1) = 500.
Using the same techniques as for solving population equations, we rewrite the equation as
_
1
M 20
dM =
_
k dt
from which we obtain
ln(M 20) = kt +C.
127
Substituting t = 0 and M = 1500 produces C = ln 1480, and substituting t = 1 and M = 500
produces k = ln 480 ln 1480. Using these values produces
ln(M 20) = ln
_
480
1480
_
t + ln 1480
or
M = 1480
_
480
1480
_
t
+ 20.
Finally;
M(2) = 175.676
and solving the equation for M = 100 produces
t =
ln(2/37)
ln(12/37)
2.59
or about 2 hours, 36 minutes.
Exercises
1. Solve the following rst order separable dierential equations:
(a)
dy
dx
= y, y(0) = 1 (b)
dy
dx
= y
2
, y(0) = 1
(c)
dy
dx
= y 10, y(0) = 25 (d)
dy
dx
= 3(y 15), y(0) = 30
(e)
dy
dx
= y
3/2
, y(0) = 4 (f)
dy
dx
= 1 +y
2
, y(0) = 1
(g)
dy
dx
= 2

y, y(1) = 0 (h)
dy
dx
= 3y
2/3
, y(1) = 1
(i)
dy
dx
= e
y
, y(2) = 0
2. An investor has $1,000 with which to open an account and plans to add $1,000 each year. All
funds in the account will earn 10% per year continuously compounded. Assuming that the
added deposits are also made continuously then the equation relating the amount x to the
time t is
dx
dt
= 1000 + 0.1x
with x(0) = 1000. How many years will it take to reach $100,000?
3. Suppose that the temperature in a freezer is 16

C, and the room temperature is 20

C. If the
power goes o at 11 p.m. one evening, and by 6 a.m. the following morning the temperature
of the freezer has risen to 10

C, at what time will its temperature have risen to 0

C?
128
4. A cake is removed from an oven at 100

C and left to cool in a room at 25

C. After 20 minutes
its temperature is 60

C. When will it be 35

C?
5. The sh population in a lake is attacked by a disease at time t = 0, with the result that the
population P ts the equation
dP
dt
= 3

P,
with t being measured in weeks. Initially there are 900 sh in the lake. How long will it take
for all of the sh to die?
6. Bacteria are observed to increase their numbers by a factor of six every 10 hours. If the rate of
growth of their population is proportional to its size, how long does it take for the population
of bacteria to double?
7. A city has a population of 25, 000 in 1960, and a population of 30, 000 in 1970. Assuming that
its rate of growth remains proportional to its size, what will be the population in the year
2000?
8. Radiocarbon dating compares the amount of carbon 14 in a sample with the amount of carbon
14 in a present-day sample, and uses the fact that carbon 14 decays in such a way that it loses
half its mass every 5700 years.
(a) If N is the fraction of carbon 14 left after t years, then the dierential equation is
dN
dt
= kN, N(0) = 1.
Solve this and express N as a function of t.
(b) If a piece of pine wood is 20, 000 years old, what is the amount of carbon 14 compared
with the amount in a present-day piece of pine wood?
(c) A piece of charcoal found at Stonehenge was found to contain 63% as much carbon 14
as a present-day piece of charcoal. How old is the charcoal from Stonehenge?
(d) A human bone from an archaeological site is found to have only 7% as much carbon 14
as a modern human bone. How old is the bone from the archaeological site?
(e) Radium 226 decays much faster that carbon 14; it loses half its mass every 1600 years.
How many years does it take for four fths of a sample of this substance to disappear?
129
130
Answers to Exercises
Chapter 1: Complex Numbers
1. (i) 9 +i, (ii) 17 7i, (iii) 8 I, (iv) 7 + 26i, (v) 2 + 3i, (vi) (3/29) + (7/29)i
2. (i) 3 4i, , 3 + 4i, (ii) 7 + 24i, 7 24i, (iii) 16 30i, 16 + 30i
In general the square of a conjugate is equal to the conjugate of the square.
3. (i) 2 + 3i, (ii) 4 i, (iii) 7 4i
4. (i)

2 cis(3/4), (ii) 2 cis(/3), (iii) cis(/4), (iv) 2 cis(/6), (v) 3

2 cis(3/4),
(vi) 4 cis()
5. (i) 8 8i, (ii) 64, (iii) i, (iv) 512i, (v) 972 + 972i, (vi) 16
6. (i)
1 +

3
2

1 +

3
2
i,
1 +

3
2
+
1 +

3
2
i, 1 +i, (ii) 1 i
7. (i) 2 i, (ii) 1 2i, (iii) 3 i, (iv) 1 4i, (v) 5 i, (vi) 5 4i
Chapter 2: Combinatorics
1. (a) 6 (b) 24 (c) 120 (d) 0 (e) P(n, m) if m n and 0 if m > n
2. (a) 120 (b) Determine the number of injective functions from a set of four elements to a set of ve
elements.
3. (a) 336 (b) Determine the number of injective functions from a set of three elements to a set of eight
elements.
4. (n 1)!
5. (a) 60 (b) 125
6. (a) P(m, n) (b) m
n
7. 420
8. Use the denition P(m, k) = m!/(m k)! to simplify the right hand side.
9. (a) 8!/(3!)
2
= 1120, 11!/((4!)
2
2!) = 34, 650, (b) 12!/(3! 2!) = 39, 916, 500
(d) 30!/((4!)
2
(3!)
2
(2!)
7
) = 99, 936, 726, 817, 261, 894, 560, 000, 000
10. (a) 3, 838, 380 (b) 1 (c) 204 (d) 8, 415
131
11. (a) 10 (b) 21 (c) 56 (d) 4, 845 (e)
_
m
n
_
12. 14, 108, 640
13. (a) 2, 598, 960 (b) 1, 287 (c) 5, 148 (d) 3, 744
14. 12
15. (a) 84 (b) 2, 300 (c) 816 (d) 97 (e) 4, 950 (f) 551, 300
16. (a) 9 (b) 13 (c) 16 (d) 23
17. (a) 18/7 (b) 100/77 (c) 10, 300/4, 753
18. (a) 9.3326514 10
157
(b) 5.71338396 10
262
(c) 7.8865787 10
1134
(d) 4.0238726 10
2567
19. (a) 9.3248764 10
157
(b) 5.7102107 10
262
(c) 7.8832933 10
1134
(d) 4.0235373 10
2567
20. B
1
= 1, B
2
= 2, B
4
= 15
21. B
5
= 52, B
6
= 203, B
7
= 877, B
8
= 4140, B
9
= 21147, B
10
= 115975
22.
_
1
1

= 1,
_
2
1

= 1,
_
2
2

= 1,
_
3
1

= 2,
_
3
2

= 3,
_
3
3

= 1,
23. 1
0 1
0 1 1
0 2 3 1
0 6 1 6 1
0 24 59 35 10 1
0 120 274 225 85 15 1
0 720 1764 1624 735 175 21 1
0 5040 3068 13132 6769 1960 322 28 1
24.
0
0
= 1,
1
0
= 0,
1
1
= 1,
2
0
= 0,
2
1
= 1,
2
2
= 1,
3
0
= 0,
3
1
= 1,
3
2
= 3,
3
3
= 1,
25. 1
0 1
0 1 1
0 1 3 1
0 1 7 6 1
0 1 15 25 10 1
0 1 31 90 65 15 1
0 1 63 301 350 140 21 1
0 1 127 966 1701 1050 266 18 1
Chapter 3: The Binomial Theorem
1. (a) a
5
+ 5a
4
b + 10a
3
b
2
+ 10a
2
b
3
+ 5ab
4
+b
5
(b) x
4
4x
3
y + 6x
2
y
2
4xy
3
+y
4
(c) x
5
+ 5x
3
+ 10x + 10/x + 5/x
3
+ 1/x
5
(d) x
6
6x
4
+ 15x
2
20 + 15/x
2
6/x
4
+ 1/x
6
2. (a) 10 (b) 4, 320 (c) 2835/8 (d) 14 (e) 4 (f) 3
3. (a) x = y = 1 (b) x = 1, y = 2 (c) x = 1, y = 1 (d) x = 1, y = k (e) x = 2, y = 1
132
4. (a) 90 (b) 12, 600 (c) 1, 680 (d) 2, 522, 520
5. (a) x
3
+ 3x
2
y + 3xy
2
+y
3
+ 3x
2
z + 6xyz + 3xz
2
+ 3yz
2
+z
3
(b) 1 + 4x + 6x
2
+ 4x
3
+x
4
+ 4y + 12xy + 12x
2
y + 4x
3
y + 6y
2
+ 12xy
2
+ 6x
2
y
2
+ 4y
3
+ 4xy
3
+y
4
(c) x
3
+ 3x
2
+ 6x + 7 + 6/x + 3/x
2
+ 1/x
3
(d) 1 3x + 3x
2
x
3
3y + 6xy 3x
2
y + 3y
2
3xy
2
y
3
(e) x
3
+y
3
+z
3
+w
3
+ 3x
2
y + 3xy
2
+ 3x
2
z + 3xz
2
+ 3x
2
w + 3xw
2
+ 3y
2
z + 3yz
2
+ 3y
2
w + 3yw
2
+
3z
2
w + 3zw
2
+ 6xyz + 6xyw + 6xzw + 6yzw
(f) x
4
+16y
4
+81z
4
8x
3
y +24x
2
y
2
32xy
3
+12x
3
z +54x
2
z
2
+108xz
3
+96y
3
z +216y
2
z
2
216yz
3

72x
2
yz + 144xy
2
z 216xyz
2
6. (a) 12 (b) 6 (c) 6 (d) 2, 520 (e) 240 (f) 2, 880
7. (a) x = 1, y = 1, z = 1 (b) Put each of the variables equal to 1.
8. Use the denition of the multinomial coecient to expand the right hand side.
9. Use the result of question 3 (a).
10. For each of these identities, expand the binomial coecient according to its denition in terms of
factorials.
14. (a) Find the coecient of x
k
in the expansion of (1 + x)
m
(1 + x)
n
. (b) Write
_
m
i
_
=
_
m
mi
_
on the
left and use the result of part (a).
15. Two methods: either write
_
n
k
_
2
=
_
n
k
__
n
nk
_
and use the result of question 15 (a); or nd the coecient
of x
n
in the expansion of (1 +x)
n
(1 +x)
n
.
Chapter 4: Limits
1. (i) 4, (ii) 0, (iii) 4, (iv) 2, (v) 0, (vi) 25, (vii) 11, (viii) 1, (ix) 43
2. (i) 5/4, (ii) 0, (iii) 23/5
3. (i) 1, (ii) 3/2, (iii) 3/4, (iv) 1/2, (v) 1/4, (vi) 3
4. (i) 1, (ii) 1, (iii) 1, (iv) 2, (v) 2/3, (vi) 2
5. (i) 1, (ii) 0, (iii) , (iv) 1, (v) 3, (vi) 0
6. (i) 0, (ii) 4, (iii) 0, (iv) 1/2, (v) 4, (vi) 0
7. (i) 2, (ii) 1, (iii) 1/4, (iv) 1, (v) 1/2, (vi) 1/2
8. (i) 3x
2
, (ii) 2 cos(2x), (iii) 1/(x + 1)
2
, (iv) 1/(x + 1)
2
, (v) 1/(2

x), (vi) sec


2
x
133
Chapter 5: Dierentiation
1. (i) 2x 2, (ii) 9x
2

4
7
x, (iii) 10, 000x
99
1, (iv) 1 +
x
2
+
x
2
3
2
, (v) 3x
2
+ 6x + 2, (vi) 4x
3
2. (i) 5x
4
1, (ii)
2x
3
+
3x
2
2

5x
4
6
, (iii)
2
(x 1)
2
, (iv)
x
2
1
(x
2
+x + 1)
2
, (v)
x
2
+ 1
(x
2
1)
2
, (vi)
1
2
1 + 5x
2

x(1 +x
3
)
2
3. (i) 10x(x
2
+ 1)
4
, (ii)
x

1 +x
2
, (iii)
3(1 2x)
(x
2
x)
4
4. (i)
2
3
(x + 1)
1/3
, (ii)
2x
2
+ 1

x
2
+ 1
, (iii)
x
2
+ 9
3x
2
(x
2
+ 3)
2/3
, (iv)
3(6x + 5)

3x
2
+ 5x + 1
2
,
(v)
2
5
(2x + 7)
6/5
, (vi) (x
1/2
+ 2)
4/3
x
5/6
5. (i) 2 cos 2x, (ii) 2xsinx
2
, (iii)
1

sec
2
_
x

+ 1
_
, (iv) 2 tanxsec
2
x, (v) 0, (vi) 0
6. (i) 3e
3x
, (ii) cos xe
sin x
, (iii) e
x
cos(e
x
), (iv)
1
e
x
+ 1
, (v)
4e
2x
(e
2x
+ 1)
2
, (vi)
e
1/x
x
2
,
(vii)
3(ln x)
2
x
, (viii)
1
x
, (ix) sec x, (x)
1
xln x
, (xi)
1

x
2
+ 1
, (xii) 2 cos(ln x)
7. (i) 0, (ii) 3/7, (iii) 1/2, (iv)

3/2, (v) 1/6, (vi) 1/6, (vii) 1/4, (viii) 0, (ix) 3


Chapter 6: Graphical Applications of Dierentiation
1. (i) y = 4x 4, (ii) y =
1

2
x +
4
4

2
, (iii) y =
x
4
+ 1, (iv) y =
16
25
x +
28
25
, (v) y =

14
7
x +
9

7
7
,
(vi) y =
x
2

1
2
, (vii) y = 108x 189, (viii) y =
3

3
8
x +
1 +

3
8
, (ix) y = x + 1
2. (i) 10.1, (ii) 5.0266 , (iii) 0.475, (iv) 0.475, (v) 1.48, (vi) 0.6133 , (vii) 0.216, (viii) 0.7890625
3. (i)
-10
-8
-6
-4
-2
0
2
4
6
8
10
-1 0 1 2 3 4 5 6 7
(ii)
-20
-15
-10
-5
0
5
10
-2 -1 0 1 2 3 4
(iii)
0
2
4
6
8
10
-1 -0.5 0 0.5 1 1.5 2
(iv)
-10
-8
-6
-4
-2
0
2
4
6
8
10
-1 0 1 2 3 4 5
(v)
-4
-3
-2
-1
0
1
2
3
4
-3 -2.5 -2 -1.5 -1 -0.5 0 0.5 1
(vi)
0
1
2
3
4
5
6
-2 -1.5 -1 -0.5 0 0.5 1 1.5 2
134
(vii)
-10
-8
-6
-4
-2
0
2
4
6
8
10
-2 -1.5 -1 -0.5 0 0.5 1 1.5 2
(viii)
0
2
4
6
8
10
-2 -1 0 1 2
135
(ix)
-2
0
2
4
6
8
10
-1 0 1 2 3 4
4. (i)
-10
-8
-6
-4
-2
0
2
4
6
8
10
-2 -1.5 -1 -0.5 0 0.5 1
(ii)
-1
-0.8
-0.6
-0.4
-0.2
0
0.2
0.4
0.6
0.8
1
-10 -8 -6 -4 -2 0 2 4 6 8 10
(iii)
-10
-8
-6
-4
-2
0
2
4
6
8
10
-2 -1.5 -1 -0.5 0 0.5 1 1.5 2
(iv)
-1
-0.5
0
0.5
1
1.5
2
-10 -8 -6 -4 -2 0 2 4 6 8 10
(v)
-4
-3
-2
-1
0
1
2
3
4
-3 -2 -1 0 1 2 3
(vi)
-4
-3
-2
-1
0
1
2
3
4
-4 -3 -2 -1 0 1 2 3 4
(vii)
-6
-4
-2
0
2
4
6
-4 -2 0 2 4
(viii)
-20
-15
-10
-5
0
5
10
0 2 4 6 8
136
(ix)
-6
-4
-2
0
2
4
6
8
-1 -0.5 0 0.5 1 1.5 2 2.5 3
Chapter 7: Solution of Equations
1. (a) 1.2 (b) 0.7 (c) 0.4 (d) 1.1 (e) 0.7 (f) 0.6
2. 1.5
3. (a) 0.138 (b) 1.466 (c) 0.052 (d) 48 (e) 3.918
4. Iterations (a) and (c) will converge.
5. Using iteration (a): 1.553616253, 1.545775391, 1.546977004 1.546794089, 1.546821962, 1.546817715,
1.546818363, 1.546818264, 1.546818279, 1.546818277
Using iteration (c): 1.549193339, 1.546700021, 1.54682417, 1.546817983 1.546818292, 1.546818276,
1.546818277, 1.546818277, 1.546818277, 1.546818277
6. 1.548387097, 1.546819953, 1.546818277
7. (a) 1.213533835, 1.213411673, 1.213411663
(b) 0.7581881533, 0.7548887281, 0.7548776664, 0.7548776663
(c) 0.4154205435, 0.4159607372, 0.4159613533
(d) 1.148510595, 1.147757815, 1.147757632
(e) 0.7034842877, 0.7034674229, 0.7034674225
(f) 0.5680072726, 0.5671439014, 0.5671432904
Chapter 8: Concepts of Integration
1. (i) (a) 0.16, (b) 0.2025, (ii) (a) 1.770425, (b) 1.1981187, (iii) (a) 0.86844082, (b) 0.88913038,
(iv) (a) 0.30144545, (b) 0.33737617, (v) (a) 0.2565732, (b) 0.24436511, (vi) (a) 0.07788008, (b)
0.03894004,
(vii) (a) 0.83373152, (b) 0.80998149, (viii) (a) 0.74563492, (b) 0.7187714
137
2. (i) 1/4 = 0.25, (ii)
4

2
3

2
3
1.2189514, (iii) 3 ln3 2 ln2 1 0.9095425, (iv) (4 2

2)/
0.37292322,
(v) e
1
e
2
0.23254415, (vi) 0, (vii) /4 0.78539816, (viii) ln 2 0.69314718
3. (i) 49/60, (ii) 24, (iii) 4, (iv) 28/3, (v) 56/15, (vi) 5/6, (vii) (e
2
1)/2, (viii) 0, (ix) (e
3
e
6
)/3
4. These approximations are all given to 4 decimal places only.
(i) 1.0948, (ii) 0.3103, (iii) 0.8413, (iv) 0.9649, (v) 2.4774, (vi) 0.9140, (vii) 0.5227, (viii) 1.2771
5. (a) 156, (b) 284/3, (c) 1/20, (d)
7
6

14
5
6

10 1 0.73, (e) 64/3, (f) 1/12, (g) 4/3, (h) 17/6


Chapter 9: Methods of Integration
1. (i)
1
11
sin
11
x +C, (ii) sin
1
(tan x) +C, (iii)
1
3
(1 +x
2
)
3/2
+C, (iv) ln(cos x) +C,
(v)
1
3
exp(x
3
)+C, (vi) 2

1 + cos x+C, (vii)


1
2
sin(x
2
)+C, (viii) ln(cos x)+C, (ix) exp(cos x)+C,
(x)
1
28
(7x
3
+ 1)
4/3
+C, (xi) tan
1
(e
x
) +C, (xii) cos x +
1
3
cos
3
x +C, (xiii)
1
2
ln(x
2
+ 1) +C,
(xiv) ln(tan
1
x) +C, (xv) exp(tan
1
x) +C, (xvi)
1
2
(ln x)
2
+C
2. (i) sinx xcos x +C, (ii) (3x
2
6) cos x +(x
3
6x) sin x +C, (iii)
1
2
x
2
ln x
1
4
x
2
+C, (iv) x(ln x)
2

2xln x + 2x +C,
(v)
1
4
x
4
ln x
1
16
x
4
+C, (vi)
1
4
x
2
e
4x

1
8
xe
4x
+
1
32
e
4x
+C, (vii)
1
3
xsin 3x +
1
9
cos 3x +C, (viii)
1
2
(x
2
+
1) tan
1
x
1
2
x +C,
(ix)
1
3
x
3
(ln x)
2

2
9
x
3
ln x +
2
27
x
3
+C, (x) xsin
1
x +

1 x
2
+C, (xi) xtan
1
x
1
2
ln(x
2
+ 1) +C,
(xii) ln(cos x) +xtan x +C
Chapter 10: Numerical Integration
1.
1
8
_
f(0) + 2f
_
1
4
_
+ 2f
_
1
2
_
+ 2f
_
3
4
_
+f(1)
_
2.
b a
8
_
f(a) + 2f
_
a +
b a
4
_
+ 2f
_
a +
b a
2
_
+ 2f
_
a + 3
b a
4
_
+f(1)
_
or
b a
8
_
f(a) + 2f
_
3a + b
4
_
+ 2f
_
a +b
2
_
+ 2f
_
a + 3b
4
_
+f(b)
_
,
3.
1
6
_
f(0) + 4f
_
1
4
_
+ 2f
_
1
2
_
+ 4f
_
3
4
_
+f(1)
_
,
b a
12
_
f(a) + 4f
_
a +
b a
4
_
+ 2f
_
a +
b a
2
_
+ 4f
_
a + 3
b a
4
_
+f(1)
_
or
b a
12
_
f(a) + 4f
_
3a + b
4
_
+ 2f
_
a +b
2
_
+ 4f
_
a + 3b
4
_
+f(b)
_
138
4.
(i) (ii) (iii) (iv) (v) (vi)
Exact
14
3
ln(2) 2
3
4
e
1/2
e
1/2 21
128
4.666667 0.693147 0.75 1.042191 0.1640625
Trapezoidal 2 4.621708 0.708333 2.416667 0.646850 1.063813 0.364014
4 4.655093 0.697024 2.115 0.708055 1.047613 0.217758
10 4.664796 0.693771 2.019104 0.737405 1.043059 0.172820
Simpson 2 4.662278 0.694444 2.111111 0.695800 1.042542 0.243164
4 4.666221 0.693254 2.014444 0.728457 1.042213 0.169001
10 4.666652 0.693150 2.000562 0.743649 1.042191 0.164189
Midpoint 2 4.688477 0.685714 1.813333 0.769260 1.031413 0.071503
4 4.672401 0.691220 1.944439 0.758145 1.039482 0.137678
10 4.667601 0.692835 1.990506 0.752517 1.041716 0.159696
5. The Simpsons rule results for 2, 4 and 6 intervals are 1.683601, 1.185742, and 1.685750. To three
decimal places: 1.684.
6. Simpsons rule: 5.278642, 5.234012, 5.23264, 5.232523; to three decimal places: 5.233.
7. Simpsons rule: 0.747180, 0.746855, 0.746830; to three decimal places: 0.747.
Chapter 11. Dierential equations
1. (a) y = e
x
, (b) y = 1/(x + 1), (c) y = 15e
x
+ 10, (d) y = 15e
3x
+ 15, (e) y = 4/(1 x)
2
, (f)
y = tan(x +

4
),
(g) y = (x 1)
2
, (h) y = (x 2)
3
, (i) y = ln(x 1)
2. 10 ln10 23.03 years
3. 7 ln(20/36)/ ln(30/36) 22.5673; about 9:34pm
4. 20 ln(10/75)/ ln(35/75) 52.875; about 32.875 minutes later
5. 20 weeks
6. 10(ln 2)/(ln6) 3.86 hours
7. 25, 000(
6
5
)
4
51, 840
8. (a) N = (
1
2
)
t/5700
(b) (
1
2
)
20000/5700
8.78%
(c) (5700 ln0.63)/(ln2) 3, 799 years
(d) (5700 ln0.07)/(ln2) 21, 868 years
(e) (1600 ln0.2)/(ln2) 3, 715 years
139

You might also like