0% found this document useful (0 votes)
13 views205 pages

Lecture Notes

The document contains lecture notes for MTHS120 Calculus and Linear Algebra 1 at the University of New England for Trimester 1, 2026. It covers a range of mathematical topics including sets, functions, limits, derivatives, integrals, and linear algebra concepts. The notes are structured with sections and examples to aid in understanding the material.

Uploaded by

hejjwheh
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views205 pages

Lecture Notes

The document contains lecture notes for MTHS120 Calculus and Linear Algebra 1 at the University of New England for Trimester 1, 2026. It covers a range of mathematical topics including sets, functions, limits, derivatives, integrals, and linear algebra concepts. The notes are structured with sections and examples to aid in understanding the material.

Uploaded by

hejjwheh
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

University of New England

School of Science and Technology

MTHS120

Calculus and Linear Algebra 1

Lecture Notes

Trimester 1, 2026

c University of New England


CRICOS Provider No: 00003G
Contents

1 Sets and functions 1

2 Numbers 8

3 Sequences 18

4 Limits of sequences 23

5 Limit and supremum 30

6 Infinity as a limit 36

7 Functions 39

8 Transcendental functions 46

9 Continuity of functions 50

10 Limits of functions 56

11 Continuity of elementary functions 66

12 Rates of change, derivatives and differentials of functions 73

13 Derivatives of elementary functions 79

14 Monotone Functions and Concavity 87

15 Application: Optimisation 95

16 Integration 103
ii CONTENTS

17 Properties of the definite integral 109

18 The Fundamental Theorem of Calculus 114

19 Indefinite Integrals 117

20 Applications of Integral calculus 124

21 The natural logarithm 131

22 Approaching linear algebra 136

23 Gaussian elimination 140

24 Square systems and determinants 150

25 Applications in Geometry 152

26 Linear combinations, linear independence and bases 156

27 Complex numbers 163

28 The Inner or dot Product 176

29 The Cross Product 187

30 Appendix: Archimedean axiom 195


CONTENTS iii
1

1 Sets and functions

Sometimes mathematics is called the “language of science”, which is certainly one


of its functions. The language of mathematics is “set theory”. For our purposes a
naive approach to set theory is sufficient. It will allow us to use the terminology
and notations of sets, which are ubiquitous in modern mathematics.

The basic statement is: Sets are collections of elements. This statement intro-
duces two new notions, namely sets and elements, and a relation between them,
namely ‘the element belongs to the set’ or ‘the set contains the element’. We can
define a set by listing its elements. Think of a set as a container and the elements
as its content. Any object can be an element of a set. In fact, we can even form sets
that are collections of other sets. However, a set can never be an element of itself.

Usually, we denote sets by upper case letters. We list the elements of a set in
curly brackets. The order of the listed elements does not matter.

Example. Define a set A by A = {1, 2, 3}. This is the set of the first three positive
integers. In this case 1, 2, 3 are the elements of A. We write

1 ∈ A, 2 ∈ A, 3 ∈ A, 4 6∈ A.

A set can have infinitely many elements. In this case it is impossible to list its
elements and one needs other ways for stating what the elements of the set are. The
number of elements of a set is called its cardinality. We denote the cardinality of a
set A by |A|. At this stage we will only discuss the cardinality of finite sets, leaving
the fascinating subject of infinite cardinalities aside.

The following infinite sets are particularly important and this is why we denote
them by special letters:

• The set of natural numbers (non-negative integers) N = {0, 1, 2, . . . }. The dots


indicate that we continue the pattern suggested by the three listed elements.

• The set of integers Z = {. . . , −2, −1, 0, 1, 2, . . . }. Again, the dots at both sides
indicate that we continue the pattern.

• The set of positive integers Z+ = {1, 2, 3, . . . }.

• The set of rational numbers (=fractions) Q = { pq | p ∈ Z, q ∈ Z+ }. The


notation we just used means that the set consists of elements of a certain
form, namely placeholders p and q for numerator and denominator, separated
by a horizontal bar (the familiar way of writing a fraction) and then, following
2

the vertical bar | we specify from which set the placeholders p and q can be
taken.1

We will say that two sets A and B are equal if each element of A is also an
element of B and vice versa. In this case we write A = B.

Example. {1, 2, 3} = {3, 2, 1}, since the order in which we list the elements does
not matter. {1, 2, 3} =
6 {1, 2, 4}, because 4 does not belong to the first set (and 3
does not belong to the second set).

Equal sets have the same cardinality but sets with equal cardinality do not
have to be equal. E.g. A = {1, 2, 3} and B = {3, 4, 5} have the same cardinality
|A| = |B| = 3 but they are not equal.

We say that A is a subset of B and write A ⊆ B if any element of A is also an


element of B. It follows that A = B if and only if A ⊆ B and B ⊆ A.

If A is not a subset of B we write A 6⊆ B.

We also write A ⊂ B if A ⊆ B and A 6= B. In this case we say that A is a proper


subset of B.

Example. {1, 2} ⊂ {1, 2, 3}.

There is a special set that has no elements (think of an empty container). This
set is called the empty set and denoted by ∅. The empty set is a subset of any set
A: ∅ ⊆ A. The cardinality of ∅ is |∅| = 0.

Sets that contain exactly one element are sometimes called singletons.

We can construct new sets from given sets using several set operations.

Union of sets. The union of two sets A and B is the set C that contains
precisely the elements of A or B. We write C = A ∪ B. Formally,

c ∈ A ∪ B if and only if c ∈ A OR c ∈ B.

Notice that the logic “OR” is not exclusive. The OR statement is true if the
first part is true or the second part is true or both parts are true.

Example. {1, 2, 3} ∪ {2, 3, 4} = {1, 2, 3, 4}.


1
NB. The definition of rational numbers given here is not entirely correct. It would suggest
that 12 and 24 are different elements of the set, however they represent the same rational number.
3

♠ Exercises 1. Show that, for any two sets A and B, A ⊆ A ∪ B.

Proof. For any element a ∈ A it is the case that a ∈ A or a ∈ B. Therefore,


a ∈ A ∪ B. 2

Intersection of sets. The intersection of two sets A and B is the set C that
contains precisely the elements common to A and B. We write C = A∩B. Formally,

c ∈ A ∩ B if and only if c ∈ A AND c ∈ B.

Example. {1, 2, 3} ∩ {2, 3, 4} = {2, 3}.

♠ Exercises 2. Show that, for any two sets A and B, A ∩ B ⊆ A.

Difference of sets. The difference of two sets A and B is the set C that
contains precisely the elements that belong to A but do not belong to B. We write
C = A \ B. Formally,

c ∈ A \ B if and only if c ∈ A AND c 6∈ B.

Example. {1, 2, 3} \ {2, 3, 4} = {1}.

♠ Exercises 3. Show that, for any two sets A and B, A \ B ⊆ A.

Cartesian product of sets. The Cartesian2 product of two sets A and B is


the set C that consists precisely of the pairs (a, b), where a ∈ A and b ∈ B. We
write C = A × B. Formally,

A × B = {(a, b) | a ∈ A, b ∈ B}.

Example. {1, 2, 3} × {a, b} = {(1, a), (2, a), (3, a), (1, b), (2, b), (3, b)}.

If A and B are finite sets of cardinality m and n respectively, then the cardinality
of A × B is mn.

♠ Exercises 4. Is it true of false that A × B = B × A for two sets A and B? Justify


your answer.
2
In honour of the French mathematician and philosopher René Descartes, the inventor of coor-
dinates.
4

Functions. Functions (or mappings) assign to each element of a set X, called


the domain, an element of a set Y , called the codomain of the function. Think of the
elements of the domain as inputs of some procedure, which produces some output
belonging to the codomain Y . Functions are usually denoted by lower case letters
f, g, h etc. or Greek letters ϕ, ψ etc. We write
f (x) = y
if the function assigns the output y to the input x.

Example. Consider the following function with domain X = Z and codomain


Y = Z, i.e. domain and codomain are both the set of integers. Consider the rule of
assigning to x ∈ Z its square f (x) = x2 . We write
f: Z→Z
when we want to emphasise that f is a function from the domain Z into the codomain
Z. We write
f : x 7→ f (x) = x2
when we want to emphasise that the function assigns to each input its square.

The input of a function is called its argument or independent variable. The


output of a function is called the value (for a given argument) or the dependent
variable. In the example above the value of the function was produced by a simple
formula. Most of the functions we encounter in this unit will be based on algebraic
formulae.

Note: A function assigns to each element x of the domain one and only one
value y = f (x). However the function may produce the same value for different
arguments, as in the example above. Indeed, for the different inputs x = 1 and
x = −1 the function f takes the value y = 1. Not all elements of the codomain have
to be actual values of the function. Again, in the example above y = −1 cannot be
the value for any argument x, because the square of any integer is non-negative.
We call the set of all x ∈ X such that f (x) = y the preimage of y. The preimage of y
is denoted by f −1 (y). We may also refer to the elements of f −1 (y) as the preimages
of y.

For a function f : X → Y we define the range as the subset of the codomain that
consists of the elements that are actually values of f for some arguments. In our ex-
ample from above the range R consists of all perfect squares R = {0, 1, 4, 9, 16, . . . }.

Functions can be given in various ways. One way to define a function f : X → Y


is by its graph, which is the subset of the Cartesian product S ⊆ X ×Y that consists
of all pairs (x, y) such that x ∈ X and y = f (x). Formally,
S = {(x, y) | x ∈ X, y = f (x)}.
5

If the domain X of a function f : X → Y is finite we can list the pairs (x, f (x))
in a table.

Example. Consider the function f : {1, 2, 3, 4} → Z such that f (x) = 2x − 1. We


can table this function by

x 1 2 3 4
f (x) 1 3 5 7

This is more efficient than listing the graph S = {(1, 1), (2, 3), (3, 5), (4, 7)}. The
range of this function is the set R = {1, 3, 5, 7}.

Functions are one of the main objects in this unit. They are extremely useful in
modelling quantities that depend in a deterministic way on other quantities. Some
quantities can be easily measured, e.g. time, length or force, whereas other quantities
may not be easily accessible. There can be known relations between such quantities,
e.g. from physical or economic laws. Such relations often allow us to represent the
unaccessible quantity as a function of an easily accessible quantity. The following
is a simple example. Imagine you have a box with a large amount of screws of the
same mass 12g and the empty box weighs 216g. Then the total mass x of the box
containing the screws is
x = 216 + 12y,

where y is the number of screws. Instead of tediously counting the screws we can
quickly weigh the box with the screws and compute the number of screws as the
function
x − 216 x
y= = − 18.
12 12
Here it makes sense to chose the domain to be the integers that are greater than
or equal to 216 and divisible by 12. For our model we can restrict the domain also
from above, say by 12, 216 if we know that there is no way that more than 1000
screws fit into the box. For the codomain we can choose the non-negative integers
(say, smaller than or equal to 1000).

We conclude this lecture by some other important notions.

A function f : X → Y is called surjective (or sometimes a “function onto”) if


the range R = Y . Some textbook authors consider only surjective functions. This is
not very practicable because it may be difficult to find the exact range of a function
and for many purposes we do not need to know it. We can always turn a function
into a surjective function by shrinking the codomain Y to its subset R.

♠ Exercises 5. Give an example of a surjective function and an example of a non-


surjective function.
6

A function f : X → Y is called injective (or sometimes a “1-to-1 function”) if it


assigns to different arguments a 6= b ∈ X different values, i.e. f (a) 6= f (b).

♠ Exercises 6. Give an example of an injective function and an example of a non-


injective function.

Functions that are both injective and surjective are called bijective.

Compositions of functions

If f : X → Y is a function with codomain Y and g : Y → Z is a function with


domain Y we can form the composition g ◦ f : X → Z (“f followed by g”) which
assigns to x ∈ X the value g(f (x)) ∈ Z. This assignment can be expressed by

x 7→ y = f (x) 7→ z = g(y) = g(f (x)).

Example. The function h(x) = 2x+1 : R → R can be expressed as the composition


of y = f (x) = 2x : R → R and z = g(y) = y + 1 : R → R.

Inverse functions. Sometimes problems can be solved by swapping the roles


of the independent and the dependent variable. In fact, in the example above we
started with a relation where the number y of screws was the input variable and the
weight x was the output variable

x = 216 + 12y

and we solved this equation for y, so that y became the new output variable
x
y= − 18.
12

The two functions are inverse to each other. In general, for a function y = f (x)
we find the inverse function (if it exists) by solving the equation for x, i.e.

x = g(y),

where g(y) is some expression (formula) of y. It is common to denote the independent


variable again by x and the dependent variable by y so that the resulting inverse
function is
y = g(x).
When we inverted the function the roles of domain and codomain have also swapped.
For the inverse function we need to find for each element y ∈ Y a unique x ∈ X
such that y = f (x). The inverse function assigns now to y that unique x = g(y).
It is easy to see that the necessary and sufficient condition for the existence of such
unique x is bijectivity of f . Indeed, for any y from the codomain there exists at
7

least one x ∈ X such that f (x) = y if and only if any y ∈ Y is in the range, i.e.
f is surjective. Such x is unique if and only if different x correspond to different
y = f (x), i.e. f is injective. The inverse function of a function f is often denoted
by f −1 . The inverse function of f −1 is again f . We have

f −1 ◦ f (x) = x for all x ∈ X and f ◦ f −1 (y) = y for all y ∈ Y.

Please don’t confuse this notation with f1 , which may occur when f takes nu-
merical values and we consider the composition of the function f followed by taking
the reciprocal of the value of f .

Example. Let f : Q → Q be given by y = f (x) = 23 x + 14 . This function is bijective


because, for any y ∈ Q there is a unique x ∈ Q such that f (x) = y, namely
2 1
x= y− .
3 6
The expression on the right hand side defines the inverse function
2 1
g(y) = y − .
3 6
Renaming the new input variable by x and the new output variable by y yields
2 1
y = f −1 (x) = x − .
3 6
8

2 Numbers

We assume that you are familiar with natural numbers, integers, rational numbers,
the rules of arithmetic operations and the ordering of numbers.

The natural numbers are defined by Peano’s axioms:

1. 0 is a natural number

2. Each natural number has exactly one successor.

3. Each natural number, except 0 is the successor of exactly one natural number.
0 is not the successor of any natural number

4. (Principle of mathematical induction) A statement is true for all natural num-


bers if we can show that it is true for n = 0 (the first natural number) and
that it is true for any n, assuming that it is true for its predecessor n − 1.

These axioms reflect the structure of natural numbers as a connected graph with
one root, no branching and no loops:

Each natural number has exactly one successor, i.e. no branching:

Each natural number, except 0 is the successor of exactly one number, i.e. no
loops:
9

0 is not the successor of any number, i.e., 0 is the only root of the graph, and each
number is connected to 0 by a sequence of consecutive successors, i.e., the graph is
connected.

We will use the method of induction to prove properties of sequences.

Regarding rational numbers we assume that you are familiar with the arithmetic
operations addition and multiplication, which result in rational numbers. We also
assume familiarity with the ordering relation of rational numbers. Below we list the
basic arithmetic and ordering properties of rational numbers:

• For each a, b, c ∈ Q we have a + b = b + a, (a + b) + c = a + (b + c),


0 + a = a + 0 = a, ab = ba, (ab)c = a(bc), 1a = a1 = a, (a + b)c = ac + bc.

• For each a ∈ Q there exists y ∈ Q such that a + y = 0.

• For each a(6= 0) ∈ Q there exists y ∈ Q such that ay = 1 (the reciprocal of a).

• For every a, b ∈ Q one and only one of

a > b, a = b, a < b

is true.

• If a > b and b > c, then a > c.

• If a > b, then a + c > b + c.

• If a > b and c > 0, then ac > bc.

We will use these properties as axioms, i.e., we will take them for granted and
use them in future proofs.

Example. Show that the product of two positive rational numbers is a positive
rational number.
10

Proof. Let a and c be two positive rational numbers, i.e., a > 0 and c > 0. Now
we just use the last property in the list above with b = 0. We multiply both sides of
the valid inequality a > 0 with the positive number c to get ac > 0, as required. 2

a+b
Example. Show that the average c = 2
of two rational numbers is a rational
number.

Proof. The average is a combination of addition a + b followed by multiplication


by the rational number 21 , so the result is a rational number. 2

We will often refer to numbers as points on the number line. The number line
is an oriented straight line with a choice of a point 0 (called the origin) and a point
1 (usually at the right of 0 if the line is oriented from the left to the right, which is
indicated by an arrow pointing to the right). The distance between the points 0 and
1 defines a scale on the number line (=1 length unit). Then any positive number
x > 0 can be marked as a point of distance x (length units) from 0 to the right, any
negative number x < 0 can be marked as a point of distance −x (length units) from
0 to the left and the number 0 corresponds to the point 0 on the number line. If a
number b is greater than a number a then the position of b on the number line is to
the right of a.

The rational numbers are “dense” on the number line in the following sense.

Proposition 1. For any two distinct rational numbers a and b there are infinitely
many rational numbers between them.

Proof. First we show that between a and b there is a least one other rational
number, namely its average
a+b
c= .
2
It is clear (see the example above) that the average of two rational numbers is again
a rational number.

Without loss of generality let us assume that a < b. The case a > b can be
handled in a similar way. We show that a < c < b. We know that b − a > 0 and
11

need to show that c − a > 0. Indeed,


a+b b−a
c−a= −a= > 0.
2 2
Similarly,
a+b b−a
b−c=b− = > 0.
2 2
Denote c = c1 , Now we can find a number c2 between a and c1 (and hence between a
and b) which is distinct from c1 , namely the average of a and c1 . By continuing this
procedure we construct an infinite sequence of numbers c1 , c2 , c3 , . . . , where cn+1 is
the average of a and cn . All the these numbers are different and between a and b
because
b > c1 > c2 > c3 > · · · > a. 2

♠ Exercises 7. Show that the distance between the numbers a and cn from the Proof
above equals b−a
2n
.

Despite the density property of rational numbers it turns out that there are
“gaps” in the number line, in the sense that there are points that do not represent
rational numbers. It was known to the ancient Greeks at the time of Pythagoras
that the length c of the diagonal of a square of side length 1 cannot be expressed
as a rational number3 . A rigorous proof of this fact will be given in Number theory
Pmth338 in year 3. It relies on the plausible fact that any integer has a unique
factorisation into primes (up to the order of the prime factors). Let’s take this fact
for granted and assume that the length c is rational, i.e.
p
c=
q
for some integers p, q. According to Pythagoras’s theorem we have c2 = 12 + 12 = 2,
hence
p2
c2 = 2 = 2
q
or
2q 2 = p2 .
Being a perfect square, the number p2 on the right hand side of the equation above
contains an even number of prime factors 2. On the other hand, the number 2q 2
contains an odd number of prime factors 2, namely the even number of factors 2 from
q 2 and one additional factor 2. This contradiction shows that our initial assumption
that c was rational cannot be true. This is an example of an indirect proof, also
known as a “proof by contradiction”.

In order to fill the gaps on the number line we extend the rational numbers to
the larger set of real numbers. We will not give a rigorous construction of the real
3

For the time being I avoid calling c = 2.
12

numbers but rather develop some technical tools needed for understanding calculus.
Geometrically, a real number is a point on the number line. Using decimals we can
get as close to any point as we wish. E.g. the number c with c2 = 2 from above is
between 1 and 2, so 1 is an approximation with an error ≤ 1. Getting more precise,
we could show that c is between 1.4 and 1.5, so 1.4 = 75 is an approximation with
1
an error ≤ 10 . Continuing this procedure we can get arbitrarily close to c by a
sequence of rational numbers. So, roughly speaking, we can think of a real number
as a decimal with “infinitely many places”. This rough notion will become more
precise (as the limit of a series) after we sufficiently advance in our understanding
of calculus.

The set of real numbers is denoted by R. We can define addition and multipli-
cation of real numbers so that the result will be again a real number. Real numbers
satisfy the same arithmetical and ordering properties as the rational numbers listed
above:

• For each a, b, c ∈ R we have a + b = b + a, (a + b) + c = a + (b + c),


0 + a = a + 0 = a, ab = ba, (ab)c = a(bc), 1a = a1 = a, (a + b)c = ac + bc.

• For each a ∈ R there exists y ∈ R such that a + y = 0.

• For each a(6= 0) ∈ R there exists y ∈ R such that ay = 1 (the reciprocal of a).

• For every a, b ∈ R one and only one of


a > b, a = b, a < b
is true.

• If a > b and b > c, then a > c.

• If a > b, then a + c > b + c.

• If a > b and c > 0, then ac > bc.

Real numbers that are not rational are called irrational numbers.

♠ Exercises 8. Show that the sum a + b of a rational number a and an irrational


number b is irrational.

♠ Exercises 9. Given an irrational number b. For which rational numbers a is the


product ab rational?

We introduce the following absolute value function:


(
x if x ≥ 0
abs(x) = |x| =
−x if x < 0.
13

This function is defined for all real numbers x and takes non-negative real values.
Geometrically, it expresses the distance from x to the origin 0 on the number line.
This function can also be used to express the distance between two real numbers
a, b ∈ R:
dist(a, b) = |a − b|.

For a given positive number ε we will say that x is ε-close to a if

|x − a| < ε.

In this case we will also say that x is within an ε-neighbourhood of a.

5
Example. x = 4
is 12 -close to a = 1; x = 3
2
is not 12 -close to a = 1

♠ Exercises 10. Show that x is ε-close to a if and only if a is ε-close to x, for any
x, a ∈ R.

♠ Exercises 11. Show that the inequality |x − a| < ε is equivalent to the two
simultaneous inequalities

x < a + ε, a − ε < x.

The notion of ε-neighbourhood is fundamental in calculus and we will refer to it


regularly.

We prove some useful properties regarding absolute values.


Proposition 2. The absolute value has the following properties:

1. |a| ≥ 0 for all a ∈ R and |a| = 0 if and only if a = 0.

2. |ab| = |a| · |b|, for all a, b ∈ R.

3. |a|2 = a2 , for all a ∈ R.

4. |a + b| ≤ |a| + |b|, for all a, b ∈, R. This is the so-called triangle inequality.

5. |a − b| ≥ ||a| − |b||, for all a, b ∈ R. This is called the reverse triangle inequal-
ity.

Proof. The first three properties are consequences of the definition and are left as
exercises.

The following observation will be useful in the proof. For any number a ∈ R
we have a ≤ |a| and −a ≤ |a|. We consider two cases: If a ≥ 0 then a = |a| and
−a ≤ 0 ≤ a. If a < 0 then a < 0 ≤ |a| and −a = |a|.
14

To prove (4) we consider two separate case. First assume a + b ≤ 0. Then

|a + b| = −(a + b)
= −a − b
= −a + (−b)
≤ |a| + |b|,

as −a ≤ |a| and −b ≤ |b|. On the other hand, if a + b ≥ 0 then

|a + b| = a + b
≤ |a| + |b|.

And we have the required property.

We use (4) to prove (5). Note that

|a| = |(a − b) + b| ≤ |a − b| + |b|,

so that
|a − b| ≥ |a| − |b|.

Similarly,
|b| = |(b − a) + a| ≤ |b − a| + |a|,

so that
|b − a| = |a − b| ≥ |b| − |a|.

Again we consider the two possible cases: If |a| − |b| ≥ 0 the first inequality means

|a − b| ≥ |a| − |b| = ||a| − |b||.

If |a| − |b| < 0 then the second inequality means

|a − b| ≥ |b| − |a| = −(|a| − |b|) = ||a| − |b||

So we have (5),
|a − b| ≥ ||a| − |b||.

Before we formulate a further fundamental property of the set of real numbers


we need to introduce the notion of boundedness.

Definition 1. A subset S ⊆ R is called bounded above if there exists a number K


such that, for any x ∈ S
x ≤ K.
15

In this case the number K is called an upper bound of the set S.


A subset S ⊆ R is called bounded below if there exists a number k such that, for
any x ∈ S
k ≤ x.
In this case the number k is called a lower bound of the set S.
A subset S ⊆ R is called bounded if it is at the same time bounded below and above.

In the statements in the definition above the wording “there exists” and “for all”
appeared several times. It is convenient to use the shorthands ∃ for “there exists”
and ∀ for “for all”. Then the statement of boundedness above becomes:

∃K such that ∀x ∈ S, x ≤ K.

Notice that whenever K is an upper bound of a set S then any number K 0 > K
is also an upper bound of S. Similarly, whenever k is a lower bound of a set S then
any number k 0 < k is also a lower bound of S.

If a set S ⊆ R contains an element which is an upper (lower bound) then this


element is called the maximum (minimum) of S.

Proposition 3. If a set S ⊆ R has a maximum M (minimum m) then M (m) is


unique.

Proof. Assume that S has two maxima M and M 0 . Since M ∈ S we must have
M ≤ M 0 . Similarly, we also have M 0 ≤ M . Therefore, M = M 0 .

The proof of the uniqueness of m is analogous. 2

The following sets are called intervals.


For given a ≤ b, the closed interval [a, b] is defined as

[a, b] = {x ∈ R | a ≤ x ≤ b},

the open interval (a, b) is defined as

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

We can also define semiclosed intervals

[a, b) = {x ∈ R | a ≤ x < b} and (a, b] = {x ∈ R | a < x ≤ b}.

Notice that the ε-neighbourhood of a point a ∈ R is the open interval

(a − ε, a + ε).
16

Geometrically, intervals are segments on the number line. The endpoints are
included or excluded depending on the type of the interval.

Example. All intervals defined above are bounded. In each case a is a lower bound
and b is an upper bound. Closed intervals have the minimum a and the maximum
b. Open intervals don’t have a minimum or a maximum. Semiclosed intervals have
either a maximum or a minimum but not both.

NB. Notice that the bounded sets from the example above are not finite, but
contain infinitely many elements.

♠ Exercises 12. Show that the intersection of two intervals is again an interval.

Sometimes the sets R and the rays

(a, ∞), [a, ∞), (−∞, b), (−∞, b]

are referred to as unbounded intervals.

♠ Exercises 13. Show that any finite set is bounded.

In view of the ambiguity of lower and upper bounds we can ask for making them
as sharp as possible. More precisely, we may ask for a least upper bound and a
largest lower bound.
Definition 2. Given a set S ⊆ R. We define the supremum (or least upper bound)
of S to be the number s = sup S such that

1. s is an upper bound of S

2. for any upper bound K of S we have s ≤ K

We define the infimum (or largest lower bound) of S to be the number t = inf S such
that

1. t is a lower bound of S

2. for any upper lower bound k of S we have k ≤ t.

We show that infimum and supremum are unique. Indeed, let s and s0 be two
suprema of the set S. Then both s and s0 are upper bounds and s ≤ s0 and s0 ≤ s.
Therefore, s = s0 . In an analogous way one can show that inf S is unique.

The supremum of a set S is denoted by sup S and the infimum of S is denoted


by inf S.
17

Example. Use the definition to show that inf(a, b) = a and sup(a, b) = b.

For any x ∈ (a, b) we have a < x, so a is a lower bound. We need to show that
there is no lower bound larger than a. Suppose that there is a lower bound a0 > a.
We can assume that a0 ≤ b because otherwise b would be a lower bound and we
0 0 0
could replace a0 by b. Now, a < a+a2
< a0 ≤ b, hence a+a
2
∈ (a, b) and a0 > a+a
2
,
0
which contradicts the assumption that a was a lower bound.

The proof of sup(a, b) = b is analogous. 2

Now we are ready to formulate the axiom of completeness of the real numbers:

Any non-empty subset S ⊆ R that is bounded above has a supremum.

Notice that the rational numbers do not satisfy the axiom of completeness. In-
deed, consider the set S ⊆ Q of all rational numbers x such that x2 < 2. The
supremum of this set within the real numbers is the number c with c2 = 2, which
is not a rational number. Now, any rational number smaller than c is not an upper
bound of S and for any rational number r greater than c there is a rational number
r0 < r which is still an upper bound. Try to prove the statements in the preceding
sentence. Try to prove first that for any two non-negative real numbers a < b it
follows a2 < b2 .

The axiom of completeness makes sure that there are “enough” real numbers to
fill the “gaps”. To make sure that there are not “too many” real numbers we need
another axiom, called the Archimedean axiom:

For any two positive real numbers x, y there is a natural number n


such that nx > y.

This means that by adding a positive real number x sufficiently many times to
itself we can make it larger than any other positive real number. The consequences
of the Archimedean axiom are further explored in the Appendix. In particular, we
can show the stronger density property of the rational numbers:

For any two real numbers a < b there infinitely many rational numbers
x such that a < x < b.

♠ Exercises 14. Show that the Archimedean axiom is automatically satisfied for
rational numbers, i.e., for any two positive rational numbers x, y there is a natural
number n such that nx > y.

♠ Exercises 15. Use the Archimedean axiom to show that for any positive real
number ε there exists a rational number m
n
such that 0 < m
n
< ε.
18

3 Sequences

In this lesson we introduce and study the notion of sequences. One of our aims is
to establish a relation between sequences and the supremum of a set, as defined in
the previous lecture.

Definition 3. A sequence is a function f : N → R. Instead of f (n) we often use


index notation f (n) = an and we represent the sequence as an infinite ordered list
of the numbers (a0 , a1 , as , . . . ). Other common notations are (an )∞
n=0 or just (an ).

Sequences are used in mathematical modelling for recording consecutive mea-


surements in regular time steps over a potentially unrestricted period.

A sequence may (or may not) follow the pattern given by a formula. Although
there are ways to analyse “big” measurement data using computers, having a single
formula makes the analysis much easier and often reveals underlying laws. Examples
of sequences defined by a formula are

1. (n2 )∞
n=0 = (0, 1, 4, 9, . . . ) – the sequence of squares

2. (2, 3, 5, 7, 11, . . . ) – the sequence of primes

3. ( n1 )∞
n=1 – the sequence of reciprocals

4. (2n)∞
n=0 – the sequence of even natural numbers

5. (2n + 1)∞
n=0 – the sequence of odd natural numbers

6. ((−1)n )∞
n=0 = (1, −1, 1, . . . ) – the sequence of alternating 1 and −1.

The following two types of sequences are particularly important in modelling


and have special names:

1. Sequences of the form cn = an + b, where a, b are some given numbers (pa-


rameters) are called arithmetic progressions.

2. Sequences of the form cn = aq n , where a 6= 0 is a real parameter and q 6= 1 is


a positve real parameter, are called geometric progressions.

In analysing a sequence (e.g. a sequence of measurements) we are interested in


the following properties:

A sequence (an )∞
n=0 is called
19

1. constant if ∃c ∈ R such that ∀n, an = c,

2. positive (non-negative) if ∀n, an > 0 (an ≥ 0),

3. negative (non-positive) if ∀n, an < 0 (an ≤ 0),

4. (strictly) increasing if ∀n, an+1 ≥ an (an+1 > an ),

5. (strictly) decreasing if ∀n, an+1 ≤ an (an+1 < an ).

We can form new sequences from given sequences in several ways:

1. We scale the sequence (bn ) by a real number a to produce the sequence (cn )
with cn = abn .

2. We add two sequences (an ) and (bn ) to produce the sequence (cn ) with cn =
an + b n .

For any sequence (an )∞


n=0 = (a0 , a1 , a2 , . . . ) we can form the derived sequence
4

(also known as “sequence of consecutive differences”)

(a0n )∞ ∞
n=0 = (an+1 − an )n=0 = (a1 − a0 , a2 − a1 , a3 − a2 , . . . ).

We have used the notation (a0n ) for the derived sequence. The “prime” (dash) or
other modifications of a letter like â (‘a hat’) or ã (‘a tilde’) are used in mathematics
as a notation for a different, but usually a related object5 .

♠ Exercises 16. Show that the derived sequence of the sum of two sequences (an )
and (bn ) equals to the sum of their derived sequences (a0n ) and (b0n ), and that the
derived sequence of (kan ) is the derived sequence (a0n ) scaled by k.

Proposition 4. A sequence (an )∞ n=0 is constant if and only if its derived sequence
is identically 0.
A sequence (an )∞ n=0 is (strictly) increasing if and only if its derived sequence is non-
negative (positive).
A sequence (an )∞ n=0 is (strictly) decreasing if and only if its derived sequence is non-
positive (negative).

Proof. We prove the first statement. It is clear that the derived sequence of a
constant sequence an = c is a0n = an+1 − an = c − c = 0.
4
Students who have encountered calculus before may see here some analogy with the derivative
of a function. Notice that the “formula” of a derived sequence is different from the “formula” of
the derivative of a function, even if sequence and function are given by the same “formula”. The
derivative of f (x) = x2 is f 0 (x) = 2x, whereas the derived sequence of (n2 ) is (2n + 1).
5
Later in this unit we will use the notation f 0 for the derivative of the function f .
20

We prove the converse by induction. We have a0 = c just by denoting a0 by c.


Now, assuming that an−1 = c we conclude that an = an−1 + a0n−1 = an−1 + 0 = c.
This concludes the proof by induction.

The proof of the second statement is straight forward: Clearly, an+1 ≥ an if


and only if a0n = an+1 − an ≥ 0. The same argument works in the case of strict
inequalities and also for the proof of the third statement. 2

Let us compute the derived sequences for some list of standard sequences:

1. The derived sequence for an arithmetic progression cn = an + b is the constant


sequence c0n = a. In fact, a sequence is an arithmetic progression if and only if its
derived sequence is constant.

2. The derived sequence for a geometric progression cn = aq n is the geometric


progression c0n = a(q − 1)q n . In particular, for q=2, the derived sequence coincides
with the original geometric progression.

3. The derived sequence of the quadratic sequence an = n2 is a0n = (n+1)2 −n2 =


2n + 1 (which is an arithmetic progression). More generally, the derived sequence
of an = np , where p is a positive integer, is given by a polynomial formula

p−1  
X p k
a0n p p
= (n + 1) − n = n = pnp−1 + · · · .
k=0
k

This polynomial is of order p − 1 with leading term pnp−1 .

♠ Exercises 17. Compute the derived sequence for the sequence of reciprocals an =
1
n
. Here we assume that n ≥ 1.

Another interesting problem is to find a sequence (an ) with a given derived


sequence (bn ). We have already solved this problem for the identically zero derived
sequence. The resulting constant sequence involved an arbitrary parameter c = a0 .
It is a general phenomenon that a0 in the resulting sequence is arbitrary. In general
we have

a0 = c
a1 = c + b 0
..
.
n−1
X
an = an−1 + bn−1 = bn−1 + · · · + b0 + c = c + bν
ν=0
21

The sequence (sn ) with terms


n
X
sn = bν
ν=0

is called the sequence of partial sums of the sequence (bn ). Finding the original
sequence for a given sequence is closely related to finding the sequence of partial
sums:
an = c + sn−1 .
Notice the correspondence between the n-th term of the sequence (an ) and the
(n − 1)-st term of (sn ).

In general, it can be very challenging to find a formula for the partial sums of
a given sequence. We can use the formulae of the derived sequences from above to
compute some partial sums.

The partial sums of the sequence of natural numbers


n−1
X n(n − 1)
sn−1 = ν = 1 + · · · + (n − 1) =
ν=0
2

are given by the well-known Gaussian formula. We can also compute it using our
derived sequences from above:

The derived sequence of (n2 ) is (2n + 1) and the derived sequence of (n) is (1).
Subtracting the corresponding terms yields the derived sequence (2n) of (n2 − n).
Dividing by 2 shows that the derived sequence of ( n(n−1)
2
) is (n) and hence, the
sequence (an ) of partial sums of (n) is
n−1
X n(n − 1)
sn−1 = k = an + c = + c.
k=0
2

The constant c can be determined from a0 = 0, hence c = 0. This yields the


Gaussian formula
n
X n(n + 1)
sn = 1 + 2 + · · · + n = k= .
k=1
2

The same method works for all power sequences.

♠ Exercises 18. Find the sequence of partial sums for bn = n2 .

Let us find the partial sums for the geometric progression:


n−1
X
sn−1 = an = qν .
ν=0
22

We know that the derived sequence of (q n ) is (q − 1)q n , hence the derived sequence
qn
of ( q−1 ) is (q n ). It follows that the partial sums of (q n ) are

qn
sn−1 = an = + c,
q−1
1
where c = − q−1 can be determined from a1 = 1. This yields the well-known formula
for partial sums of the geometric progression
n−1
X qn − 1 1 − qn
qν = = . (1)
ν=0
q−1 1−q
23

4 Limits of sequences

A sequence (of measurements) can, in its long-term behaviour, approach and stay
close to a constant limit. In this lecture we will give the notion of limit a precise
meaning.

Let (an ) be a sequence. We would refer to the number L as the limit of the
sequence if the terms an of the sequence get and stay arbitrarily close to L if n is
sufficiently large. We have earlier introduced the notion of ε-closeness to quantify
how close an to L is. Getting arbitrarily close means that, no matter how small a
positive ε we chose, we want |an − L| < ε as soon as n is large enough, i.e. n is
greater than some number N , which depends on ε. The smaller ε we choose, the
larger N becomes. Sometimes we will be able to express N as a function of ε but
sometimes we will just be able to show that such N exists. Using the quantifiers ∀
and ∃ this can be expressed formally as:

∀ε > 0 ∃N such that ∀n > N, |an − L| < ε. (2)

This is a rather complex logical construct.

♠ Exercises 19. Show that the statement (2) is equivalent to the statement:

∀ε > 0 |an − L| < ε holds for all but finitely many numbers n.

♠ Exercises 20. Show that the statement (2) is equivalent to the statement: ∀ε > 0
the set {n | |an − L| ≥ ε} is bounded above.

♠ Exercises 21. Formulate the negation of the statement (2), i.e. express that L is
not the limit of the sequence (an ).

We say that the sequence (an ) is convergent if it has a limit. We write

lim an = L.
n→∞

In this case we also say that the sequence (an ) tends (or converges) to L. If a
sequence does not have a limit then it is called divergent.

Notice that altering finitely many terms in a sequence (an ) neither changes its
convergence or divergence nor its limit in the case of convergence. Indeed, finitely
many changes affect only terms an with n ≤ N0 for some number N0 . Then the
statement of convergence to a limit L remains true (or remains false) by replacing
N with max(N, N0 ).

We illustrate the notion of limit in an example.


24

Example. Consider the sequence of reciprocals ( n1 ). This sequence is strictly


decreasing and positive and it appears that its terms get and stay close to 0:
 
1 1 1
1, , , , . . . .
2 3 4

We conjecture that the limit might be L = 0. For each positive ε we have to find N
such that
1
∀ε > 0 ∃N such that ∀n > N, − 0 < ε.
n

A good strategy is to start from the end. We want to achieve that n1 < ε. This
is equivalent to
1
n> .
ε
So all we need to do is to find an integer N that is greater than or equal to the real
number 1ε . Then n > N ≥ 1ε implies n > 1ε which in turn makes sure that

1
< ε,
n

as required. In this case we can even give a formula for N as a function of ε


 
1
N= ,
ε

where dxe is the “ceiling” function that assigns to a real number x the smallest
integer that is greater than or equal to x.

Example. Consider the sequence of negative powers of 2, an = 2−n ,


 
1 1
1, , , . . . .
2 4

This sequence is also positive and decreasing and seems to approach 0. To confirm
this we need to show that

∀ε > 0 ∃N such that ∀n > N, 2−n − 0 < ε.

Again we start from the end,

2−n − 0 = 2−n < ε

is equivalent to 2n > 1ε . We could solve this inequality for n if we knew the log2
function and if we knew that it is strictly increasing and therefore respects inequali-
ties. Instead we follow another approach. We show that 2n > n, which is equivalent
to 2−n < n1 , by induction: We start with n = 1, 21 = 2 > 1 is correct. Assume, for
25

n ≥ 2, 2n−1 > n − 1. In particular, then also 2n−1 > n − 1 ≥ 1. Adding the two
inequalities gives
2n−1 + 2n−1 > n − 1 + 1,

that is
2n > n,

as required. Now, the choice made in the previous example also works here: If
n > N ≥ 1ε then
1
2n > n > N ≥
ε
and hence
2−n < ε.

This example shows that sometimes choosing a much larger N than the optimal one
allows us to simplify the computations. Here we chose N = 1ε , rather than the
 

smaller N = d− log2 εe. There is no general recipe for this approach.

♠ Exercises 22. Show that the limit of a constant sequence an = c exists and equals
c.

Example. Most sequences have no limit. We demonstrate this for the alternating
sequence an = (−1)n , that is (1, −1, 1, −1, . . . ). The difficulty of showing that there
is no limit is that we have to negate the limit statement for any candidate L:

∀L ∈ R ∃ε > 0 ∀N ∃n ≥ N |an − L| ≥ ε.

We choose ε = 1. If there was a limit L then for any m = n + 1, n > N we would


have
|am − L| < 1 and |L − an | = |an − L| < 1.

By the triangle inequality we would have then

2 = |an+1 − an | ≤ |an+1 − L| + |L − an | < 2,

which is a contraditction.

Using the “ε - N ” technique we prove some properties of limits.

Proposition 5. 1. If a sequence (an ) converges to the limit L then the sequence of


absolute values (|an |) converges to |L|.
2. If the sequence (an ) is convergent then it is bounded, i.e. there exists a number
M such that ∀n ∈ N, |an | < M .
3. If a sequence (an ) has a limit L > 0 (L < 0) then ∃N0 such that, for n > N0 ,
an > L2 (an < L2 ).
26

Proof. We prove the first statement. We know that

∀ε > 0 ∃N such that ∀n > N, |an − L| < ε.

By the reverse triangle inequality,

||an | − |L|| ≤ |an − L|.

Therefore, choosing for any given ε the same N yields

||an | − |L|| ≤ |an − L| < ε,

as required.

For the second statement, let limn→∞ an = L and, consequently, limn→∞ |an | =
|L|. Then for ε = 1 there exists N0 such that, for n > N0 ,

||an − |L|| < 1,

hence, by the triangle inequality,

|an | = |(an − L) + L| ≤ |an − L| + |L| < |L| + 1.

Now we just take M as the maximum of the finitely many numbers |a0 |, . . . , |aN0 −1 |, |L|+
1.

L
Finally, for the third statement, let limn→∞ an = L > 0. Then for ε = 2
there
exists N0 such that, for n > N0 ,
L
|an − L| < ,
2
hence
L 3L
< an (< ),
2 2
as required. The proof in the case of L < 0 is analogous. 2

♠ Exercises 23. Show that the limit of a sequence (if it exists) is unique.

Theorem 1. Let (an ) and (bn ) be convergent sequences with limits K and L respec-
tively.

1. The sum and the difference of the sequences (an ± bn ) are convergent and have
the limit K ± L.

2. The scaled sequence (can ) is convergent and has the limit cK.

3. The product of the sequences an bn is convergent and has the limit KL.
27

4. If L 6= 0 then the quotient of the sequences abnn is convergent and has the limit
K
L
. In particular, there exists a number N0 , such that, for n > N0 , bn 6= 0 and
the quotient sequence is well defined for n > N0 .

Proof. We know that

∀ε > 0 ∃N1 such that ∀n > N1 , |an − K| < ε.

∀ε > 0 ∃N2 such that ∀n > N2 , |bn − L| < ε.


The notations N1 and N2 reflect that the numbers N can be different for the different
sequences. In both statements we can replace N1 and N2 by their maximum N =
max(N1 , N2 ). The same statements remain true if we replace ε by the smaller
number 2ε . In this case just N becomes larger. We have
ε ε ε
∀ > 0 ∃N such that ∀n > N, |an − K| < and |bn − L| < .
2 2 2
Now, for n > N ,
ε ε
|an + bn − K − L| ≤ |an − K| + |bn − L| < + = ε,
2 2
which proves that
lim an + bn = K + L.
n→∞

The proof of
lim an − bn = K − L
n→∞

is analogous.

We leave the proof of statement 2. as an exercise. (In fact, this is a special case
of statement 3.)

Let’s prove statement 3. We need to show that

∀ε > 0 ∃N such that ∀n > N, |an bn − KL| < ε.

We start again from the inequality at the end:

|an bn − KL| < ε

in order to find what conditions we need to impose on N . We can rewrite

an bn − KL = an bn − an L + an L − KL = an (bn − L) + (an − K)L

and apply the triangle inequality

|an bn − KL| ≤ |an ||bn − L| + |an − K||L|.


28

Our strategy is to make both |an ||bn − L| and |an − K||L| smaller than 2ε . Since
limn→∞ bn = L and |an | < M for some positive constant M ,
ε ε
∀ε > 0 ∃N1 such that ∀n > N1 , |bn − L| < , hence |an ||bn − L| < .
2M 2
If L = 0 we need not worry about the second term. If L 6= 0,
ε ε
∀ε > 0 ∃N2 such that ∀n > N2 , |an − K| < , hence |an − K||L| < .
2|L| 2

Let N = max(N1 , N2 ). Then adding the two inequalities yields


ε ε
∀ε > 0 ∃N such that ∀n > N, |an bn −KL| ≤ |an ||bn −L|+|an −K||L| < + = ε.
2 2

The proof of statement 4. is similar to the proof of statement 3. but even more
technically involved. We need to show that

an K
∀ε > 0 ∃N such that ∀n > N, − < ε.
bn L

We have
an K an L − bn K an L − KL + KL − bn K (an − K)L − (bn − L)K
− = = =
bn L bn L bn L bn L
hence
an K |an − K||L| + |bn − L||K|
− ≤ .
bn L |bn ||L|
According to 3rd statement of Proposition 5., for ε > 0 we can choose N1 such that,
for n > N1 ,
|L|
|bn | > .
2
Now, we choose N2 such that, for n > N2 ,
|L|ε
|an − K| <
4
and we choose N3 such that, for n > N3

L2 ε
|bn − L| <
4K
if K 6= 0 (otherwise, we need not worry about the second term). Let N =
max(N1 , N2 , N3 ). Then for n > N we have

an K
− < ε,
bn L

as required.
29

The theorem above allows us to show convergence and to compute limits of more
complicated sequences, as in the example below.

3n2 +n
Example. Decide whether the sequence an = 2n2 −1
converges and if so, compute
the limit.

Solution. First we divide numerator and denominator by n2 , which yields

3 + n1
an = .
2 − n12

Now the denominator tends to 2 because n12 = n1 n1 and the limit of the constant
sequence 2 is 2. Similarly, the numerator sequence tends to 3. It follows that the
sequence converges to 32 .
30

5 Limit and supremum

In this section we investigate the relation between the notions of limit and supremum
and prove some new criteria for convergence.

Proposition 6. Let S ⊂ R be a nonempty bounded set and α = sup S. Then there


is an increasing sequence (an ) of elements of S that converges to α.

Proof. Since α is the lowest upper bound of S, α − n1 < α is not an upper bound
for any natural number n. Therefore, for any n ∈ N there is an element bn ∈ S such
that bn > α − n1 . We show that the sequence of (bn ) chosen in this way converges to
α. Indeed,
 
1 1 1
∀ε choose N = then ∀n > N, α − < α − < bn ≤ α.
ε N n
1
Since N ≥ ε
and ε > 0, the latter inequality implies

α − ε < bn < α + ε,

which is equivalent to
|bn − α| < ε.
This shows that the sequence (bn ) converges to α. Finally, we modify (bn ) so that
it still converges to α but becomes increasing. Let a0 = b0 . Assume that we
have already constructed a0 , . . . , an−1 . Then an = max{an−1 , bn }. It follows that
an ≥ an−1 , thus (an ) is increasing. On the other hand,
 
1
∀ε, N = then ∀n > N, α − ε < bn ≤ an ≤ α, i.e. |an − α| < ε 2.
ε

The Proposition above means that although the supremum α of a set S may not
belong to S it can be approached as the limit of a sequence of elements from S.
This gives another approach to real numbers, namely as limits of sequences.

The following converse of the Proposition is a useful criterion for convergence


without the need of conjecturing the actual limit.

Theorem 2. Any increasing bounded above sequence (an ) converges and

lim an = sup{an }.
n→∞

Proof. Since the sequence (as a set of real numbers) is not empty and bounded
it has a supremum sup{an } = α. We show that this is the limit of the sequence.
31

Indeed, clearly an ≤ α. On the other hand, for any ε > 0, α − ε is not an upper
bound, so there is some N such that aN > α − ε. Since the sequence is increasing,
this implies that, for all n > N , an > α − ε. Collecting this together yields

∀ε > 0 ∃N such that ∀n > N, |an − α| < ε,

as required. 2

Example. Consider the sequence an = (1 + n1 )n . We show that it is increasing and


bounded.

We have
1 n n n(n − 1) n!
an = (1 + ) =1+ + 2
+ ··· +
n n 2!n n!nn
1 1 1 1 n−1
= 1 + 1 + (1 − ) + · · · + (1 − ) · · · (1 − )
2! n n! n n
and

1 n+1 n+1 (n+1)n (n+1)!


an+1 = (1 + n+1
) = 1 + n+1 + 2!(n+1) 2 + · · · + (n+1)!(n+1)n+1

1 1 1 1 n−1
= 1 + 1 + (1 − ) + · · · + (1 − ) · · · (1 − )
2! n+1 n! n+1 n+1
1 1 n
+ (1 − ) · · · (1 − ).
(n + 1)! n+1 n+1

Now, the terms in an are smaller than or equal to the corresponding terms in
an+1 and an+1 has an extra positive term, which makes an+1 > an .

In order to show that the sequence is bounded above we notice that

1 n n n(n − 1) n!
an = (1 + ) =1+ + + · · · +
n n 2!n2 n!nn
1 1 1 1 1 − 2−n
< 1 + 1 + + ··· + < 1 + 1 + + · · · + n−1 = 1 + < 1 + 2 = 3.
2! n! 2 2 1 − 12

We have used the formula for partial sums of a geometric progression (1). It follows
that the sequence (an ) converges. In fact, it converges to an irrational real number
denoted by e (in honour of Leonhard Euler)
 n
1
lim 1 + = e ≈ 2.71828.
n→∞ n

We will encounter the number e many times in the future.

The following plausible comparison principle will lead to another technique of


finding the limit of a sequence.
32

Theorem 3 (Comparison principle). Let (an ) and (bn ) be sequences with an ≤ bn


(for all but finitely many n ) and such that

lim an = L and lim bn = K,


n→∞ n→∞

then L ≤ K.

Proof. We have

∀ε > 0 ∃N1 such that ∀n > N1 , L − ε < an < L + ε


∀ε > 0 ∃N2 such that ∀n > N2 , K − ε < bn < K + ε

Let N = max(N1 , N2 ). It follows that for any n > N

0 ≤ bn − an < K + ε − L + ε = K − L + 2ε.

In other words,
L − K < 2ε,
no matter what positive ε we choose. So L − K is smaller than any positive number,
hence it is smaller than or equal to 0. This proves the claim L ≤ K. 2

NB. Even if the strict inequalities an < bn hold in the theorem above, the limits
may not satisfy the strong inequality as the following example shows: Let an = 0
and bn = n1 . Then an < bn , but

lim an = lim bn = 0.
n→∞ n→∞

We prove now the Squeeze theorem (also known as squeezing principle).

Theorem 4 (Squeeze theorem). Let (an ), (bn ) and (cn ) be sequences with an ≤ bn ≤
cn (for all but finitely many n ) and such that

lim an = lim cn = L,
n→∞ n→∞

then (bn ) also converges and


lim bn = L.
n→∞

Proof. Similar to the proof of the theorem above, we have

∀ε > 0 ∃N such that ∀n > N, L − ε < an < L + ε


∀ε > 0 ∃N such that ∀n > N, L − ε < cn < L + ε

Combining the inequalities yields, for n > N ,

L − ε < an ≤ bn ≤ cn < L + ε,
33

that is,
|bn − L| < ε,

as required. 2

Example. Let bn = sinn n . Here we assume that you are familiar with the sine
function and its basic properties from high school. In particular,

−1 ≤ sin n ≤ 1,

since the opposite site to an angle in a right triangle cannot be longer than the
hypotenuse. Therefore,
−1 sin n 1
an = ≤ ≤ cn = .
n n n
Now,
lim an = lim cn = 0
n→∞ n→∞

and therefore, by the Squeeze theorem,

sin n
lim = 0.
n→∞ n

At the end of this lecture we investigate a sequence of rational numbers that



tends to 2, that is the real number the square of which is 2. The sequence we
consider is given in a recursive way: the term an+1 is given as a formula of an . Let
a0 = 1 (or any other positive number). Then we define

an + 2 1
an+1 = =1+ .
an + 1 an + 1

The first five terms of the sequence are:

3 7 17 41
a0 = 1, a1 = = 1.5, a2 = = 1.4, a3 = ≈ 1.417, a4 = ≈ 1.4138
2 5 12 29
This sequence is not monotone (neither increasing nor decreasing). We will show

that it oscillates around 2 with the even terms undershooting and the odd terms
√ √ √
overshooting 2. We use induction, a0 = 1 < 2 (since 12 < 2). If an < 2 then

1 1 2+ 2 √
an+1 =1+ >1+ √ =√ = 2.
an + 1 2+1 2+1

Similarly, if an > 2,

1 1 2+ 2 √
an+1 =1+ <1+ √ =√ = 2.
an + 1 2+1 2+1
34


Next we show that the sequence of distances αn = |an − 2| tends to 0. Indeed,
√ √
√ an + 2 √ an (1 − 2) + 2 − 2
an+1 − 2 = − 2 =
an + 1 an + 1

2−1 √ 1 √
= 2 − an < an − 2 .
an + 1 2
√ √
We have used an1+1 < 1 and 2 − 1 < 12 (since 2 < 32 , since 2 < 94 ). Therefore,

1
αn+1 < αn ,
2
hence
αn < α0 2−n .
It follows
0 ≤ αn ≤ α0 2−n
and by the squeeze theorem limn→∞ αn = 0.

If we knew that the sequence (an ) converges we could compute the limit L as
follows: Let n pass to infinity in
an + 2
an+1 = .
an + 1
This gives
L+2
L= ,
L+1
which is equivalent to
L2 = 2.

Since all terms of an are positive, the only option is L = 2.

It is also instructive to look at this example in the following way: Interpret the
even terms a2n of the sequence as the left ends and the consecutive odd terms a2n+1

as the right ends of the intervals In = [a2n , a2n+1 ]. Then 2 belongs to all intervals
In . The sequence of intervals In is nested in the sense that

I0 ⊇ I1 ⊇ I2 ⊇ · · · .

On the other hand, the lengths of those intervals βn = a2n+1 − a2n tends to zero.
Indeed,
a2n + 2 2 − a22n
βn = − a2n = → 0.
a2n + 1 a2n + 1
This means that the sequence of intervals In is contracting. The axiom of complete-
ness of the real numbers can be replaced by the statement:
35

Any sequence of contracting nested closed intervals has exactly one


common element.

In general, we can describe real numbers as the common element of a sequence



of contracting nested closed intervals, as we have done above for 2.
36

6 Infinity as a limit

We say that a sequence (an ) has the limit ∞ if for any (large) number M only
finitely many members of the sequence are smaller than M . We can assume that M
is a natural number. Formally we can express this by

∀M ∃N such that ∀n > N, an > M.

In this case we write


lim an = ∞.
n→∞

Infinity is not a number and cannot be treated as such. A sequence that tends
to infinity is divergent.

Example. limn→∞ n = ∞, indeed, for any M there exists N (namely, N = M )


such that, for n > M ,
an = n > N = M.

We say that a sequence (bn ) tends to −∞ if an = −bn tends to ∞.

♠ Exercises 24. Show that for any sequence (an ) which tends to ∞ the sequence
1
bn =
an
tends to 0.

The following sequences tend to infinity: (cn + b), where c > 0; n2 ; (crn ), where
c > 0 and r > 1; (n!), where n! = 1 · 2 · · · n; (nn ). It turns out that some sequences
tend to infinity faster than others. Before we investigate this further we prove

Proposition 7. If a sequence (an ) is increasing and unbounded above then

lim an = ∞.
n→∞

Proof. Since the sequence (an ) is unbounded

∀M ∃N such that aN > M.

Since (an ) is increasing, ∀n > N ,

an ≥ aN .

This combines into

∀M ∃N such that ∀n > N, an > M,


37

that is
lim an = ∞. 2
n→∞

It is easy to show that the sequences above are increasing and we leave this as
an exercise. We show that the sequences are unbounded and hence tend to infinity.

1. Let an = cn + b with c > 0. Then for an arbitrary number M the inequality

an = cn + b > M

is equivalent to
M −b
n> .
c

2. Let an = n2 . We could also try and solve the inequality an = n2 > M . This
would involve the notion of square root, which we discuss later. Instead, we use the
crude estimate n2 > n, hence an > n. Therefore, an > M for n > M .

3. Let an = crn , with c > 0 and r > 1. Again we could try and solve an = crn >
M . This would require the notion of logarithm, which again we leave for later. We
use a proof by “contradiction”. Namely, we assume that the sequence is bounded
and by correct mathematical reasoning derive an obviously wrong statement. This
will prove that our assumption was wrong and the sequence is, in fact, unbounded.

If (an ) was bounded above it would have a supremum s. By the definition of the
supremum there must be some N such that
s
aN >
r
s
since r
< s is not an upper bound of the sequence. But, now

aN +1 = raN > s,

which contradicts to s being the supremum. This proves that (an ) is unbounded.

4. The unboundedness of the sequences n! and nn can be shown by the same


method as for n2 .

Sequences that tend to infinity are used in Computer Science to describe how fast
an algorithm works. Problems that are solved by computer algorithms often depend
on some complexity parameter n, e.g., the problem of sorting n objects, or the
problem of optimising a path for visiting n places. The time an needed to perform
such algorithm, of course, increases with increasing parameter n. Algorithms with
linear or polynomial time, e.g., an = 3n2 + 5 can be expected to work well for
large n, whereas algorithms with exponential time, e.g., an = 1.01n may exceed
computational resources for large n. This topic will be discussed further in Amth140.
38

At the end of this lecture we demonstrate that the geometric progression an = crn
with c > 0, r > 1 grows so much faster than the linear progression bn = αn + β with
α > 0 that the sequence of ratios abnn still tends to ∞.

We know that the derived sequence of an is a0n = c


r−1
rn . It follows that
c n−1
an = a0 + a00 + · · · + a0n−1 ≤ c + n r .
r−1
Therefore,

c
an c + n r−1 rn−1 c
c
≤ = n β
+ β
rn−1
bn αn + β α+ n
(r − 1)(α + n )
which for large n is approximately
c
rn
r(r − 1)α

and still grows like a geometric progression with r > 1.

If the ratio of two sequences abnn tends to ∞ then the reciprocal ratio bn
an
tends to
zero. The latter statement can be expressed by the notation

bn = o(an ),

which is pronounced bn is little-o of an . Using this notation we can say that a


sequence (bn ) tends to 0 if bn = o(1). The little-o (and big-O6 ) notations are very
convenient but its discussion and use will be postponed to Amth140 and MTHS130.

A sequence (bn ) is big-O of (an ), written as bn = O(an ), if the sequence of ratios abnn is bounded.
6

E.g., bn = n sin n is big-O of an = 2n + 1. If a sequence (bn ) is bounded we write bn = O(1).


39

7 Functions

In this unit we consider functions defined on a subset X of the real numbers R. The
domain X usually is an open, closed or semi-closed interval, a union of those, the
entire set R or rays

(a, ∞) = {x ∈ R | x > a}, [a, ∞) = {x ∈ R | x ≥ a},


(−∞, a) = {x ∈ R | x < a}, (−∞, a] = {x ∈ R | x ≤ a}.

Mostly we will not pay too much attention to the codomain and assume it to be
R.

Usually the functions we consider are given by one or several algebraic formulae.
An algebraic formula f (x) may make sense for some arguments x and not for others.
E.g., the formula
1
f (x) =
x

does not make sense for x = 0 but for all other real numbers x. We say that f (x) is
well defined for x 6= 0. Often we will assume that the domain of a function given by
a formula f (x) is the largest subset of R where the formula is well defined. We will
call this set the natural domain of f (x). E.g., the natural domain of f (x) = x1 is

X = (−∞, 0) ∪ (0, ∞).

The graph of a function f : X → Y , where X, Y ⊆ R, can be sketched in an


xy-coordinate system.

If f has an inverse function g : Y → X then its graph is the reflection of the


graph of f about the bisector y = x.
40

You have already encountered most of the functions below.

Linear functions. A linear (or affine7 ) function is defined by a formula


f (x) = mx + b
where m and b are given real parameters. The natural domain X of any linear
function is R. The parameter m is called the slope. If m = 0 the function is
constant. The graph of the function passes through the point (0, b) on the y-axis.
Therefore the parameter b is called the y-intercept. The graph passes through the
origin (0, 0) if and only if b = 0. We show that the graph of a linear function is a
straight line. Let (x0 , y0 ) and (x1 , y1 ) be the coordinates of two points of the graph
and let (x, y) be the coordinates of another point of the graph. Then
y − y0 y1 − y0
=m= . (3)
x − x0 x 1 − x0
This shows that any point (x, y) of the graph lies on the hypothenuse of similar
right triangles with vertices (x0 , y0 ), (x, y0 ), (x, y), i.e. on the line formed by those
hypotenuses (see sketch below).

Linear functions are used to model processes where a quantity changes at a


constant rate, e.g. a motion with constant velocity. The slope m is a measure of
the rate of change (velocity).
7
In Calculus this kind of functions is called linear functions, but in Linear Algebra a function
is called linear only if b = 0. The term affine functions is used if b 6= 0.
41

If m 6= 0 the function f (x) = mx + b has an inverse, which is also a linear


function
1 b
f −1 (x) = x − .
m m
Since every real number x has a preimage f −1 (x) the range of f consists of all real
numbers.

If m = 0 the range of f (x) = b consists of the single value b. In this case f (x)
has no inverse.
Definition 4. A function f is called (strictly) increasing if for any two arguments
x1 < x2 from the domain f (x1 ) ≤ f (x2 ) (f (x1 ) < f (x2 )).
A function f is called (strictly) decreasing if for any two arguments x1 < x2 from
the domain f (x1 ) ≥ f (x2 ) (f (x1 ) > f (x2 )).
A function is called monotone if it is either increasing or decreasing.
Proposition 8. If a function is strictly monotone, i.e. strictly increasing or strictly
decreasing, then it is injective.

Proof. Assume f (x) is strictly increasing (the case of strict decrease is com-
pletely analogous). We have to show that for two different inputs x1 6= x2 the
outputs are also different. Without loss of generality, x1 < x2 . Then f (x1 ) < f (x2 ),
in particular, f (x1 ) 6= f (x2 ). 2

A linear function is strictly increasing (decreasing) if m > 0 (m < 0). Indeed,


assume m > 0, then
x1 <x2
mx1 <mx2
mx1 + b <mx2 + b
f (x1 ) <f (x2 ).
The case m < 0 is analogous.

Power functions. The simplest power functions are given by a formula f (x) =
x , where n > 1 is a natural number. For n = 2, the function f (x) = x2 is called the
n

square function and, for n = 3, the function f (x) = x3 is called the cubic function.
The natural domain of the power functions with natural exponent n is the set of all
real numbers R. The behaviour of those power functions depends on whether n is
odd or even. Therefore we consider these cases separately.

Power functions with even n = 2m have the property f (−x) = f (x), since
(−x)2m = ((−x)2 )m = x2m .
Functions with this property are called even functions. More precisely,
42

Definition 5. A function f : X → R is called even, if for any x ∈ X also −x ∈ X


and f (−x) = f (x) for all x ∈ X.
A function f : X → R is called odd, if for any x ∈ X also −x ∈ X and f (−x) =
−f (x) for all x ∈ X.

The graph of an even function is mirror-symmetric with respect to the y-axis,


the graph of an odd function is point-symmetric with respect to the origin.

♠ Exercises 25. Show that for any odd function defined on a domain that contains
0, f (0) = 0.

Even functions are not injective (unless X = {0}). In particular, power functions
with even exponent are never injective because, e.g. f (−1) = f (1).

Power functions with even exponent n = 2m take only non-negative values since

f (x) = x2m = (x2 )m ≥ 0.

Therefore the range R is a subset of [0, ∞). In fact, R = [0, ∞). This is a highly
non-trivial fact, the proof of which requires more advanced methods of calculus.

♠ Exercises 26. Show that the graph of the function y = x2 is a parabola with focus
(0, 14 ) and directrix y = − 41 , i.e. show that each point of the graph has the same
distance to the focus and to the directrix.

If we restrict the domain of the function f (x) = x2m to X = [0, ∞) the function
becomes strictly increasing and hence injective.
Proposition 9. For any natural number n and for any pair of non-negative numbers
0 ≤ x1 < x2 we have xn1 < xn2 .

Proof. We use induction on n starting with n = 1. The statement is tautological


for n = 1. Assume
xn1 < xn2 .
Then
xn1 x1 < xn2 x1 < xn2 x2 ,
thus
xn+1
1 < xn+1
2 ,
as required. 2

If we restrict the codomain also to Y = [0, ∞) the function becomes surjective,


thus
f : [0, ∞) → [0, ∞)
43

has an inverse. The inverse function of the power function f (x) = x2m is called the

2m-th root g(x) = f −1 (x) = 2m x and maps the domain [0, ∞) onto the codomain
[0, ∞).

Restricting f to the domain X − = (−∞, 0] also renders f injective (strictly


decreasing) and gives another inverse function

g − (x) = −g(x) = − 2m x : [0, ∞) → (−∞, 0].

NB. The even roots always take non-negative values. The equation x2m = a has
√ √
two solutions, namely x+ = 2m a and x− = − 2m x.

We consider now the power functions f (x) = xn with odd n = 2m + 1. These


functions are odd, since

(−x)2m+1 = ((−x)2 )m (−x) = −x2m x = −x2m+1 .

Power functions with odd n are strictly increasing throughout their natural do-
main R. We have proved that, for 0 ≤ x1 < x2 it is the case that xn1 < xn2 . For
x1 < 0 ≤ x2 we clearly have xn1 < 0 ≤ xn2 . If both x1 and x2 are negative, we have

x1 < x2
−x1 > −x2
(−x1 )n > (−x2 )n
−xn1 > −xn2
xn1 < xn2 .

Again we state the non-trivial fact, that the range of an odd power function
equals R without proof. It follows that the odd power functions

f (x) = x2m+1 : R → R

are invertible. The inverse functions are the 2m + 1-st root functions

g(x) = 2m+1
x : R → R.

They are also odd functions.

It is common to denote the inverse functions of the power functions f (x) = xn


1
by g(x) = x n . This is consistent with the usual power rules
1
g(f (x)) = (xn ) n = x1 = x.
44

This allows us to define power functions with (positive) rational exponent by


p √
f (x) = x q = ( q x)p .

The natural domain of those functions is [0, ∞). They have the property f (0) = 0
and f (1) = 1.

Power functions with negative rational exponents are defined by the power rule
−1
x = x1 . We need to exclude x = 0 from their natural domain. We adopt the
notation R∗ = R \ {0}. For negative integer exponents the functions

1
f (x) = x−n = : R∗ → R∗
xn
are even for even n and odd for odd n.

♠ Exercises 27. Show that the graph of the function f (x) = x1 is a hyperbola with
√ √ √ √
foci F1 ( 2, 2) and F2 (− 2, − 2), i.e. show that the difference of the distances

|P F1 | − |P F2 | from each point P of the graph to the foci is constant (2 2).

The function f (x) = x1 : R∗ → R∗ is bijective and inverse to itself. For negative


odd exponents the function f (x) = x−2m+1 : R∗ → R∗ is bijective and the inverse is

1 1
g(x) = x− 2m+1 = √ : R∗ → R∗ .
2m+1
x

For negative even exponents the function f (x) = x−2m : R∗ → R∗ is not injective
and takes only positive values. It becomes bijective after restricting domain and
codomain to (0, ∞). The inverse function is

1 1
g(x) = x− 2m = 2m
√ : (0, ∞) → (0, ∞).
x

Polynomial functions. A polynomial function is given by a formula


n
X
f (x) = ak x k = an x n + · · · + a0
k=0

where a0 , . . . , an are real parameters, called the coefficients of the polynomial. We


assume that an 6= 0. In this case we call an the leading coefficient and n the order
of the polynomial. A polynomial of the form an xn is called a monomial. The
natural domain of a polynomial function is the set of all real numbers R. In general,
polynomials are neither injective nor surjective.

A number x0 from the domain is called a zero of the function f (x) if f (x0 ) = 0.
Zeros of polynomial functions are also called the roots of the polynomial. The zeros
45

of a function are the points of intersection of the graph with the x-axis. If x0 is a
root of a polynomial of f (x), the polynomial factors into

f (x) = (x − x0 )g(x)

where g(x) is a polynomial of order less by 1 than the order of f 8 . This shows that
a polynomial of order n has at most n roots. It can have less than n or even no
roots.

♠ Exercises 28. Give an example of a polynomial that has no roots.

Example. The polynomial f (x) = x3 − 2x2 + x − 2 has a root x0 = 2. Factorising


f (x) = (x − 2)g(x) can be done by long division.

x2 + 1
x−2 ) x3 − 2x2 + x − 2
x3 − 2x2
0 + x − 2
x − 2
0

Rational functions. Rational functions are ratios of polynomials

p(x)
f (x) =
q(x)

where p(x) and q(x) are polynomials and q(x) is not the zero polynomial. The
natural domain of rational functions is the set of real numbers, excluding the roots
of the polynomial in the denominator. Polynomial functions are particular cases of
rational functions with q(x) = 1. The functions f (x) = x−n are also particular cases
of rational functions.

8
The proof of this fact is based on long division of polynomials.
46

8 Transcendental functions

Transcendental functions form an important class of non-rational, non-algebraic


functions. Important examples of transcendental functions covered in this unit are
exponential functions, logarithmic functions and the trigonometric functions and
their inverses. We will study these functions in some detail later in this unit. At
this stage it is sufficient to know how the exponential functions are defined for
rational arguments. For any positive real number a 6= 1 (called the base) and any
rational exponent x = pq we can define

√ p
ax : x 7→ q
a.

In fact, the exponential functions can be defined throughout R and will be strictly
increasing if a > 1 and strictly decreasing if a < 1. The range is the set of positive
numbers. The proofs of these facts require more advanced knowledge in calculus
and will be given in MTHS130.

You need to be familiar with the basic rules

ax+y = ax ay , (ax )y = axy ,

for rational x, y. These identities remain true for real x, y.

If we take for granted that the exponential functions are strictly increasing and
onto R+ we can define the inverse functions

loga : R+ → R.

Thus loga x is the number y such that ay = x. From the rules for the exponential
functions we get

loga xy = loga x + loga y, loga xc = c loga x.

Below are the graphs of y = 2x and y = loge x (where e ≈ 2.7 the Euler number)
47

The trigonometric functions sin θ and cos θ are defined as follows. Consider the
half line that forms an angle of θ (measured in radians) with the x-axis. Then sin θ
is the y coordinate and cos θ the x coordinate of the intersection point of this half
line with the unit circle. Hence sin θ and cos θ are the lengths of the opposite and
adjacent sides of a right triangle with hypothenuse of length 1.

It readily follows from Pythagoras’s theorem that


sin2 θ + cos2 θ = 1
for any angle θ. We will use this identity many times. Notice that
π 
sin θ = cos −θ
2
since sin and cos interchange as adjacent and opposite sides interchange.

It is a characteristic feature for trigonometric functions that they are periodic:


sin(θ + 2π) = sin θ, cos(θ + 2π) = cos θ.
This follows from the fact that adding 2π (or integer multiples of 2π) to an angle
gives the same half-line.
48

We will need the so-called addition theorem for sin and cos:
sin(θ + φ) = sin θ cos φ + cos θ sin φ,
cos(θ + φ) = cos θ cos φ − sin θ sin φ.

The functions sin and cos are defined for any real number and take values in
the interval [−1, 1]. The periodicity precludes them from being injective. However
when we restrict sin to the domain [− π2 , π2 ] it becomes strictly increasing with range
[−1, 1]. This is plausible from the geometric definition of sin and will be formally
proven by means of calculus later in this unit.

This so restricted function has an inverse


π π
arcsin : [−1, 1] → [− , ].
2 2
Similarly, cos is strictly decreasing if restricted to [0, π] with range [−1, 1]. This
restricted function also has an inverse
arccos : [−1, 1] → [0, π].

The function sin is odd, whereas cos is even.

Another important trigonometric function is tan which is defined as


sin θ
tan θ = .
cos θ
tan is defined for all real numbers except numbers of the form θ = π2 + kπ, where
k in an integer. These are the zeros of cos. The range of tan is the set of all real
numbers. This follows from the interpretation of tan θ as the length (with positive
or negative sign) of the segment of the tangent to the unit circle at (0, 1) (whence
the name tangent) between the point (0, 1) and the intersection with the half-line
determined by the θ.

tan is an odd function. If restricted to (− π2 , π2 ) it is strictly increasing with range


R. This function has an inverse
π π
arctan : R → (− , ).
2 2
49

Below are the graphs of y = sin x and y = tan x.


50

9 Continuity of functions

For the topic of continuity you may have in mind the following example:

Example. A firefighter shoots a water jet keeping the hose at an angle α. Assume
that the water jet has an initial velocity v, that it moves along a parabolic trajectory
and hits the ground at the distance d. The following formula models the relation
between the angle α and the distance d
v2
d= sin 2α,
g
m
where g is the gravitation constant. Assume that the initial velocity is 20 sec and
m ◦
g = 10 sec2 . For α = 15 the distance d = 20m. The firefighter wants to extinguish
a fire that extends from 15m to 25m. In what range should he vary the angle?

In practice we often need to compute a function for an argument that might be


subject to some error. Such errors may occur in measurements. Also when we use a
calculator we can only enter numbers with a relatively small number of digits. We
rely then on the assumption that the value of the function at a “nearby” argument
is “close enough” to the result we want. The concept of continuity will help us to
understand when such assumption is justified.

Assume we want to compute a function f for an argument x0 but are only able
to compute it for a nearby number x.

Our basic question is:

Can we control the error in our computation by choosing x close


enough to x0 ?

First of all we need to define the notion of “close enough”. We measure how
close a number a to number b is by their distance |a − b|. Saying that the distance
51

between a and b is smaller than some small but positive number ε means that

|a − b| < ε.

This inequality can be rewritten without the absolute value as two inequalities

−ε < a − b, and a − b < ε.

Thus we want to make sure that

|f (x) − f (x0 )| < ε

where ε is a small, but positive (acceptable) error. Now we can reformulate our
basic question:

Can we achieve a desired precision |f (x) − f (x0 )| < ε of the func-


tion f by making |x − x0 | smaller than some positive number δ
(which, of course, depends on ε)?

In the sketches below we illustrate this concept for a function where such control
is possible:

and for a function where it is not possible:


52

Let us look at some examples:

Example.

1. f (x) = mx + b (with m 6= 0). We want to make

|f (x) − f (x0 )| < ε.

Let us analyse this inequality. It is equivalent to

|mx + b − (mx0 + b)| = |m(x − x0 )| = |m||x − x0 | < ε.

This inequality is satisfied as soon as


ε
|x − x0 | < .
|m|

This is exactly the kind of condition on x we wanted. We just need to take x


such that
ε
|x − x0 | < δ =
|m|
to guarantee a precision of ε in the output. Since ε can be arbitrarily small,
we can achieve any desired precision by an appropriate choice of δ. In this
example we could express the optimal δ as a simple function of ε.

2. f (x) = b, i.e., f is a constant function. Then

|f (x) − f (x0 )| = |b − b| = 0 < ε,

no matter what x0 , ε, δ, x we choose.


53

3. f (x) = x2 . We want
|f (x) − f (x0 )| < ε
This is equivalent to

|x2 − x20 | = |x − x0 ||x + x0 | < ε.

To satisfy this inequality we choose δ to make the factor |x − x0 | small and


take care that the other factor |x + x0 | does not become too big. Thus the
choice of δ is subject to several conditions. First we stipulate δ < 1. Then

|x + x0 | = |x − x0 + 2x0 | ≤ |x − x0 | + 2|x0 | ≤ 2|x0 | + 1.


ε
Then by choosing δ < we make sure that
2|x0 | + 1
ε
|x2 − x20 | = |x − x0 ||x + x0 | ≤ (2|x0 | + 1) < ε
2|x0 | + 1

as required. This choice of δ is not optimal.

4. f (x) = |x|. This function coincides with the linear function f (x) = x for
x > 0 and with f (x) = −x for x < 0. Therefore the only point that requires
attention is x0 = 0. But then

||x| − |x0 || = ||x| − |0|| = |x| < ε

is a consequence of |x − 0| = |x| < δ with δ = ε.

The examples motivate the following definition.

A function f : X → R is continuous at some point x0 ∈ X if for


any positive number ε there exists a positive number δ (that depends
on x0 and ε) such that for all x ∈ X the condition |x − x0 | < δ
implies |f (x) − f (x0 )| < ε.

A formal short way to write this statement uses the quantifiers ∀ and ∃.

∀ε > 0 ∃δ > 0 such that ∀x ∈ X with |x − x0 | < δ we have |f (x) − f (x0 )| < ε

or even shorter,

∀ε > 0 ∃δ > 0 ∀ x ∈ X : |x − x0 | < δ, |f (x) − f (x0 )| < ε.

This is a rather complex definition. The following objects are involved: the
function f which is tested for continuity at a point x0 of the domain, the desired
54

output precision ε and the necessary input precision δ (which depends on ε). Proving
continuity means to find δ with the required properties for any given ε > 0. δ
depends on ε. The choice of δ is ambiguous: we can always replace δ by a smaller
positive number and the statement will still be true.

Now we investigate the questions: What does it mean that a function is discon-
tinuous (=not continuous) at x0 ? Are there such functions?

First of all, the notion of continuity (or discontinuity) only makes sense for points
x0 from the domain of the function. If x0 ∈ X the negation of the statement that
defines continuity is:

There is some ε > 0 such that for any δ > 0 the condition |x − x0 | < δ does
not imply |f (x) − f (x0 )| < ε, i.e. there exists some x such that |f (x) − f (x0 )| ≥ ε
although |x − x0 | < δ.

In other words, there is some output precision that cannot be achieved, no matter
how precise the input is. This negation can be formally derived by swapping ∀ and
∃ and negating the final statement:

∃ε > 0 such that ∀δ > 0 ∃x ∈ X with |x − x0 | < δ such that |f (x) − f (x0 )| ≥ ε.

The following function is not continuous at x0 = 0


(
1 for x ≥ 0
f (x) =
0 for x < 0.

This function is important in physics and technology. It models jumps from one
state into another. This function is defined for x0 = 0. We can approach x0 = 0
from the left as close as we want, the value f (x) = 0 will stay far from f (0) = 1,
i.e., we can’t achieve an output precision ε that is smaller than 1. Formally: ∃ε > 0
(namely ε = 21 ) such that ∀δ > 0 ∃x ∈ R with |x − x0 | < δ (namely x = − 2δ ) such
that |f (x) − f (x0 )| = 1 ≥ ε = 12 .

Disproving continuity means to find some particular ε and, no matter how small
we choose δ, to find an argument x (depending on δ) with |x − x0 | < δ and |f (x) −
f (x0 )| ≥ ε.

Roughly speaking, a function is continuous if we can draw its graph in one go,
without gaps.

♠ Exercises 29.


1. Prove that y = f (x) = x is continuous at x0 = 0.
55

2. Show that the function


(
sin x1 for x 6= 0
y = f (x) =
0 for x = 0

1
is not continuous at 0. Hint. Use that sin x1 = 1 for x = π .
2
+ 2kπ
56

10 Limits of functions

The following function is discontinuous at x0 = 0:


(
1 for x = 0
f (x) =
0 for x 6= 0.

We can find some ε > 0 (namely ε = 12 ) such that for any δ > 0 there exist x
with |x < δ| and |f (x) − f (0)| > 12 (namely x = 2δ ).

This discontinuity seems to result from someone having put the “wrong” value
at x0 = 0. We can make f continuous by redefining the function at the single point
x0 = 0 to f (0) = 0. We will now investigate the following problem:

When can a function be made continuous at x0 by just redefining f (x0 )? What


is the “right” value f (x0 )?

Assume some number a is this right value. Then

∀ε > 0 ∃δ > 0 such that ∀x ∈ X with |x − x0 | < δ implies |f (x) − f (x0 )| < ε

must hold with a instead of f (x0 ). But if f (x0 ) was the “wrong” value then |f (x0 )−a|
is a fixed positive number even if |x − x0 | = 0. Hence we cannot require that
|f (x) − a| < ε holds for x = x0 . This gives us the definition of a as the number such
that

∀ε > 0 ∃δ > 0 such that ∀x ∈ X with 0 6= |x−x0 | < δ it is true that |f (x)−a| < ε.

This is the definition of the limit of f as x approaches x0 . This is expressed by the


following notation
lim f (x) = a.
x→x0

The notion of limit allows us reformulate the definition of continuity:

A function f : X → R is continuous at x0 ∈ X if and only if


lim f (x) = f (x0 ).
x→x0
57

This gives us at once a powerful tool for computing limits: If f is known to be


continuous at x0 the limit limx→x0 f (x) can be obtained by evaluating f (x0 ). This
motivates the strategy to study continuous functions.

Example.

1.
lim mx + b = mx0 + b
x→x0

2.
lim x2 = x20 .
x→x0

Finding limits “from first principles”, i.e., just using the formal definition, can
be tedious. We will derive rules that allow us to compute new limits from already
known limits. These rules are analogous to the rules for limits of sequences and the
proofs are also similar. We have
Theorem 5. Let f and g be two functions and

lim f = a and lim g = b


x→x0 x→x0

then

(a) lim f + g = a + b
x→x0

(b) lim f · g = a · b
x→x0

f a
(c) lim = if b 6= 0.
x→x0 g b

Proof.

(a) This just says the “limit of a sum is the sum of the limits”.
Let ε > 0 be given. Now both f and g have well defined limits as x → x0 so
we know there exists a number δ such that
ε ε
|f (x) − a| < and |g(x) − b| <
2 2
whenever 0 < |x − x0 | < δ. Then

|[f (x) + g(x)] − (a + b)| = |[f (x) − a] + [g(x) − b]|


≤ |[f (x) − a]| + |[g(x) − b]| ,
58

by the triangle inequality. Combining this with our previous inequalities we


have

|[f (x) + g(x)] − (a + b)| ≤ |f (x) − a| + |g(x) − b|


ε ε
< + = ε,
2 2
whenever 0 < |x − x0 | < δ.
This completes the proof of (a).

(b) The proof of part (b) is a bit more intricate. Firstly we observe that

f (x)g(x) − ab = (f (x) − a)g(x) + (g(x) − b)a

so by the triangle inequality.

(∗) |f (x)g(x) − ab| ≤ |f (x) − a| |g(x)| + |g(x) − b| |a| .

We need to make the right hand side (and hence the left hand side) of the
above inequality smaller than any given positive ε.
Now f and g both have well-defined limits at x = x0 , so for any 1 ≥ ε > 0 we
can find δ > 0 such that

|f (x) − a| < ε and |g(x) − b| < ε,

whenever 0 < |x − x0 | < δ.


In particular,
|g(x)| ≤ |b| + ε̄ ≤ |b| + 1.
 
ε ε
Choose ε̄ = min 1, , .
2(|a| + 1) 2(|b| + 1)
Then

|f (x)g(x) − ab| ≤ |f (x) − a| |g(x)| + |g(x) − b| |a|


≤ ε̄(|b| + 1) + ε̄|a| ≤ ε

whenever 0 < |x − x0 | < δ. This proves (b).

(c) The proof is similar to that of (b) and is left as an exercise.

2
p(x)
It follows immediately that for any rational function f (x) = , where p(x)
q(x)
and q(x) are any polynomials
p(x0 )
lim f (x) = f (x0 ) = ,
x→x0 q(x0 )
59

if x0 is not a root of q(x).

Notice, that a limit A of a function f as x → x0 might not exist. In this case


the function cannot be made continuous by suitable definition of f (x0 ).

♠ Exercises 30. Prove statement c) from the theorem above.

The following Corollary is an immediate consequence of the theorem above.

Corollary 1. If two functions f and g are defined on the same domain X and they
are both continuous at x0 ∈ X then the functions

(a) f + g and f − g

(b) f g are continuous at x0 .


f
(c) The function is continuous at x0 if g(x0 ) 6= 0.
g

Proof. We prove only part (b). Part (a) and (c) are analogous. The function
f g is continuous at x0 if

lim f (x)g(x) = f (x0 )g(x0 ).


x→x0

We have
lim f (x)g(x) = lim f (x) lim g(x) = f (x0 )g(x0 ),
x→x0 x→x0 x→x0

as required. 2

One-sided limits. The existence of the limit requires that f (x) approaches the
same value when x approaches x0 from either side. The notion of one-sided limits
allows us to investigate the behaviour of a function when x approaches x0 either
from the left or right hand side, i.e. either staying smaller or bigger than x0 . Here
are the precise definitions:

A function f : X → R has a left-sided limit

lim f (x) = A
x→x−
0

if ∀ε > 0 ∃δ > 0 such that 0 < x0 − x < δ implies |f (x) − A| < ε

The additional condition 0 < x0 − x relaxes the statement by ignoring all x that
are greater than or equal to x0 . Notice the superscript − at x0 that indicates the
left-sided limit. Analogously,
60

A function f : X → R has a right-sided limit

lim f (x) = A
x→x+
0

if ∀ε > 0 ∃δ > 0 such that 0 < x − x0 < δ implies |f (x) − A| < ε

The only change to left-sided limits is that 0 < x0 − x, i.e. x < x0 became
0 < x − x0 , i.e. x > x0 .

The following theorem relates limits to one-sided limits.

Theorem 6. The limit limx→x0 f (x) = A exists if and only if both one-sided limits
also exist and equal A. Consequently, a function f : X → R is continuous at x0 ∈ X
if and only if
lim− f (x) = lim+ f (x) = f (x0 ).
x→x0 x→x0

Proof. If the limit limx→x0 f (x) = A then

∀ε > 0 ∃δ > 0 such that − δ < x − x0 < δ, x 6= x0 implies |f (x) − A| < ε

then the weaker statements (for a smaller set of x)

∀ε > 0 ∃δ > 0 such that 0 < x − x0 < δ implies |f (x) − A| < ε

and

∀ε > 0 ∃δ > 0 such that − δ < x − x0 < 0 implies |f (x) − A| < ε

are also true, i.e. both one-sided limits exist and equal A.

Vice versa, the existence of both one-sided limits and their equality to A means

∀ε > 0 ∃δ > 0 such that 0 < x − x0 < δ1 implies |f (x) − A| < ε

and

∀ε > 0 ∃δ > 0 such that − δ2 < x − x0 < 0 implies |f (x) − A| < ε.

Notice that δ1 and δ2 in the statement can be different for a given ε. However, their
minimum
δ = min{δ1 , δ2 }
satisfies both statements, which combine into

∀ε > 0 ∃δ > 0 such that − δ < x − x0 < δ, x 6= x0 implies |f (x) − A| < ε,


61

as required. 2

The arithmetic rules for one-sided limits are the same as for limits. The proofs
are analogous.

♠ Exercises 31. Prove that for an even function f (x)

lim f (x) = lim− f (x)


x→0+ x→0

and for an odd function g(x)

lim g(x) = − lim− g(x).


x→0+ x→0

The equality statement implies that one one-sided limit exists if and only the other
exists.

We show here that our definition of convergence is equivalent to the following statement:

lim f (x) = A
x→a

if and only if for ANY sequence {xn } such that xn 6= a and limn→∞ xn = a, limn→∞ f (xn ) = A.
First we show that
lim xn = a and lim f (x) = A
n→∞ x→a

implies
lim f (xn ) = A.
n→∞

Indeed, assume that limn→∞ xn = a . Then

∀δ > 0 ∃N ∈ N such that ∀n > N, |xn − a| < δ.

On the other hand

∀ε > 0 ∃δ > 0 such that ∀ x such that 0 6= |x − a| < δ, |f (xn ) − A| < ε.

Since xn 6= a and for n > N , |xn − a| < δ it follows |f (xn ) − A| < ε, as required.

Now we show that if A is not the limit of f (x) as x approaches a then there exists a sequence
{xn } such that f (xn ) does not approach A as n → ∞. Indeed,

∃ε > 0 ∀δ > 0 ∃0 6= |x − a| < δ such that |f (x) − A| ≥ ε


1
Now, fix some ε which exists according to the statement above. Then for any δ = n there exists
xn such that
0 6= |xn − a| < δ and |f (xn ) − A| ≥ ε.
It follows that
lim xn = a. Why?
n→∞

but
lim f (xn ) 6= A. Why?
n→∞
62

Limits as x → ±∞. A function can model measurements related to a long term


process. Again we may be interested in understanding their long-term behaviour.
Similar to a sequence, the measured quantities of that process may approach some
limit.

Similar, to our previous notion of a limit, we would call a the limit of a function
f (x) as x tends to ∞ if we can make f (x) as close to a as we wish by choosing x
big enough. As before we express closeness of f (x) to a by saying |f (x) − a| < ε.
Largeness of x can be expressed by saying that x is greater than some (big number)
L.

Formally:

We say f (x) has the limit a as x → ∞, or lim f (x) = a as x → ∞,


x→∞
if ∀ε > 0 ∃L > 0 such that |f (x) − a| < ε whenever x > L.

All this says is that if you give me any ε > 0 I can find a number L > 0 such
that |f (x) − a| is smaller than ε whenever x > L.

Similarly:

We say f (x) has the limit a as x → −∞, or lim f (x) = a as


x→−∞
x → −∞, if ∀ε > 0 ∃L > 0 such that |f (x) − a| < ε whenever
x < −L.

If a function has a limit a as x tends to −∞ or to +∞ we say that the horizontal


line y = a is a horizontal asymptote. Horizontal asymptotes are useful in sketching
the graph of the function because for large (positive or negative) x the graph of f
is very close to the asymptote.

1
Example. Prove that √ → 0 as x → ∞.
x

1
Solution. Let ε > 0 be given. We have to find an L > 0 such that √ < ε
x
whenever x > L. This is pretty easy in this case. The desired inequality

1
√ <ε
x

is equivalent to
1
x>
ε2
63

1
Hence it suffices to take L = ε2
. Then x > L guarantees

1
√ < ε.
x
2
1
See a rough sketch of the graph of f = √ below
x

√ √
x+1− x−1
Example. Prove that → 0 as x → ∞.
x
Solution. The numerator is the difference of two square roots, each of which grows
as x → ∞. The behaviour of the difference is not obvious. The trick here is to make
the troublesome numerator rational (i.e. to get rid of the square roots),
√ √  √ √ 
x+1− x−1 x + 1 + x − 1 = (x + 1) − (x − 1), “difference of squares”.
= 2

Therefore
√ √ √ √ √ √
x+1− x−1 x+1− x−1 x+1+ x−1
= ·√ √
x x x+1+ x−1
2
= √ √ .
x x+1+ x−1

It’s now clear that this expression tends to zero as x −→ ∞. We need to prove
it formally.

We note that for x > 1,


√ √
x+1+ x − 1 > 1,

so
1
√ √ < 1.
x+1+ x−1
64

Thus we have
√ √
x+1− x−1 2 2
= √ √ < .
x x x+1+ x−1 x

So for x > L > max(1, 2ε ), we have


√ √
x+1− x−1 2 2
< < = ε,
x x L
We are done. 2
1
♠ Exercises 32. Prove that lim = 0.
x→∞ 1 + x2

Poles. Consider a function f (x) that is not defined for some number x0 but on
some interval (x0 , b], [a, x0 ) or some punctured interval [a, b] \ {x0 }. If both one-
sided limits exist and they are equal we can stipulate f (x0 ) = limx→x0 f (x) so that
f becomes continuous.
2
−1
Example. Let f (x) = xx+1 . The natural domain of this function does not include
x0 = −1 because this would require division by zero. However, for x 6= −1 the
2 −1
formula can be replaced by xx+1 = (x−1)(x+1)
x+1
= x − 1, which gives a function that is
defined and continuous for any x ∈ R. Therefore,

lim f (x) = −2.


x→−1

By stipulating f (−1) = −2 we make f (x) continuous at x0 = −1.

Other possible scenarios include the option that the function grows or decays
unboundedly as x approaches x0 . Let’s look at an example.

Example. Consider f (x) = x1 . This function is not defined for x0 = 0. For small
positive x the function takes large positive values and for small negative x it takes
large negative values. We say

lim f (x) = ∞.
x→0+

The precise formal meaning of this statement is

∀M > 0 ∃δ > 0 such that ∀x : 0 < x < δ, f (x) > M.

If we approach x0 = 0 from the left we get

lim f (x) = −∞
x→0−

which can be formally expressed as

∀M > 0 ∃δ > 0 such that ∀ − δ < x < 0, f (x) < −M.


65

We say that the function f (x) = x1 has an odd pole at x0 = 0 since both one-sided
limits are infinity with different sign.

1
For the function g(x) = x2
both one-sided limits as x → 0 are +∞. In this case
we have an even pole.

If a function has the limit ±∞ as x → x0 the vertical line x = x0 is called a


vertical asymptote. Vertical asymptotes help in sketching the graph of a function.
See sketches below.
66

11 Continuity of elementary functions

Elementary functions are polynomial functions, trigonometric functions, exponen-


tial functions (which still need to be defined), their inverses, sums, products, ratios
and compositions. The aim of this lecture is to show that elementary functions are
continuous throughout their natural domains. Before we state and prove the corre-
sponding theorem we will establish some more properties of continuous functions.

If f : X → Y is a function and g : Y 0 → Z is another function, such that the


range of f is contained in the domain Y 0 of g. Then we can define the composition
g ◦ f : X → Z by
g ◦ f = g(f (x)),
that is by applying first f on x and then applying g on the output f (x).

Example. Let f : R → R be given by f (x) = 2x + 1 and g : R → R be given by


g(y) = y 2 . Then the composition g ◦ f (x) = (2x + 1)2 .

Theorem 7. Let f : X → Y and g : Y 0 → Z be two functions with range(f ) ⊆ Y 0 .


Assume that f is continuous at x0 and g is continuous at y0 = f (x0 ). Then g ◦ f is
continuous at x0

Proof. The idea of the proof is simple. If we can control the precision of the
output g(y) by the precision of the input of the outside function g, which is at the
same time the output of the inside function f and if we can control this output of
the inside function by its input x we can control the precision of g(f (x)) by the
precision of x. Formally, we need to show that

∀ε > 0 ∃δ > 0 such that ∀|x − x0 | < δ, |g ◦ f (x) − g ◦ f (x0 )| < ε.

Since g is continuous at y0 we have

∀ε > 0 ∃γ > 0 such that ∀|y − y0 | < γ, |g(y) − g(y0 )| < ε.

Since f is continuous at x0 we have

∀γ > 0 ∃δ > 0 such that ∀|x − x0 | < δ, |f (x) − f (x0 )| < γ.

Now, for any ε > 0 we find γ such that |y −y0 | < γ implies |g(y)−g(y0 )| < ε. For
this γ we now find δ such that for all |x−x0 | < δ we have |f (x)−f (x0 )| = |y−y0 | < γ
and hence |g ◦ f (x) − g ◦ f (x0 )| = |g(y) − g(y0 )| < ε, as required. 2

This theorem implies the following corollary on limits of compositions.


67

Corollary 2. Let f be a function with

lim f (x) = a
x→x0

(x0 does not have to belong to the domain of f ) and let g(y) be a function that is
continuous at a. Then
lim g ◦ f (x) = g(a).
x→x0

Proof. If we define (or redefine) f so that f (x0 ) = a, the so amended function


f becomes continuous at x0 . By the theorem above now g ◦ f is continuous at x0 ,
hence
lim g ◦ f (x) = g ◦ f (x0 ) = g( lim f (x)) = g(a). 2
x→x0 x→x0

We say that a function f is continuous on a subset A of its domain X if it is


continuous for any x ∈ A. We list some properties of functions that are continuous
on closed intervals [a, b] ⊂ R.
Theorem 8. Let f : [a, b] → R be a function, which is continuous on the closed
interval [a, b]. Then

1. f is bounded, that is, there exists a number K such that |f (x)| ≤ K for all
x ∈ [a, b].

2. f assumes its minimum and maximum, that is, there exist xmin and xmax such
that for all x ∈ [a, b]

m = f (xmin ) ≤ f (x) ≤ f (xmax ) = M.

3. (Intermediate Value Theorem [IVT]) f assumes all intermediate values k ∈


[m, M ], that is, for any k ∈ [m, M ] there exists xk ∈ [a, b] such that

f (xk ) = k.

The proof of this theorem is a topic of MTHS130. It relies on the completeness


property of the real numbers and would not be true if we stayed with rational
numbers. Another short way of stating the theorem is the following.
Theorem 9. If f : [a, b] → R is a function, which is continuous on the closed
interval [a, b] then its range is a closed interval [m, M ].

The following example is an application of the theorem above.

Example. Show that the range of f : R → R, f (x) = x2 is the set of all non-negative
numbers.
68

The square function is continuous on any interval [0, n] for any n ∈ N. Now, 0
and n2 are in the range and, by the theorem, all intermediate values in [0, n2 ] belong
to the range. Since n2 ≥ n for n ≥ 1 and n can be chosen arbitrarily large, we see
that any real number ≥ 0 is in the range. On the other hand, the range does not
contain negative numbers, since squares are non-negative.

♠ Exercises 33. The Dirichlet function is defined on X = [0, 1] as


(
1 if x is rational
f (x) =
0 if x is irrational.

Show that the Dirichlet function is nowhere continuous.

Let’s now return to our aim to prove continuity of the elementary functions.

Any rational function r(x) = p(x)


q(x)
can be obtained from the continuous functions
f (x) = x and the constant function f (x) = a by arithmetic operations and therefore
is continuous on their natural domain, i.e. where q(x) 6= 0.

We discuss now the continuity of the inverse functions (where exist). We have
seen that strictly monotone functions are injective. For continuous functions the
converse is also true.
Theorem 10. An injective, continuous function f : [a, b] → R on a closed interval
is strictly monotone.

Proof. Injectivity implies f (a) 6= f (b). Assume f (a) < f (b) (Otherwise we can
consider −f ). We prove that f is strictly increasing. Choose any x1 ∈ (a, b).
We show by contradiction that f (x1 ) < f (b). If f (x1 ) ≥ f (b) then f (b) is an
intermediate value between f (a) and f (x1 ) and, due to the IVT, there must be a
point c between a and x1 with f (c) = f (b) which contradicts injectivity. In the same
way one proves f (a) < f (x1 ).

Now choose x2 ∈ (x1 , b). The same argument from above applied with x1 , x2 , b
instead of a, x1 , b yields f (x1 ) < f (x2 ) as required. 2

♠ Exercises 34. Show that the conclusion of the theorem above is also valid if f
is an injective, continuous function on an open or semiclosed interval (a, b), [a, b),
(b, a], or on a ray (a, ∞), [a, ∞), (−∞, b), (−∞, b] or on R.

Before we formulate and prove the next theorem on continuity of inverse functions
we take a more geometric view on continuity of a function f : X → Y at some point
c ∈ X. For any subset V of the codomain Y we define the preimage of V as the set

f −1 (V ) = {x ∈ X | f (x) ∈ V }.
69

For this definition it does not matter whether f is invertible or not.

For c ∈ X let d = f (x). For ε > 0 let V be the intersection of the codomain V
and the ε-neighbourhood of d, i.e.,

V = (d − ε, d + ε) ∩ Y.

Now continuity means that f −1 (V ) contains a δ-neighbourhood of c, i.e., an interval

(c − δ, c + δ),

which is entirely mapped into V . In other words, no matter how we vary the input
within that δ-neighbourhood, the corresponding outputs will stay in V , ε-close to
d = f (c).

Theorem 11. Let f be a strictly monotone, continuous function on an open interval


(a, b) (a, b can be finite or ±∞). Then the inverse function g = f −1 is continuous
on its domain.

Proof. Without loss of generality, assume that f is strictly increasing. The case of
strict decrease is analogous, or, alternatively, we may just consider −f instead of f .

Let c be in the range of f , thus in the domain of g and let d = g(c). We can
shrink any given ε to ε0 so that [d − ε0 , d + ε0 ] ⊂ (a, b). Let

V = (d − ε0 , d + ε0 ) ∩ (a, b) = (d − ε0 , d + ε0 ).

Now,
g −1 (V ) = f (V ) = (f (d − ε0 ), f (d + ε0 )).

The set g −1 (V ) is an open interval, which contains f (d) = c. It may not be a


symmetric δ-neighbourhood of c but it contains such δ-neighbourhood with

δ = min{f (d + ε0 ) − c, c − f (d − ε0 )}. 2
70

This Theorem shows, in particular, that the functions



m
x : [0, ∞) → [0, ∞),

being inverse to the strictly increasing functions

xm : [0, ∞) → [0, ∞),

are continuous on their domains.

Trigonometric functions and their inverses. First we show that sin x is


continuous at x0 = 0, that is,
lim sin x = 0.
x→0

Since sin is an even function it suffices to show that

lim sin x = 0.
x→0+

We will use the following form of the squeezing principle for limits of functions:

Theorem 12. Let f, g, h be functions defined in a punctured neighbourhood (a, b) \


{x0 } or one-sided neigbourhood (x0 , b) or (a, x0 ) of x0 and such that on the respective
domain
f (x) ≤ g(x) ≤ h(x).
If the limits/ right limits / left limits of f and h as x approaches x0 exist and are
equal to L then the limit/ right limit / left limit of g as x approaches x0 also exists
and equals L.

♠ Exercises 35. The proof is similar to the proof of the Squeeze theorem for se-
quences and is left as an exercise.

Comparing the area A of the triangle with vertices (0, 0), (1, 0), (cos x, sin x), the
area B of the sector of the unit circle formed by the angle x and the area C of the
triangle with vertices (0, 0), (1, 0), (1, tan x) (see sketch below)
71

gives
1 x 1
0≤A= sin x ≤ B = π ≤ C = tan x.
2 2π 2
It follows, for x ∈ [0, π2 ],
0 ≤ sin x ≤ x ≤ tan x. (4)

At this stage we only need the squeezing inequalities

0 ≤ sin x ≤ x

which, by the squeezing principle give

lim sin x = 0
x→0+

and hence
lim sin x = 0.
x→0

It follows that
p
lim cos x = lim 1 − sin2 x = 1 = cos 0,
x→0 x→0

which shows that cos is also continuous at x0 = 0.

Now, for any x0 ,

lim sin x = lim sin(x0 + y) = lim sin x0 cos y + cos x0 sin y = sin x0 .
x→x0 y→0 y→0

This proves that sin x is continuous throughout R. It follows that


π
cos x = sin( − x)
2
is continuous throughout R and that
sin x
tan x =
cos x
π
is continuous on its natural domain, which excludes the zeros of cos, i.e., 2
+ kπ,
where k ∈ Z.

It follows from Theorem 11 that


π π
arcsin : [−1, 1] → [− , ]
2 2
arccos : [−1, 1] → [0, π]
π π
arctan : R → (− , )
2 2
are continuous functions.
72

Exponential and Logarithmic functions. We have not given a rigorous


definition of exponential and logarithmic functions yet and we also defer this to
a time when we have more advanced techniques available. Strictly speaking, we
have only defined exponential functions f (x) = ax for rational x. We need to fill
the “gaps” left by irrational numbers in such a way that the resulting function is
continuous. There are many ways of doing this. One way to define the exponential
function with base e is
x
ex = lim (1 + )n .
n→∞ n
Although, we will not pursue this here. This function is defined for any real x, it
is strictly increasing and continuous and it has a continuous inverse (called ‘natural
logarithm’)
ln : (0, ∞) → R.

The so defined functions satisfy the identities

ex+y = ex ey , ekx = (ex )k , ln(xy) = ln x + ln y, ln xk = k ln x.

Exponential functions with arbitrary base a (a > 0, a 6= 1) can be defined by

ax = e(ln a)x .

They are strictly increasing for a > 1 and strictly decreasing for a < 1 and they are
continuous throughout R.
73

12 Rates of change, derivatives and differentials


of functions

In this lecture we start Differential Calculus. Consider a function y = f (x). It can


be viewed as a model of some process where a measurable quantity y changes over
time x, e.g. y can be the distance travelled by a car at time x. We want to measure
how rapidly the change takes place, e.g., how fast we travel. To do so we first pick
two instants of time x0 and x1 and we compute the change of function f :

y1 − y0 = f (x1 ) − f (x0 ).

Now the ratio


y1 − y0
mav =
x1 − x0
measures the change relative to the time elapsed and is called the average rate of
change on the interval [x0 , x1 ]. In our example this would be the average velocity of
the car during the time interval [x0 , x1 ].

Processes with constant rates of change are modelled by linear functions

y = f (x) = mx + b.

Indeed, if
y − y0
=m
x − x0
for all (x, y = f (x)) then

y = f (x) = m(x − x0 ) + y0 = mx + b,

where y0 is the initial value of f (x) at the initial time x0 .

If a process y = f (x) is taking place with non-constant velocity we can still


compute the average rate of change during the interval [x0 , x1 ] by the same formula

y1 − y0
mav = .
x1 − x0

This is the rate of change that would return the same result if the process would
unfold at a constant rate of change. Geometrically, mav is the slope of the straight
line passing through the points with coordinates (x0 , y0 = f (x0 )) and (x1 , y1 =
f (x1 )). Such straight line through two points on the graph is called a secant.

If we are interested in the instantaneous rate of change, e.g., the velocity shown
by the speedometer of your car at a particular instant, we need to make the interval
74

[x0 , x1 ] ‘very small’. Using the mathematical technique of limits we can make this
interval approach the length 0. We define the instantaneous rate of change
f (x1 ) − f (x0 )
m = lim .
x1 →x0 x1 − x0
If this limit exists we say that the function f is differentiable at x0 and we call m
the derivative of the function f (x) at x0 . The process of computing the derivative is
called differentiation. Geometrically, m is the slope of the tangent line to the graph
at x0 . This is illustrated in the picture below.

Example. The motion of free fall of an object caused by gravity is modelled by

y = h − ct2 ,

where c, h are constants t is the time and y is the height at the time t. We compute
the instantaneous velocity at the time t1 as the limit of
h − ct22 − (h − ct21 ) −c(t22 − t21 ) −c(t2 + t1 )(t2 − t1 )
= = ,
t2 − t1 t2 − t1 t2 − t1
as t2 approaches t1 , while never being equal to t1 . Under this assumption we can
cancel the factor t2 − t1 , which yields
−c(t2 + t1 )(t2 − t1 )
lim = lim −c(t2 + t1 ) = −2ct1 .
t2 →t1 t2 − t1 t2 →t1

The equation of the tangent line to the graph of y = f (x) at the point (x0 , y0 ) is

y = `(x) = y0 + m(x − x0 ).

The linear function that describes the tangent line approximates the function
f (x) in some neighbourhood of x0 in the following sense: The ‘error term’ of the
75

approximation, i.e., the difference between f (x) and the linear approximation `(x)
is

E(x) = f (x) − `(x) = f (x) − f (x0 ) − m(x − x0 )

We have
E(x) f (x) − f (x0 )
lim = lim − m = 0.
x→x0 x − x0 x→x0 x − x0
This means that the error term E(x) tends to zero faster than x − x0 , thus it can
be neglected if x is close enough to x0 . We can express this using the o-notation as

E(x) = o(x − x0 ).

Approximation of (complicated) non-linear functions by (simple) linear


functions is the essence of differential calculus.

We will often write ∆x = x − x0 , called the increment of the argument (it is also
common to use h instead of ∆x), and ∆f = f (x) − f (x0 ) or ∆y = y − y0 , called the
increment of the function. Then the derivative at x0 equals
∆f
m = lim
∆x→0 ∆x

and the function f can be expressed as

f (x) = f (x0 ) + m ∆x + E(x)

or
∆f = m ∆x + E(x).

The linear function m ∆x as a function of the variable ∆x is denoted

df = m ∆x (5)

and is called the differential of f at x0 .

The best linear approximation of a linear function is the linear function itself.
For f (x) = mx + b we get
df = m ∆x.
In particular, for f (x) = x we have

df = dx = ∆x.

This allows us to rewrite the differential (5) of a function as

df = m dx,
76

and justifies the common notation for the derivative


df
m= .
dx
Another common notation for the derivative of the function f at x0 is f 0 (x0 ).

See the picture below for the geometric meaning of the differential.

Example. The derivative of the linear function f (x) = mx + b at any point x0 is


m. Indeed,
∆f m∆x
f 0 (x0 ) = lim = lim = m.
x→x0 ∆x ∆x→0 ∆x

The differential at x0 is df = m dx.

Example. The derivative of the function g(x) = x2 at the point x0 is 2x0 . Indeed,

∆g x2 − x20 (x − x0 )(x + x0 )
g 0 (x0 ) = lim = lim = lim = 2x0 .
x→x0 ∆x x→x0 x − x0 x→x0 x − x0
The differential at x0 is dg = 2x0 dx.

Example. Show that the function f (x) = 3
x is not differentiable at x0 = 0.

Solution. We show that


f (∆x) − f (0)
lim = ∞.
∆x→0 ∆x
Indeed,
f (∆x) − f (0) ∆x1/3 2
= = ∆x− 3 .
∆x ∆x
3 3 f (∆x) − f (0)
∀M ∃δ = M − 2 such that 0 6= |∆x| < δ = M − 2 implies > M.
∆x
Geometrically, this means that the graph of the cubic root function has a vertical
tangent at 0.
77

Example. Show that f (x) = |x| is not differentiable at x = 0.

Solution.

From the graph of f (x) = |x| it is clear that there is a cusp at x = 0 and that
the graph does not have a well-defined tangent there.

From our formal definition we have


f (0 + h) − f (0) |h| − 0
f 0 (0) = lim = lim
h−→0 h−0 h−→0 h − 0
|h|
= lim .
h−→0 h

|h|
However the sign of depends on the sign of h,
h

|h| 1, h>0
=
h −1, h < 0.

So, we have
|h|
lim+ = +1
h−→0 h
and
|h|
lim− = −1.
h−→0 h
|h|
Hence, the limit lim does not exist and f (x) = |x| is not differentiable at x = 0.
h−→0 h
2

One important point about this example is that f (x) = |x| is continuous at
x = 0. So continuity certainly does not imply differentiability. We would, however,
expect the converse to be true.

We conclude this lecture by showing that differentiability of a function f at some


point x0 implies that the function is continuous at x0 . Indeed, differentiability means
78

that
f (x) − f (x0 ) = f 0 (x0 )∆x + o(∆x).
The right hand side clearly tends to 0 as ∆x tends to zero. Therefore,

lim f (x) − f (x0 ) = 0,


∆x→0

where ∆x = x − x0 , which is equivalent to

lim f (x) = f (x0 ),


x→x0

i.e., continuity of f at x0 .
79

13 Derivatives of elementary functions

Our next aim is to compute the derivatives of power functions, trigonometric and
exponential functions and to establish rules for differentiating sums, products, quo-
tients and compositions of functions. This reduces the differentiation of elementary
functions to the application of algebraic rules, rather than dealing with limits.

First we introduce the derivative of a function as a new function. If a function


f : X → R is differentiable at each point x ∈ X we can form a new function
f 0 : X → R which assigns to each x the derivative of f at x. This function f 0 is also
called the derivative of f . We will also use the notation introduced in the previous
lecture
df
f0 = .
dx
If a function y = f (t) models a process, where the independent variable is the time
t then the derivative of f is often denoted by f˙(t) or just by ẏ. This is very common
in physics.

Let’s start by computing the derivative of the power function f (x) = xp ,


where p is a natural number. We have to compute
(x + ∆x)p − xp
f 0 (x) = lim .
∆x→0 ∆x
According to the binomial formula
p  
p
X p p−k k
(x + ∆x) = x ∆x = xp + pxp−1 ∆x + o(∆x).
k=0
k

The expression o(∆x) consists of finitely many terms with a factor ∆x of power at
least two. So, even after dividing it by ∆x all terms have still a factor ∆x and will
tend to 0 as ∆x tends to 0. It follows
(x + ∆x)p − xp pxp−1 ∆x o(∆x)
= +
∆x ∆x ∆x
and
0 pxp−1 ∆x o(∆x)
f (x) = lim + = pxp−1 .
∆x→0 ∆x ∆x

The notation E(∆x) = o(∆x) is not an equality of two functions but merely
expresses that E(∆x) has a certain property, namely
E(∆x)
lim = 0.
∆x→0 ∆x
This leads to the following simple rules. Let E1 (∆x) and E2 (∆x) be o(∆x) and
F (∆x) be any bounded function. Then
80

1. E1 (∆x)+E2 (∆x) = o(∆x), which can be expressed as o(∆x)+o(∆x) = o(∆x).

2. E1 (∆x) · E2 (∆x) = o(∆x), which can be expressed as o(∆x) · o(∆x) = o(∆x).


(In fact, o(∆x) · o(∆x) = o(∆x2 ))

3. E1 (∆x) · F (∆x) = o(∆x), which can be expressed as o(∆x) · F (∆x) = o(∆x).

Next we compute the derivative of f (x) = sin x. We use the addition formula

sin(x + ∆x) = sin x cos ∆x + cos x sin ∆x.

It follows
∆f sin x cos ∆x + cos x sin ∆x − sin x cos ∆x − 1 sin ∆x
= = sin x + cos x .
∆x ∆x ∆x ∆x

We compute the limits


sin ∆x cos ∆x − 1
lim = 1 and lim = 0.
∆x→0 ∆x ∆x→0 ∆x
The inequalities (4) can be reformulated as
sin ∆x
cos ∆x ≤ ≤ 1.
∆x
Since
lim cos ∆x = lim 1 = 1
∆x→0 ∆x→0

the squeeze theorem implies


sin ∆x
lim = 1.
∆x→0 ∆x

We have
cos ∆x − 1 (cos ∆x − 1)(cos ∆x + 1) cos2 ∆x − 1 sin2 ∆x
= = =−
∆x ∆x(cos ∆x + 1) ∆x(cos ∆x + 1) ∆x(cos ∆x + 1)
and hence
cos ∆x − 1 sin ∆x sin ∆x
lim = lim − = −1 · 0 = 0.
∆x→0 ∆x ∆x→0 ∆x (cos ∆x + 1)
This can be expressed as
cos ∆x − 1 = o(∆x).
Now,
cos ∆x − 1 sin ∆x
f 0 (x) = lim sin x + cos x = cos x.
∆x→0 ∆x ∆x

The differential d sin at 0 is d sin = 1 · dx. This gives the approximation

sin ∆x ≈ ∆x
81

for small ∆x. Bear in mind that the angle x has to be measured in radians!

A similar approximation holds for tan:


tan ∆x ≈ ∆x.

For completeness we also give a somewhat handwavy computation of the deriva-


tive of exponential functions, leaving a rigorous treatment for later. We assume the
addition formula for exponential functions f (x) = ax
ax+∆x = ax · a∆x .
Then
ax+∆x − ax a∆x − 1
= ax .
∆x ∆x
The expression on the RHS is a product where the first factor does not depend on
∆x, so it behaves like a constant for the limit as ∆x → 0. The second factor does
not depend on x and tends to a constant (if the limit exists). In fact, the limit
a∆x − 1
lim
∆x→0 ∆x
does exist and equals ln a. (We will prove this later.) Hence,

f 0 (x) = ax ln a.

In particular, the derivative of ex is ex ln e = ex .

We will now establish some algebraic rules for derivatives of sums, products,
quotients, compositions and inverse functions.

Sum rule. Let f and g be functions that have derivatives at some point x0 .
Then f ± g also has a derivative at x0 and
(f ± g)0 (x0 ) = f 0 (x0 ) ± g 0 (x0 ).

Proof.
(f ± g)(x0 + ∆x) − (f ± g)(x0 )
(f ± g)0 (x0 ) = lim
∆x→0 ∆x
f (x0 + ∆x) − f (x0 ) g(x0 + ∆x) − g(x0 )
= lim ± lim = f 0 (x0 ) ± g 0 (x0 ).
∆x→0 ∆x ∆x→0 ∆x

Product rule. Let f and g be functions that have derivatives at some point x0 .
Then f g also has a derivative at x0 and
(f g)0 (x0 ) = f 0 (x0 )g(x0 ) + f (x0 )g 0 (x0 ).
82

Notice that the derivative of a product is NOT the product of the derivatives.

Proof. We give a proof that demonstrates the advantage of the o(∆x) formalism.

f (x) = f (x0 ) + f 0 (x0 )∆x + o(∆x)


g(x) = g(x0 ) + g 0 (x0 )∆x + o(∆x)

Multiplication yields

f (x)g(x) = f (x0 )g(x0 ) + [f (x0 )g 0 (x0 ) + f 0 (x0 )g(x0 )]∆x


+ [f (x0 ) + f 0 (x0 )∆x]o(∆x) + [g(x0 ) + g 0 (x0 )∆x]o(∆x)
+ f 0 (x0 )g 0 (x0 )(∆x)2 + o(∆x).

(Here we have used that o(∆x) · o(∆x) = o(∆x).) We need to show that

[f (x0 )+f 0 (x0 )∆x]o(∆x)+[g(x0 )+g 0 (x0 )∆x]o(∆x)+f 0 (x0 )g 0 (x0 )(∆x)2 +o(∆x) = o(∆x).

This is clearly the case since

1. [f (x0 ) + f 0 (x0 )∆x] is bounded and hence [f (x0 ) + f 0 (x0 )∆x]o(∆x) = o(∆x),

2. [g(x0 ) + g 0 (x0 )∆x] is bounded and hence [g(x0 ) + g 0 (x0 )∆x]o(∆x) = o(∆x),
f 0 (x0 )g 0 (x0 )(∆x)2
3. lim = lim f 0 (x0 )g 0 (x0 )∆x = 0,
∆x→0 ∆x ∆x→0

4. all four terms in the expression above are o(∆x) and therefore, so is the sum.

Quotient Rule. Let f and g be functions that have derivatives at some point
x0 and assume that g 0 (x0 ) 6= 0 . Then fg also has a derivative at x0 and
 0
f f 0 (x0 )g(x0 ) − f (x0 )g 0 (x0 )
(x0 ) = .
g (g(x0 ))2

Proof. We show that


f (x0 +∆x) f (x0 )
g(x0 +∆x)
− g(x0 ) f 0 (x0 )g(x0 ) − f (x0 )g 0 (x0 )
lim = .
∆x→0 ∆x (g(x0 ))2

We have

f (x0 + ∆x) f (x0 ) f (x0 + ∆x)g(x0 ) − g(x0 + ∆x)f (x0 )


− =
g(x0 + ∆x) g(x0 ) g(x0 + ∆x)g(x0 )
f (x0 + ∆x)g(x0 ) − f (x0 )g(x0 ) − (g(x0 + ∆x)f (x0 ) − f (x0 )g(x0 ))
= .
g(x0 + ∆x)g(x0 )
83

Now,
f (x0 +∆x) f (x0 )
g(x0 +∆x)
− g(x0 )
lim =
∆x→0 ∆x
f (x0 + ∆x) − f (x0 ) g(x0 ) g(x0 + ∆x) − g(x0 ) f (x0 )
lim −
∆x→0 ∆x g(x0 + ∆x)g(x0 ) ∆x g(x0 + ∆x)g(x0 )
f (x0 )g(x0 ) − f (x0 )g 0 (x0 )
0
= 2
(g(x0 ))2

Chain rule. Chain rule is the rule for differentiating compositions of functions.
Let F (x) = f ◦g(x) = f (g(x)) be the composition of two functions f, g such that g is
differentiable at x0 and f is differentiable at y0 = g(x0 ). Then F (x) is differentiable
at x0 and F 0 (x0 ) = f 0 (y0 )g 0 (x0 ).

The chain rule becomes very natural if stated in terms of the differentials

d(f ◦ g) = df ◦ dg.

The differential of a composition is the composition of the differentials. Com-


posing the two differentials (which are linear functions) means to multiply their
slopes.

Proof. The idea of the proof is just to plug in the differential plus error term of
the inside function into the differential plus error term of the outside function. We
write
y = g(x) = g(x0 ) + g 0 (x0 )∆x + Eg (∆x),
where Eg (∆x) is the error term such that
Eg (∆x)
lim = 0. (6)
∆x→0 ∆x
We define (E
g (∆x)
∆x
if ∆x 6= 0
α(∆x) =
0 if ∆x = 0.
Then
y = g(x) = g(x0 ) + g 0 (x0 )∆x + α(∆x) · ∆x
and
∆y = g(x) − g(x0 ) = g 0 (x0 )∆x + α(∆x) · ∆x. (7)
Similarly,
f (y) = f (y0 ) + f 0 (y0 )∆y + Ef (∆y)
where
Ef (∆y)
lim = 0.
∆y→0 ∆y
84

We define (E
f (∆y)
∆y
if ∆y 6= 0
β(∆y) =
0 if ∆y = 0.
Notice that the so defined function β is continuous at 0. We have

f (y) = f (y0 ) + f 0 (y0 )∆y + α(∆y) · ∆y. (8)

Now plugging (7) into (8) yields

f (g(x)) = f (g(x0 ))+f 0 (g(x0 ))[g 0 (x0 )∆x+α(∆x)·∆x]+β(∆y)[g 0 (x0 )∆x+α(∆x)·∆x],

which is equivalent to

F (x) = f (x0 ) + f 0 (g(x0 ))g 0 (x0 )∆x + [α(∆x) + β(∆y)g 0 (x0 ) + β(∆y)α(∆x)]∆x.

All we need is to show that the term in square brackets

[α(∆x) + β(∆y)g 0 (x0 ) + β(∆y)α(∆x)]

tends to 0 as ∆x tends to zero. By (6)

lim α(∆x) = 0.
∆x→0

The only somewhat delicate point is to show that

lim β(∆y(∆x)) = 0.
∆x→0

We know that
lim β(∆y) = 0.
∆y→0

but now ∆y is a function of ∆x (defined in (7)). The function ∆y(∆x) is continuous


at 0 and ∆y(0) = 0. By Corollary 2,

lim β(∆y(∆x)) = β(0) = 0.


∆x→0

Therefore, also the terms

β(∆y)g 0 (x0 ) + β(∆y)α(∆x)

tend to 0 as ∆x → 0, as required. 2

♠ Exercises 36. You may come across the following short “proof” of the chain rule:

∆f ∆y
F 0 = lim .
∆x→0 ∆y ∆x
85

Since lim ∆y = 0, making ∆y small as ∆x becomes small, we have


∆x→0

∆f ∆f
lim = lim = f 0 (y0 ),
∆x→0 ∆y ∆y→0 ∆y

hence
∆f ∆y
F 0 = lim lim = f 0 (y0 )g 0 (x0 ).
∆y→0 ∆y ∆x→0 ∆x

Find the mistake. Hint. Consider the case when the inside function g(x) is constant.

Derivative of the inverse function. Let f (x) be a continuous function that is


differentiable at x0 with derivative f 0 (x0 ). Assume that f (x0 ) = y0 and f 0 (x0 ) 6= 0.
Assume that f has an inverse g in some neighbourhood of y0 . Then the inverse
function g(y) is differentiable at y0 and g 0 (y0 ) = f 0 (x
1
0)
.

Proof. We have
∆x 1
g 0 (y0 ) = lim = ∆y
.
∆y→0 ∆y lim∆y→0 ∆x
Since f is continuous and has an inverse, it is strictly monotone. Therefore ∆y 6= 0
iff ∆x 6= 0. Since ∆y → 0 as ∆x → 0,
∆y ∆y
lim = lim = f 0 (x0 ).
∆y→0 ∆x ∆x→0 ∆x

Therefore,
1 1
g 0 (y0 ) = = . 2
f 0 (x 0) f 0 (g(y 0 ))

The rules above show that all elementary functions are differentiable in their
natural domains (except for inverse functions of functions with vanishing derivative).
We compute the derivatives of the most common functions.

1. Polynomials: f (x) = nk=0 ak xk , f 0 (x) = nk=1 kak xk−1 . The derivative of a


P P

polynomial is a polynomial of order decreased by 1.


√ 1
2. Roots: g(y) = p y = y p (where p is a positive integer and y ≥ 0) is the inverse
function of f (x) = xp . We have f 0 (x) = pxp−1 . If x > 0 we can apply the formula
1 1 1 1−p 1 1
g 0 (y) = p−1
= x1−p = y p = y p −1 .
px p p p

3. Trigonometric functions: We know that for f (x) = sin x, f 0 (x) = cos x. Now,
g(x) = cos x = sin( π2 − x) implies
π
g 0 (x) = − cos( − x) = − sin x.
2
86

sin x
For h(x) = tan x = cos x
the quotient rule yields

cos2 x + sin2 x 1
h0 (x) = 2
= 1 + tan2 x = .
cos x cos2 x

4. Inverse sine: g(y) = arcsin y. Then


1 1 1
g 0 (y) = =p =p .
cos x 1 − sin2 x 1 − y2

5. Inverse tangent: g(y) = arctan y. Then


1 1
g 0 (y) = 2
= .
1 + tan x 1 + y2

6. Logarithmic functions: g(y) = loga y is the inverse function of f (x) = ax with


f 0 (x) = ax ln a. Now,
1 1
g 0 (y) = x = .
a ln a x ln a
Alternatively, we can compute

loga (y + ∆y) − loga y


g 0 (y) = lim
∆y→0 ∆y
We have
 y
loga (y + ∆y) − loga y 1 y ∆y 1 ∆y ∆y
= loga (1 + ) = loga 1 + .
∆y y ∆y y y y

1 n

Knowing that limn→∞ 1 + n
= e, we guess that
 y  u
∆y ∆y 1
lim loga 1 + = lim 1 + = e,
∆y→0 y u→∞ u
y
with u = ∆y
. Therefore,
1 1
g 0 (y) = loga e = .
y y ln a
Using this result one could compute the derivative of f (x) = ax .

7. Powers with arbitrary exponents: Let f (x) = xp where x > 0 and p is an


arbitrary real number. Then f (x) = ep ln x . According to chain rule,
p
f 0 (x) = ep ln x = pxp−1 .
x
Thus, the power rule derived above extends to arbitrary powers.
87

14 Monotone Functions and Concavity

Increase and Decrease

For functions that are differentiable on some interval monotonicity is closely


related to the sign of the derivative.

Theorem 13. If f is increasing/decreasing in some neighbourhood of a point x0


and if f is differentiable at x0 then

f 0 (x0 ) ≥ 0 / f 0 (x0 ) ≤ 0.

Proof. We consider the case when f is increasing. Then, for ∆x > 0, we have
∆f ≥ 0 and, for ∆x < 0, we have ∆f ≤ 0. In both cases
∆f
≥0
∆x
and therefore
∆f
f 0 (x0 ) = lim≥ 0.
∆x→0 ∆x

The case when f is decreasing is analogous. 2

Theorem 14. Suppose that the function f is continuous on [a, b] and differentiable
on (a, b).

(a) If f 0 (x) > 0 ∀x ∈ (a, b) then f is strictly increasing on [a, b].

(b) If f 0 (x) < 0 ∀x ∈ (a, b) then f is strictly decreasing on [a, b].

(c) If f 0 (x) = 0 ∀x ∈ (a, b) then f is constant on [a, b].

In the proof of this theorem we will use the Mean Value Theorem of Differential
Calculus. We formulate this plausible theorem here, but defer its proof to MTHS130.

Theorem 15. Suppose that the function f is continuous on [a, b] and differentiable
on (a, b). Then there exists a point c ∈ (a, b) such that

f (b) − f (a)
f 0 (c) = .
b−a

Geometrically, the theorem means that there is a point c ∈ (a, b) such that the
tangent to the graph of f at (c, f (c)) has the same slope as the secant through the
points (a, f (a)) and (b, f (b)). See the picture below.
88

Proof of Theorem 14.

(a) Let x1 , x2 be two points on [a, b] with x1 < x2 . We have to show that f 0 (a) > 0
implies f (x1 ) < f (x2 ). Note that all assumptions of the Mean Value Theorem
are satisfied on [a, b] and, in particular, on the subinterval [x1 , x2 ]. We have

f (x2 ) − f (x1 )
f 0 (c) = , for some c ∈ (x1 , x2 ).
x2 − x1

Now x2 − x1 > 0 and f 0 (c) > 0 so

f (x2 ) − f (x1 ) = (x2 − x1 )f 0 (c) > 0,

as required.

(b) and (c) can be proved using the same techniques. 2

There is also a ‘weak’ version’ of Theorem 14: If we replace f 0 (x) > 0 by the
weaker condition f 0 (x) ≥ 0 then we can still conclude that the function is (weakly)
increasing, and if f 0 (x) ≤ 0 then the function is (weakly) decreasing.

Example. Determine the intervals on which the following functions are strictly
increasing or strictly decreasing

(a) f (x) = x4 (b) f (x) = x2 − 5x + 6 (c) f (x) = ex (d) f (x) = x ln x.

Solution.
89

(a) f (x) = x4 is defined and differentiable throughout R. We have

f 0 (x) = 4x3 ,

so f 0 (x) > 0 for x > 0 and f 0 (x) < 0 for x < 0. That is,

x4 is strictly increasing for x ≥ 0, and


x4 is strictly decreasing for x ≤ 0.

(b) f (x) = x2 − 5x + 6 is defined and differentiable throughout R. We have

f 0 (x) = 2x − 5,
5 5
so f 0 (x) > 0 for x > and f 0 (x) < 0 for x < . That is
2 2
 
5
x2 − 5x + 6 is strictly increasing on , ∞ , and
2 
2 5
x − 5x + 6 is strictly decreasing on −∞, .
2

(c) The derivative of f (x) = ex is ex > 0. Therefore the function ex is strictly


increasing throughout R.

(d) f (x) = x ln x is defined and differentiable on (0, ∞). We have


1
f 0 (x) = 1 · ln x + x · , by the product rule.
x
i.e., f 0 (x) = 1 + ln x.

So f is strictly increasing when 1 + ln x > 0 i.e., ln x > −1. Since ea > eb


if and only if a > b (by part (c)), x = eln x > e−1 , so we finally have f (x) is
strictly increasing if
1
x ≥ e−1 = .
e
A similar argument leads to the conclusion that f (x) is strictly decreasing
1
when 0 < x ≤ . 2
e

1
♠ Exercises 37. a. Show that the function f (x) = x−5 is strictly decreasing on the
intervals (−∞, 5) and (5, ∞) but not on R \ {5}.
b. Show that the function f (x) = x3 is strictly increasing on (−∞, 0] and [0, ∞)
and hence on R.

Concavity

The concept of concavity of a function reflects the increase of the slope of the
tangents. As the tangents become steeper the graph of the function “bends up”. We
90

formalise this in the following way. Let f : [a, b] → R be a function. Let x0 < x < x1
be three points in [a, b] and y0 = f (x0 ), y = f (x) and y1 = f (x1 ). We call f concave
up 9 on the interval [a, b] if for any such choice of x0 , x, x1 the slope of the secant
through P0 (x0 , y0 ) and P (x, y) is not greater than the slope of the secant through
P (x, y) and P (x1 , y1 ). This is equivalent to saying that the secant through P0 (x0 , y0 )
and P1 (x1 , y1 ) lies above the graph of f . See sketch below

We formalise the statements from above. The equation of the secant through P0
and P1 is
y1 − y0
ysec = (x − x0 ) + y0 .
x 1 − x0
Therefore, the statement that the secant lies above the graph means
y1 − y0
f (x) = y ≤ ysec = (x − x0 ) + y0 .
x1 − x0
This is equivalent to
x1 − x x − x0
y≤ y0 + y1
x1 − x0 x1 − x0
x1 − x0 x − x0
y ≤ y0 + y1
x1 − x x1 − x
x − x0 x − x0
y(1 + ) ≤ y0 + y1
x1 − x x1 − x
x − x0
y − y0 ≤ (y1 − y)
x1 − x
y − y0 y1 − y
≤ .
x − x0 x1 − x
The latter inequality means that the slope of the secant through P0 and P is not
greater than the slope of the secant through P and P1 .

So far, no assumptions on the differentiability of the function f have been made.


We have just compared some quantities derived from three points on the graph of
9
The notion “concave up” is the same as “convex”.
91

f . We assume now that the function is concave up and differentiable on the interval
(a, b). Let now x0 < x < x∗ < x1 be four points in (a, b) and y0 , y, y ∗ , y1 be the
corresponding values of f . Then
y − y0 y∗ − y y∗ − y y1 − y ∗
≤ ∗ and ∗ ≤ .
x − x0 x −x x −x x1 − x ∗

Passing x0 → x in the left inequality yields


y∗ − y
f 0 (x) ≤
x∗ − x
and passing x1 → x∗ in the right inequality yields
y∗ − y
≤ f 0 (x∗ ),
x∗ − x
thus, for x < x∗ , f 0 (x) ≤ f 0 (x∗ ), that is, f 0 is increasing.

y−y0
♠ Exercises 38. Using the notation above, show that the strong inequalities x−x0
<
y1 −y
x1 −x
imply that f 0 is strictly increasing.

The converse statement below is again a consequence of the MVT.

Theorem 16. If f is differentiable on (a, b) and f 0 is increasing then f is concave


up.

Proof. Let x0 < x < x1 be three points in the interval (a, b). Then, by the
MTV, there exist c1 ∈ (x0 , x) and c2 ∈ (x, x1 ) such that
y − y0 y1 − y
= f 0 (c1 ) ≤ f 0 (c2 ) = . 2
x − x0 x1 − x

If a function f is two times differentiable, that is, its derivative f 0 has a derivative
itself then we can use this second derivative to detect increase of f 0 . The second
derivative is denoted by
d2 f
f 00 (x) = 2 .
dx
Derivatives of even higher order can be defined as long as the derivatives are still
differentiable. They are denoted by f 000 , f IV etc. (Roman numbers as superscripts),
3 n
or by f (4) , f (5) , . . . f (n) (Arabic numbers in parentheses), or by ddxf3 , . . . , ddxnf .

We have the following criterion.

Theorem 17. If f is differentiable twice on (a, b) then f is concave up if and only


if f 00 (x) ≥ 0.
92

The concept of concavity down is similar, just change the ≤ by ≥. Thus a


function is concave down if the slopes of the secants are decreasing, or, if the function
is differentiable, the derivative is decreasing, or, if the function is differentiable twice,
the second derivative is non-positive.

What happens between the concave up and concave down portions of a graph?
The point at which a graph changes from being concave up to concave down (or
vice versa) is known as a point of inflection. If the function has a continuous second
derivative on an interval where the graph changes from being concave up to concave
down then we must have f 00 (c) = 0 where c is the point of inflection.

Example. Determine the open intervals on which the following functions are con-
cave up or concave down.

(a) f (x) = x2 − 5x + 6 (b) f (x) = 2x4 − 3x2


(c) f (x) = x ln x (d) f (x) = xe−x .

Solution

(a) f (x) = x2 − 5x + 6
f 0 (x) = 2x − 5
f 00 (x) = 2 > 0.

The function is concave up throughout R.


93

(b)
f (x) = 2x4 − 3x2
f 0 (x) = 8x3 − 6x
f 00 (x) = 24x2 − 6
 
2 1
= 24 x − .
4

So we have f 00 (x) > 0 for |x| > 12 , i.e., x > 12 or x < − 12 , and f 00 (x) < 0 for
|x| < 12 . That means f is concave up for x ∈ (−∞, − 21 ) ∪ 21 , ∞ and concave


1 1
down for x ∈ − , .
2 2

There are points of inflection at x = ± 21 .

(c)
f (x) = x ln x
f 0 (x) = ln x + 1
1
f 00 (x) = .
x

Now the natural domain for f (x) is (0, ∞). On this domain f 00 (x) = 1
x
is
positive so f (x) is concave up on its entire domain.
94

(d) f (x) = xe−x


f 0 (x) = e−x − xe−x
f 00 (x) = xe−x − 2e−x
= e−x (x − 2).

Now ea is positive for any real number a, so the sign of f 00 (x) is determined by
the sign of (x − 2). We have f concave up for x ∈ (2, ∞) and concave down
for x ∈ (−∞, 2). There is a point of inflection at x = 2.

♠ Exercises 39.

1. Give the proofs for parts (b) and (c) of Theorem 14.

2. Determine the intervals on which the following functions are (i) increasing or
decreasing and (ii) concave up or concave down.
95

x2
(a) sin x (b) e− 2 (c) x3 − 9x2 + 24x
 π π
(d) ln(x2 − x + 1) (e) tan x, on − , .
2 2

3. (a) Show that f (x) = ex − x is an increasing function on [0, ∞). Hence


conclude that
ex ≥ 1 + x, for x ≥ 0.
(b) Show that
1
ex ≥ 1 + x + x2 , for x ≥ 0.
2
(c) Prove that
x2 x3 xn
ex ≥ 1 + x + + + ... + ,
2 3! n!
for any n ∈ N and x ≥ 0.
[Hint: Use induction.]

15 Application: Optimisation

When we model some process by a function we may be interested in finding the


input(s) for which the function takes its minimal or maximal value. In general, we
would like to find the absolute (or global) extrema of the function f , that is the
arguments for which the function attains the maximal or minimal values: xmax such
that
f (x) ≤ f (xmax )
for any x from the domain and xmin such that

f (x) ≥ f (xmin )

for any x from the domain of f . Such minimum or maximum may or may not exist
and if it exists, it may not be unique. We know, by Theorem 8, that any continuous
function on a closed interval [a, b] attains its extrema. In order to find the absolute
extrema the following notion of relative extrema is very useful.

A function f is said to have a relative (or local) maximum at a point


c ∈ R if there is a neighbourhood (a, b), with c ∈ (a, b) such that
f (c) is the maximum of f on (a, b), i.e., f (c) ≥ f (x), x ∈ (a, b).
Similarly, a function f is said to have a relative or local minimum
at c ∈ R if there is a neighbourhood (a, b), with c ∈ (a, b), such that
f (c) is the minimum of f on (a, b), i.e., f (c) ≤ f (x), x ∈ (a, b).
If f (x) has either a relative maximum or relative minimum at x = c
then f is said to have a relative extremum at x = c.
96

Relative extrema are points where the function is changing from increasing to
decreasing or vice versa. This is why these points are often referred to as turning
points. If the function is differentiable at the extremum x = c then we must have
f 0 (c) = 0. Indeed, if f has a relative maximum f (c) at x = c then there is a
neighbourhood (a, b) 3 c such that

f (x) ≤ f (c)

for x ∈ (a, b). Therefore,


f (x) − f (c)
≥0
x−c
for x < c and
f (x) − f (c)
≤0
x−c
for x > c. If we pass x to c from the left, i.e., for x < c we conclude that f 0 (c) ≥ 0,
whereas passing x to c from the right yields the conclusion f 0 (c) ≤ 0. This is only
possible if f 0 (c) = 0, as claimed. Geometrically, this means that the graph of f has
a horizontal tangent at its local extremum, provided the function is differentiable
at c. This observation allows us to look for local extrema by solving the algebraic
equation
f 0 (x) = 0. (9)
The solutions of equation (9) are called stationary points.

Of course, the other possibility is that the function is not differentiable at the
extremum. We combine stationary points and points of non-differentiability into
the notion of critical points.

Example. Find the critical points of the following functions and indicate if the
point is stationary or not.

(a) x2 − 4x + 1 (b) 1 − x2 (c) x e−x (d) |x| (e) x ln x (f) x4 .
97

Solution (a) f (x) = x2 − 4x + 1 is differentiable throughout R and we have f 0 (x) =


2(x − 2). So there is just one critical point, the stationary point x = 2.

(b) f (x) = 1 − x2 is defined and continuous on [−1, 1], it is differentiable only
−x
on (−1, 1) as f 0 (x) = √1−x 2 . So f is nondifferentiable at the two points x = ±1 of its

domain. At the points where f is differentiable, i.e., on (−1, 1), we have f 0 (x) = 0
at x = 0. So altogether we have three critical points, x = −1, 0, +1, one of which is
a stationary point, x = 0.

(c) f (x) = x e−x is differentiable throughout R, f 0 (x) = e−x (1 − x). So the only
critical points are stationary points. We find that f 0 (x) = 0 when x = 1. There is
one critical point, the stationary point x = 1.

(d) f (x) = |x| is continuous throughout R and differentiable on (−∞, 0) ∪ (0, ∞)


(i.e. everywhere except x = 0). On (0, ∞), |x| = x so f 0 (x) = 1, there can be no
critical points on (0, ∞). Similarly, on (−∞, 0), f (x) = |x| = −x so f 0 (x) = −1,
there can be no critical points on (−∞, 0). So there is just one critical point, the
point of nondifferentiability x = 0.

(e) f (x) = x ln x is defined and continuous on (0, ∞). We have

f 0 (x) = 1 + ln x ,

f is differentiable on (0, ∞). So f (x) is differentiable at all points of its domain,


then the only critical points are stationary points. We have that

1
f 0 (x) = 1 + ln x = 0 when x = e−1 = .
e

So the only critical point is the stationary point x = 1e .

(f) f (x) = x4 is differentiable throughout R. The only critical points are sta-
tionary points. We have

f 0 (x) = 4x3 = 0 when x = 0.

So there is just one critical point, the stationary point x = 0.

We have:

Theorem 18. If x = c is a relative extremum of a function f then x = c must be


a critical point of f .

Example. (a)
98

f has a relative minimum at x = 0, a stationary point.

(b)

f has a relative minimum at the point of non differentiability x = 0.

(c)
99

f (x) = sin x, x ∈ [−π, π] has a relative minimum at x = − π2 (a stationary point)


and a relative maximum at x = π2 (a stationary point).

(d)

f (x) = x3 , no relative extrema. Note however, that we do have f 0 (0) = 0.

Notice in all those cases where f is differentiable in a neighbourhood of the


extremum, the derivative f 0 (x) changes sign when passing the extremum.

This observation is generalised in the next theorem, which gives us a sufficient


criterion fir the point being an extremum. This theorem is called the First derivative
test.
Theorem 19 (First derivative test). Let f be continuous at a critical point x = c,
suppose also that f is differentiable in some neighbourhood (a, c) ∪ (c, b), a < b.
100

(a) If, on some neighbourhood (a, b) of c, we have f 0 (x) ≥ 0 for x ∈ (a, c) and
f 0 (x) ≤ 0 for x ∈ (c, b) then f has a relative maximum at x = c.

(b) If, on some neighbourhood (a, b) of c, we have f 0 (x) ≤ 0 for x ∈ (a, c) and
0
f (x) ≥ 0 for x ∈ (c, b) then f has a relative minimum at x = c.

Proof. (a) We have f 0 (x) ≥ 0 on (a, c) so f is increasing on this interval. So if


x ∈ (a, c) we have x < c and therefore f (x) ≤ f (c). In a similar fashion, on (c, b),
if f 0 (x) ≤ 0 then f is decreasing; we have for x ∈ (c, b) that x > c so f (x) ≤ f (c).
Hence, for any x ∈ (a, b) we have f (c) ≥ f (x), showing that x = c is a local
maximum.

(b) can be proved in the same way. 2

Example. Find the relative maxima and minima for the following functions.

(a) x3 − 3x2 + 3x (b) x4 (c) x ln x (d) x e−x .

Solution (a) f (x) = x3 − 3x2 + 3x is differentiable on all of R, so the only critical


points are stationary points. We have f 0 (x) = 3(x2 − 2x + 1), therefore f 0 (x) = 0,
when x = 1. Now we can write f 0 (x) = 3(x − 1)2 , so f 0 (x) does not change sign as
we pass the critical point x = 1. The function does not have any local maxima or
minima.

(b) f (x) = x4 is differentiable throughout R, so extrema will occur at stationary


points. We have
f 0 (x) = 4x3 = 0, when x = 0.
For x < 0, f 0 (x) = 4x3 < 0 and, for x > 0, we have f 0 (x) = 4x3 > 0. So, by our first
derivative test, f has a relative minimum at x = 0.

(c) f (x) = x ln x is defined on (0, ∞) and differentiable on (0, ∞). We have

f 0 (x) = ln x + 1 = 0

when x = 1e . Moreover,
f 0 (x) < 0
1
for x < e
and
f 0 (x) > 0
for x > 1e . Therefore, f has a relative minimum at x = 1e .

(d) f (x) = x e−x is differentiable throughout R. We have

f 0 (x) = e−x (1 − x) = 0
101

when x = 1. Moreover,
f 0 (x) > 0
for x < 1 and
f 0 (x) < 0
for x > 1. Therefore, f has a relative maximum at x = 1.

Testing whether or not f 0 (x) changes sign can at times be quite cumbersome.
There is another test for extrema, the second derivative test, which in many cases
is easy to implement. The second derivative test combines our understanding of
concavity with the results of this lecture to produce a simple test.

Theorem 20 (Second Derivative Test). Assume that f be differentiable in some


neighbourhood of c and twice differentiable at x = c.

(a) If f 0 (c) = 0 and f 00 (c) > 0 then x = c is a relative minimum for f .

(b) If f 0 (c) = 0 and f 00 (c) < 0 then x = c is a relative maximum for f .

(c) If f 0 (c) = 0 and f 00 (c) = 0 then x = c may be a maximum or a minimum or


neither of them.

Proof. We prove (b) leaving (a) and (c) as exercises.

(b) We have f 0 (c) = 0 and f 00 (c) < 0. We can choose a small neighbourhood of
0 0 (c)
c, say (a, b), such that f (x)−f
x−c
< 0 for all x ∈ (a, b). This means that the function
0
f (x) is strictly positive on (a, c) and hence f is strictly increasing. Similarly, for
x ∈ (c, b) we have x > c and so f 0 (x) is strictly negative and hence f becomes
strictly decreasing. We have shown that x = c is a local maximum for f . 2

Despite its popularity, the second derivative test has two major drawbacks: 1. As
will be seen in the examples below, the second derivative test may be inconclusive.
2. Computing the second derivative, e.g., for rational functions, can be very tedious.

Example. Repeat the previous example using the second derivative test.

Solution

(a)

f (x) = x3 − 3x2 + 3x
f 0 (x) = 3x2 − 6x + 3
f 00 (x) = 6x − 6
102

Notice f is twice differentiable throughout R. There was one stationary point at


x = 1, we have f 00 (1) = 6 × 1 − 6 = 0. The test is inconclusive, we cannot avoid
looking at the sign of f 0 (x) in this case.

(b) f (x) = x4 . Here f 0 (x) = 4x3 and f 00 (x) = 12x2 . The only stationary point is
x = 0 and f 00 (0) = 0, so again the second derivative test is inconclusive.

(c) f (x) = x ln x. Here f 0 (x) = 1 + ln x and f 00 (x) = x1 . From which we see that
f is twice differentiable on (0, ∞). We found one stationary point at x = 1e ; we have
f 00 ( 1e ) = e > 0. Which confirms that f has a local minimum at x = 1e .

(d)

f (x) = x e−x so that


f 0 (x) = e−x (1 − x) and
f 00 (x) = − e−x (2 − x)

The function is twice differentiable throughout R. We found one stationary point


at x = 1, and
f 00 (1) = − e−1 < 0,
which verifies the local maximum at x = 1. 2
103

16 Integration

The concept of differentiation was motivated by finding the instantaneous rate of


change of some process. It involves the function and a point from the domain. The
motivation of the concept of integration is the converse: we want to compute the
accumulation of some quantity with given rate of change over some interval from the
domain. This involves a function and an interval. Examples are the accumulation
of distance travelled with given velocity function over an interval of time or the area
accumulated under the graph of a function over some interval on the x-axis. We
start with an example of the latter kind.

Example. Find the area A enclosed by the x-axis, the parabola y = f (x) = x2 and
the vertical line x = 1.

Solution. We sandwich the region under the parabola between two simpler
figures, so that the area A of that region can be estimated from above and below.
See the sketch below.

The region under the parabola is included into the blue staircase figure that
consists of n rectangular bars of basis length n1 and height f ( nk ), where k is the
number of the bar. Notice that f ( nk ) is the maximum of the function on the interval
[ k−1
n
, nk ] since the function f is increasing. The area Ān of this staircase figure is
≥ A and equals
n  2 n
X 1 k 1 X 2
Ān = = 3 k .
k=1
n n n k=1

The red staircase figure is included into the region under the parabola and therefore
its area An ≤ A. The bars have also basis length n1 but height f ( k−1
n
), which is the
k−1 k
minimum of the function on the interval [ n , n ]. We have

n  2 n−1
X 1 k−1 1 X 2
An = = 3 k .
k=1
n n n k=1
104

Pn
The sum k=1 k 2 is the partial sum of the sequence of squares. The formula
n
X n
sn = k2 = (2n + 1)(n + 1)
k=1
6

can be verified by induction, but can also be derived as discussed earlier in this unit:
We have the derived sequences

an = n3 =⇒ a0n = an+1 − an = 3n2 + 3n + 1


bn = n2 =⇒ b0n = bn+1 − bn = 2n + 1
cn = n =⇒ c0n = cn+1 − cn = 1

Combining these together gives


1 3 1 n
sn−1 = (an − bn + cn ) = (2n − 1)(n − 1)
3 2 2 6
Hence
n
sn =
(2n + 1)(n + 1).
6
Since s1 = 1 = 12 , no additional constant needs to be added.

Now
1 1
Ān = (2n + 1)(n + 1), An = (2n − 1)(n − 1).
6n2 6n2
We have
An ≤ A ≤ Ān
and
1
lim An = lim Ān = .
n→∞ n→∞ 3
By the squeeze theorem if follows A = 13 . This method had already been used by
ancient Greek mathematician Archimedes. In modern notation we write
Z 1
1
x2 dx = .
0 3

This is the (definite Riemann) integral of x2 from 0 to 1.

We can use the same method to find the area A(b) enclosed by the parabola
y = x2 , the x-axis and the vertical line x = b. In this case
n n  2
2
b3 X k b3

bX bk
Ān = = = 2 (2n + 1)(n + 1)
n k=1 n
n k=1 n 6n
n  2 n−1  2
b X b(k − 1) b3 X k b3
An = = = 2 (2n − 1)(n − 1)
n k=1 n n k=1 n 6n
105

We get
b3
A(b) = .
3
We write
b
b3
Z
x2 dx = .
0 3
2
This is the integral of x from 0 to b with variable upper limit b. We can interpret this
as a new function F (b) that tells us how the area accumulates under the parabola
as we travel from 0 to b. The value of the integrand y = x2 gives the rate at which
this accumulation occurs.

♠ Exercises 40. Apply the same procedure as above to the function f (x) = x.
Compare the function F (b) with the elementary formula for the area of a triangle
enclosed by y = x, the x-axis and the vertical line x = b.

We generalise this approach now to arbitrary bounded functions f : [a, b] → R.


Let xk = a + nk (b − a). Then

a = x0 < x1 < · · · < xn−1 < xn = b (10)

is an equidistant partition of the interval [a, b]. We call


n
X b−a
An = inf f (x)
k=1
n x∈[xk−1 ,xk ]

the lower Darboux sum for f (x) subject to the partition (10). If f is non-negative
then An is a lower bound of the area enclosed by the graph of f (x), the x-axis and
the vertical lines x = a and x = b.

Similarly, we define the upper Darboux sums:


n
X b−a
Ān = sup f (x),
k=1
n x∈[xk−1 ,xk ]

which give an upper bound of the area enclosed by the graph of f (x), the x-axis
and the vertical lines x = a and x = b.

If the limits
lim An and lim Ān
n→∞ n→∞

both exist and are equal then this common limit is called the definite Riemann
integral of f (x) from a to b, denoted by
Z b
f (x) dx.
a

This integral assigns to an interval [a, b] and an integrand f (x) a number.


106

The integral always exists if the integrand is continuous on the interval of in-
tegration [a, b]. We outline a sketch of the proof, which relies on a result to be
established in Pmth331 in year 3.

Theorem 21. If f : [a, b] → R is continuous on [a, b] then it is uniformly continuous,


that is

∀ε > 0 ∃δ > 0 such that ∀x, x0 ∈ [a, b] with |x − x0 | < δ, |f (x) − f (x0 )| < ε.

Here the constant δ depends only on ε but not on x0 as in the case of common
continuity at x0 .

Theorem 22. If f : [a, b] → R is continuous on [a, b] then the definite integral


Z b
f (x) dx
a

exists.

Proof. We have two sequences of Darboux sums, namely An and Ān . Clearly,

(b − a) inf f (x) ≤ An ≤ Ān ≤ (b − a) sup f (x).


x∈[a,b] x∈[a,b]

We show that Ān − An → 0 as n → ∞. Indeed,

∀ε > 0 ∃δ > 0 such that ∀x, x0 ∈ [a, b] with |x − x0 | < δ, |f (x) − f (x0 )| < ε.

b−a
If we choose n > δ
then

sup f (x) − inf f (x) ≤ ε


[xk−1 ,xk ] [xk−1 ,xk ]

and hence
n
b−aX
Ān − An = ( sup f (x) − inf f (x)) ≤ ε(b − a).
n k=1 x∈[xk−1 ,xk ] x∈[xk−1 ,xk ]

If the sequence An was increasing and Ān was decreasing we would have a con-
tracting family of nested intervals, which would contract to the common limit. Un-
fortunately, this is not the case. However, a little trick helps. Consider the subse-
quences A2n and Ā2n . Then each consecutive partition is obtained from the previous
partition by adding the mid points. That is, the interval [xk−1 , xk ] becomes bisected
into [xk−1 , xk −x2 k−1 ] and [ xk −x2 k−1 , xk ]. Now

inf
x −x
f (x) ≥ inf f (x), inf
xk −xk−1
f (x) ≥ inf f (x).
x∈[xk−1 , k k−1
] x∈[xk−1 ,xk ] x∈[ ,xk ] x∈[xk−1 ,xk ]
2 2
107

and therefore
b−a b−a b−a
inf f (x) n+1
+ x −xinf f (x) n+1 ≥ inf f (x) n
x∈[xk−1 ,
x −x
k k−1
] 2 x∈[ k k−1 ,xk ] 2 x∈[xk−1 ,xk ] 2
2 2

hence
A2n+1 ≥ A2n .
This is illustrated in the picture below.

Analogously,
Ā2n+1 ≤ Ā2n .
The closed intervals [A2n , Ā2n ] are nested and contract to the common limit of the
ends, which is Z b
f (x) dx, 2
a

♠ Exercises 41. Give an example of a function for which A3 > A2 . Hint. Consider
the function (
0 for x ∈ [0, 12 )
f (x) =
1 for x ∈ [ 21 , 1].

One can prove that for any continuous function f : [a, b] → R and any sequence
of partitions
a = x0 < x1 < · · · < xn−1 < xn = b
the so-called Riemann sums
n
X n
X
f (x∗k )(xk − xk−1 ) = f (x∗k )∆xk ,
k=1 k=1

where x∗k ∈ [xk−1 , xk ] is any intermediate point and ∆xk = xk − xk−1 , tend to the
integral Z b
f (x) dx,
a
108

as long as the maximal length of the partition intervals maxk=1,...,n ∆xk tends to 0.

♠ Exercises 42. Compute the integral from a to b of a constant function f (x) = k.

Example. Show that the Dirichlet function does not have a definite Riemann
integral from 0 to 1.

Solution. For any partition 0 = x0 < x1 < · · · < xn = 1 we have


n
X
An = 0 · ∆xk = 0,
k=1

since between any xk−1 < xk there is an irrational number. Therefore,

lim An = 0.
n→∞

On the other hand n


X
Ān = 1 · ∆xk = 1,
k=1

since between any xk−1 < xk there is a rational number. Therefore,

lim Ān = 1.
n→∞

Since the limits are different, the definite integral does not exist.
109

17 Properties of the definite integral

We derive some properties of the definite integral.

1. Linearity of the integral. If f (x) and g(x) are continuous on [a, b] and c
is any constant, then

Z b Z b Z b
(i) [f (x) + g(x)] dx = f (x) dx + g(x) dx,
a a a
Z b Z b
(ii) cf (x) dx = c f (x) dx.
a a

The plausibility of (i) can be seen by considering a Riemann sum for f (x) + g(x)
n
X
over [a, b]. We get [f (x∗k ) + g(x∗k )] ∆xk which can be split up as
k=1
n
X n
X n
X
[f (x∗k ) + g(x∗k )] ∆xk = f (x∗k )∆xk + g(x∗k )∆xk .
k=1 k=1 k=1
Rb
Taking limits, the first sum tends to a
[f (x) + g(x)]dx and the others tend to
Rb Rb
a
f (x) dx and a g(x) dx, respectively.

The argument for (ii) is similar.

2. Comparison principle.

(i) If f (x) ≤ g(x) for a ≤ x ≤ b then


Z b Z b
f (x) dx ≤ g(x) dx.
a a

For any partition the upper Darboux sum for f will be less than or equal to
the corresponding upper Darboux sum for g. By passing to the limit we get
the desired relation for the integral.

(ii) If m ≤ f (x) ≤ M for all x in [a, b], then


Z b
m(b − a) ≤ f (x) dx ≤ M (b − a).
a

This follows from (i) because if m ≤ f (x) ≤ M then


Z b Z b Z b
m dx ≤ f (x) dx ≤ M dx
a a a
Rb
i.e., m(b − a) ≤ a
f (x) dx ≤ M (b − a).
110

(iii) The following Mean Value Theorem of Integral Calculus is a consequence of


(ii). If f is continuous on [a, b] and m and M are the minimum and maximum
of f respectively, then there exists c ∈ [a, b] such that
Z b
f (x) dx = f (c)(b − a).
a

This follows from the intermediate value theorem for the continuous function
(b−a)f . For non-negative functions the Mean Value theorem has the following
geometric interpretation: The area under the curve of the function equals the
area of the rectangle with basis b − a and height h = f (c).

(iv) If a function f (x) : [a, b] → R is integrable then |f (x)| is integrable as well and
Z b Z b
f (x) dx ≤ |f (x)| dx.
a a

If f is bounded and has only finitely many discontinuities then this is also true
for |f | and then |f | is integrable. It would be a bit more involved to show that
|f | is integrable just assuming that f is. The inequality follows now from

−|f (x)| ≤ f (x) ≤ |f (x)|

and hence Z b Z b Z b
− |f (x)| ≤ f (x) ≤ |f (x)|
a a a
that is Z b Z b
f (x) dx ≤ |f (x)| dx.
a a

(v) In applications we often work with approximate data, i.e., instead of a function
f we work with a function g that is close to f in the sense that |f (x)−g(x)| ≤ δ
for any x ∈ [a, b]. It follows then from (ii) and (iv) that the definite integrals
of f and g are close to each other. More precisely,
Z b Z b Z b
f (x)dx − g(x)dx = f (x) − g(x) dx
a a a
Z b
≤ |f (x) − g(x)|dx ≤ δ(b − a).
a
111

Notice that this means continuity of the application of the definite integral (as
a function) on an integrable function (as the argument). Indeed, we can make
Z b Z b
f (x)dx − g(x)dx < ε
a a
ε
by choosing f and g such that they are δ-close, where δ = b−a . This is in
contrast to differentiation: The derivatives of f and g need not be close no
matter how close f and g are to each other. We will return to this topic in
MTHS130.

3. Oriented area

The concept of oriented area allows the area becoming a negative number that
carries additional information. The absolute value of the oriented area is equal to
the traditional non-negative are and the sign indicates whether the contour sur-
rounding the area is traversed counterclockwise (positive) or clockwise (negative).
The orientation of an area under (or above) a curve y = f (x) above (or under) the
x-axis is determined by the orientation of the x-axis. This agrees with the definite
integral being positive or negative depending on whether the area is above or below
the x-axis. This is illustrated in the picture below:

FEI
III

Δ
Changing the orientation of the contour by switching the bounds of the interval
[a, b] to [b, a] reverses the orientation of theiii
surrounding contour. Therefore, it makes
III
sense to define FEI
III Z a Z b
f (x) dx = − f (x) dx.
b a

iii
III

In particular, also
Z a Z a
f (x) dx = − f (x) dx = 0.
a a
112

4. Splitting of the interval of integration

If f (x) is continuous on an interval containing a, b, c then


Z b Z c Z b
f (x) dx = f (x) dx + f (x) dx (11)
a a c

In the diagram, for a < c < b, the total area from a to b is the sum of two areas:
the area from a to c and the area from c to b.

It is an advantage of the convention


Z a Z b
f (x) dx = − f (x) dx.
b a

that the relation 11 remains true even if c does not lie between a and b (or if a > b).

It is another consequence of splitting the interval of integration that a function


f : [a, b] → R is also integrable if it has finitely many points of discontinuity, as long
as it is bounded (say |f | ≤ K). We just need to split the interval into subintervals
so that the common length of the subintervals that contain discontinuities is smaller
ε
than 2K . Then the contribution of those subintervals to the definite integral can be
made smaller than ε and therefore does not contribute to the integral.

Miscellaneous Worked Examples.

(i) Which, if any, of the expressions


Z 3 Z 3 2 Z 3
x2 z u2
dx, dz, du
1 1+x 1 1+z 1 1+u

are equal?
113

Answer: They are all equal since they differ only in the dummy variables.
Z 2 Z 2
(ii) True or false: xf (x) dx = x f (x) dx.
1 1

Answer: False.
Z 2 Z 2
(iii) True or false: 5f (x) dx = 5 f (x) dx.
1 1

Answer: True. (A constant can be moved out to the front of an integral but not
a function.)

(iv) True or false:

Z b Z b Z b
(a) [x + f (x)] dx = x dx + f (x) dx.
a a a
Z b Z b Z b
(b) xf (x) dx = x dx f (x) dx.
a a a
Z b Z b Z b
(c) αf (x) dx = α dx f (x) dx.
a a a

n
! n Z
Z 1 X X 1
k
(d) x dx = xk dx.
0 k=1 k=1 0

Answers: True, False, False, True.


114

18 The Fundamental Theorem of Calculus

The computation of integrals as limits of Riemann sums is very tedious and usually
requires a formula for the partial sums, which may not be readily available. The
Fundamental Theorem of Calculus relates integration and differentiation as inverse
operations and gives us a convenient tool to compute integrals by algebraic rules
that are based on inverting differentiation. Although methods of integration and
differentiation were already known in ancient India and Greece, the relation between
them was only discovered by Newton and Leibniz in the 17th century.

In the following discussion we will consider definite integrals as functions of the


upper limit of integration. Therefore we want to reserve the variable x for the upper
limit of integration, so we will use another letter t for the “dummy” variable within
the integral.

Consider the function Z x


G(x) = f (t) dt,
c

where f (t) is continuous on [a, b] and c, and x are in [a, b]. Geometrically, G(x) is
the area under the curve y = f (t), above the t-axis and between c and x. We think
of c as fixed and of x as moving. Thus G(x) describes the process of accumulation
of area under the curve as x changes. Intuitively, the function f gives the rate
of change of this accumulation. We make this intuition precise by calculating the
derivative of the function G(x). Let x + h also lie in [a, b]. Then
Z x+h Z x
G(x + h) − G(x) = f (t) dt − f (t) dt
c c
Z x+h
= f (t) dt, using the splitting property,
x
= f (x∗ )[(x + h) − x] = f (x∗ )h,
115

by the MVT for integrals, where x∗ is between x and x + h. Hence


G(x + h) − G(x)
= f (x∗ ), h 6= 0.
h
We now take the limit as h −→ 0. The number x∗ tends to x as h −→ 0 and, by
the continuity of f , the number f (x∗ ) tends to f (x) as h −→ 0. Thus
G(x + h) − G(x)
G0 (x) = lim = f (x).
h→0 h
We have just proved the first part of the Fundamental Theorem of Calculus
(FTC):
Rx
Theorem 23. The function G(x) = c f (t)dt is differentiable (in particular con-
tinuous) on (a, b) and

Z x
d
f (t) dt = f (x).
dx c

For the second part of the Fundamental Theorem of Calculus we need the notion
of a primitive of a function. Any function F (x), such that F 0 (x) = f (x) is called a
primitive or antiderivative of f (x). Thus
Z x
G(x) = f (t)dt
c

is an antiderivative of f (x).

If F (x) is an antiderivative of f then, for any constant C, F (x) + C is also


an antiderivative of f . The converse is also true if the domain of f is an interval.
Indeed, let F1 and F2 be two antiderivatives of f . Then
d
(F1 − F2 ) = f − f = 0.
dx
By Theorem 14 part (c) then F1 − F2 is a constant C, thus F1 = F2 + C. Notice
that, if the domain of f is not connected (i.e., it consists of two or more intervals)
then one can add different constants at different intervals.

The set of all antiderivatives of a function f is called the indefinite integral of


f . We write Z
f (x) dx.

Example. Z
1
x2 dx = x3 + C
3
116

because  
d 1 3
x +C = x2 .
dx 3

We can now formulate the second part of the Fundamental Theorem of Calculus,
which is our main tool for computing definite integrals.

Theorem 24. Let f : [a, b] → R be a continuous function and let F (x) be any
antiderivative of f . Then
Z b
f (x) dx = F (b) − F (a).
a

Instead of F (b) − F (a) we also write

[F (x)]ba or F (x)|ba .

Proof. Let F (x) be an arbitrary antiderivative of f . Then

F (x) = G(x) + C

where Z x
G(x) = f (t) dt
a
and C is some constant. Then
Z b
f (x) dx = G(b) − G(a) = G(b) + C − (G(a) + C) = F (b) − F (a). 2
a

R3
Example. Compute 1
ex dx.

d x
Since dx
e = ex , we find Z
ex dx = ex + C.

By the FTC then Z 3


ex dx = ex |31 = e3 − e.
1

This method becomes more efficient the more antiderivatives we know.


117

19 Indefinite Integrals

Any known derivative and any rule of differentiation gives us an antiderivative or a


rule of (indefinite) integration. Any rule for integration can be verified by differen-
tiating it.

1. Power functions. The rule


d p
x = pxp−1
dx
is equivalent to
d 1 p
x = xp−1
dx p
and, for n = p − 1,
d 1
xn+1 = xn .
dx n + 1
Therefore,

1
R
xn dx = n+1
xn+1 + C, if n 6= −1.

If n is negative the domain of the integrand is not connected and the constant
C can be chosen different in (−∞, 0) and (0, ∞).

For the case n = −1 we recall that


d 1
ln x = .
dx x
1
Since the natural domain of ln x is (0, ∞) this gives the indefinite integral of f (x) = x
only for positive x. However, by the chain rule
d 1 1
ln(−x) = − = .
dx −x x
This can be combined into
d 1
ln |x| = ,
dx x
for x 6= 0, which is the natural domain of f (x). Hence,

1
R
x
dx = ln |x| + C.

2. Trigonometric functions and their inverses. From the table of deriva-


tives we get
118

Z
sin x dx = − cos x + C
Z
cos x dx = sin x + C
Z
1
dx = tan x + C
cos2 x
Z
1
√ dx = arcsin x + C
1 − x 2
Z
1
dx = arctan x + C.
1 + x2
We will add more indefinite trig integrals to this table as more advanced techniques
of integration become available.

d x
3. Exponential functions. From dx
a = ax ln a we get

ax
R
ax dx = ln a
+ C.

4. Linearity. It follows from the linearity of definite integrals that, for any two
integrable functions f and g and any constant k,
Z Z Z
(f + g) dx = f (x) dx + g(x) dx
Z Z
kf (x) dx = k f (x) dx

5. Substitution rule. There is no simple rule for integrating products of


functions. For certain products the chain rule of differentiation gives an integration
rule. Chain rule results in products of the form f (g(x)) · g 0 (x), where one factor is a
composite function and the other factor is the derivative of the inside function. In
this case

f (g(x))g 0 (x) dx = F (g(x)) + C,


R

where F is an antiderivative of the outside function f .

Since g 0 (x) dx is nothing but the differential of g we can write


Z Z
0
f (g(x))g (x) dx = f (g) dg,

meaning that we just integrate f as a function of the independent variable g.


119

R 2
Example. Compute the indefinite integral 2xex dx.

Solution. The integrand is a product of the form f (g(x))g 0 (x) with f (y) = ey ,
g(x) = x2 and g 0 (x) = 2x. Therefore,
Z
2 2
2xex dx = ex + C.

We can verify by differentiation using chain rule


d x2 2
(e + C) = 2xex .
dx

Sometimes, a minor modification can transform a product into the required form
as in the example below:
R
Example. Compute the indefinite integral x2 sin(x3 ) dx.

Solution. In this case x2 is not exactly the derivative of the inside function x3 ,
but multiplying by 3 fixes this and can be easily compensated by division by 3.
Z Z
2 3 1 1
x sin(x ) dx = 3x2 sin(x3 ) d = − cos(x3 ) + C.
3 3
Again we verify this by differentiation using chain rule
d 1 1
(− cos(x3 ) + C) = − 3x2 (− sin(x3 )) = x2 sin x3 .
dx 3 3

The following two special cases occur often:

R F (ax+b)
f (ax + b) dx = a
+ C,

where F is an antiderivative of f and g(x) = ax + b is a linear function.

eax dx = a1 eax + C
R
Example.

The other special case is:

R g 0 (x)
g(x)
dx = ln |g(x)| + C.

Here the outside function is f (y) = y1 with antiderivative F (y) = ln |y|. This
approach works for quotients, where the numerator is the derivative of the denomi-
nator.
120

2x
R
Example. x2 −1
dx = ln |x2 − 1| + C.

sin x
This approach also yields the antiderivative of tan x = cos x
. Here the derivative
of the denominator is the negative of the numerator.

− sin x
Z Z
sin x
dx = − dx = − ln | cos x| + C.
cos x cos x

Thus,

R
tan x dx = − ln | cos x| + C.

The substitution rule is a consequence of the same chain rule from differentiation
from a slightly different point of view. Sometimes we encounter integration problems
where the product structure of the integrand is hidden or the integrand is not a
product but an expression that involves some inner function u = g(x). If g(x) is
invertible on the integration interval, then x = h(u) and dx = h0 (u)du and we can
transform the integral in the following way
Z Z
f (x)dx = f (h(u))h0 (u)du.

To use this rule:

(i) Make a choice for x = h(u).

dx
(ii) Calculate dx = du
du.

(iii) Convert to a u integral and evaluate.

(iv) Convert back to an expression in x using u = g(x).

This rule is the most sophisticated integration rule. The right choice of sub-
stitution is often a matter of trial and error, or luck (or experience). Sometimes
substitution rule does not lead to the solution but to another integration problem
that can be solved by other methods.
Z
x
Example. Find √ dx by substituting x = u + 1.
x−1

Solution. Here we expect a simplification by the substitution x − 1 = u. Hence


x = u + 1 and dx = du.
121

Z Z
x u+1
√ dx = √ du
x−1 u
Z
1 1
= (u 2 + u− 2 )du
2 3 1
= u 2 + 2u 2 + C
3
2 3 1
= (x − 1) 2 + 2(x − 1) 2 + C.
3

We will learn more methods of integration in MTHS130, namely integration by


parts (which is the counterpart of the product rule of differentiation) and integration
of rational functions, using the algebraic theory of partial fractions.

Worked Examples.


Z
(i) Find x x + 1 dx.
√ √
Solution. The substitution u = x + 1 will remove the sign. Since x =
2
u − 1 we have dx = 2u du and

Z Z
x x + 1 dx = (u2 − 1)u2u du
Z
= 2 (u4 − u2 ) du
 5
u3

u
=2 − +C
5 3
2 2
= (x + 1)5/2 − (x + 1)3/2 + C.
5 3
Z a/2
dx
(ii) Use the substitution x = a sin θ to evaluate √ , a > 0.
0 a − x2
2

Solution. Let x = a sin θ, dx = a cos θ dθ. Also,


√ p p
a2 − x2 = a2 − a2 sin2 θ = a 1 − sin2 θ
= a cos θ.

We also need to change the limits of integration accordingly. When θ = 0, x =


0, and when θ = π6 , x = a2 . Hence,
Z a/2 Z π/6
dx a cos θ π
√ = dθ = .
0
2
a −x 2
0 a cos θ 6

Remark. A substitution x = a sin θ is worth a try where the integrand has



a term a2 − x2 . As in the above working, this term is changed to cos θ and
the resulting integrand may be easier to evaluate.
122

Z
x dx
(iii) Find √ .
1 + x2
Solution: Put u = 1 + x2 , du = 2x dx. Thus x dx = 12 du, and
Z
x dx
Z
du √ √
√ = √ = u + C = 1 + x2 + C.
1 + x2 2 u

Z 4 √
(iv) Find 2x 9 + x2 dx.
0

Solution: Let u = 9 + x2 , du = 2x dx. When x = 0, u = 9, and when


x = 4, u = 25. Hence
25
4 √ 25
Z Z 
1 2 2 3  234
2x 9 + x2 dx = u du = u3/2
2 = 5 − 23 = .
0 4 3 4 3 3

Z
(v) Justify 2x cos(x2 + 1) dx = sin(x2 + 1) + C.

d
Justification: sin(x2 + 1) = cos(x2 + 1) · 2x.
dx
Z
(vi) Find (3x2 + 2)(x3 + 2x + 1)1/2 dx.

Solution: Put u = x3 + 2x + 1, du = (3x2 + 2) dx,


Z
2 2
I= u1/2 du = u3/2 + C = (x3 + 2x + 1)3/2 + C.
3 3

d 2 3
Justification: (x + 2x + 1)3/2 = (x3 + 2x + 1)1/2 (3x2 + 2).
dx 3
Z 2
dx
(vii) Find √ by making the substitution x2 = u1 . (This example
2 2
5x − 4
1 x
is a bit difficult, but it illustrates the point that once you have hit upon a
substitution to try, the methods are the same as in earlier easier examples.)

Solution:

1 1
x2 = , u= ,
u x2
1
x = u−1/2 , dx = − u−3/2 du.
2
123

When x = 1, u = 1, and when x = 2, u = 41 .


1
2
− 12 u−3/2 du
Z Z
dx 4
√ = q
1 x2 5x2 − 4 1 1 5
−4
u u
Z 1
1 4 du
=− √
2 1 5 − 4u
  14
1 1
= (5 − 4u) 2
4 1
1 h√ i 1
= 4−1 = .
4 4
124

20 Applications of Integral calculus

1. Areas of Plane Regions


Z b
We saw before that f (x) dx gives the area under f (x) between x = a and
a
x = b if f (x) ≥ 0 for a ≤ x ≤ b. If f (x) ≤ 0 for a ≤ x ≤ b then the integral is
negative and its absolute value gives the area between the curve, the x-axis and the
vertical lines x = a and x = b.

Example: Find the area enclosed by the curve


y = x3 , the x-axis, and the lines x = −1 and
x = 1.

Solution: Note that x3 ≤ 0 for x ≤ 0, and


x3 ≥ 0 for x ≥ 0, so the required area is
Z 0 Z 1
3
A= x dx + x3 dx
−1 0
4 0
1
x4
  
x
= +
4 −1 4 0

−1 1
= +
4 4
1
= .
2

Example: Find the area bounded by the curves y = x2 and y = −x2 + 4x.

Solution: The curves intersect at (0, 0) and (2,4). The curve y = −x2 + 4x lies
above the curve y = x2 for 0 ≤ x ≤ 2.
125

Z 2
Since (−x2 + 4x) dx gives the area between the x-axis and y = −x2 + 4x, while
Z 2 0

x2 dx gives the area between the x-axis and y = x2 , the required area is
0

Z 2 Z 2
2
A= (−x + 4x) dx − x2 dx
Z0 2 0

= (−2x2 + 4x) dx
0
 2
2 3 2
= − x + 2x
3 0
8
= .
3

In general, if y = f1 (x) and y = f2 (x)


intersect at x1 and x2 , the area enclosed
between the curves (between x1 and x2 ) is
Z x2
A= |f1 (x) − f2 (x)| dx,
x1

and this quantity is positive.

More generally, the area enclosed between the curves y = f1 (x), y = f2 (x) and
the lines x = a and x = b is

Z b
A= |f1 (x) − f2 (x)| dx.
a

Using this, we offer an alternative solution to the first example...

Example. Find the area enclosed by the curve y = x3 , the x-axis, and the lines
x = −1 and x = 1 (refer to diagram on previous page).

Solution. Putting f1 (x) = x3 , f2 (x) = 0, a = −1 and b = 1 in the equation above,


126

and noting that |x3 | = −x3 when x ≤ 0, the required area is


Z 1
A = x3 dx
−1
Z 0 Z 1
3
= −x dx + x3 dx
−1 0
 4
0  4 1

−x x
= +
4 −1 4 0
1
= .
2

Example (Area of a Circle). The circle cen-


tred at the origin and with radius a has the equa-
tion x2 + y 2 = a2 . How do we find its area using
integration? The upper half of the circle has the

equation y = a2 − x2 so the required area is
Z a√
A=2 a2 − x2 dx.
−a

The trick here is the substitution x = a sin θ, dx =


−π
a cos θ dθ. When θ = , x = −a, and when
2
π
θ = , x = a. Hence
2
Z π/2 p
A=2 a2 − a2 sin2 θa cos θ dθ
−π/2
Z π/2
2
= 2a cos2 θ dθ.
−π/2

The term cos2 θ can be changed to a term involving cos 2θ (which is easier to inte-
grate) by using the rule cos 2θ = 2 cos2 θ − 1. Hence 2 cos2 θ = 1 + cos 2θ and
Z π/2
2
A=a (1 + cos 2θ) dθ
−π/2
 π/2
2 sin 2θ
=a θ+
2 −π/2
2 π/2
=a [θ]−π/2 (since sin π = sin(−π) = 0)
  
π −π
= a2 −
2 2
= πa2 .

2. Finding Volumes
127

Cavalieri’s principle

Cavalieri’s principle states that if two bodies have the same height and their cross
sections by horizontal planes at each height level have equal area then the two bodies
have equal volume.

This principle is traditionally used to determine volumes by elementary means.

To prove Cavalieri’s principle we choose a partition h0 , h1 , . . . , hN of the height


interval [a, b] and slice the bodies by horizontal planes at heights hi and hi−1 . The
slices are approximately cylinders of height ∆hi = hi − hi−1 . Their volume is
approximately the product of the area of a cross section A(h∗i ) and the height ∆hi .
Hence the volume of the body is approximately
N
X
A(h∗i )∆hi .
i=1

The exact value is again given by the integral


Z b
A(h)dh
a

which depends only on the area of the cross sections.

Example. The volume of a cone. Consider a cone of height h based on a disk


of radius r. Then the cross-section at height x is a disk of radius h−x h
r, hence its
h−x 2 h−x 2 2
areas is A(x) = ( h ) A(0) = ( h ) · 2πr . Compare this to a pyramid of the same
height h based on a triangle of area 2πr2 . Then the area of a cross-section at height
x will be A(x) = ( h−x
h
)2 A(0) as for the cone.

Hence, according to Cavalieri’s principle the volume of the cone equals to the
volume of the pyramid which is known to be h3 A(0)10 . We find the volume of the
10
This can be found by cutting a prism of height h with triangular base into three pyramids of
equal volume.
128

cone
πr2 h
V = .
3

The volume of a hemisphere (and hence a sphere) of radius r. Consider a


cylinder of radius r and height r from which an upside-down cone of radius r and
height r is cut out. Then any cross section by a horizontal plane at height x is an
annulus of outer radius r and inner radius x, hence its area equals π(r2 − x2 ). On
the other hand a cross section of the hemisphere by a horizontal plane at height x

is a disk of radius r2 − x2 , hence its area equals π(r2 − x2 ) as well.

Using Cavalieri’s principle we conclude that the volume of the hemisphere equals
the volume of the cylinder (πr3 ) minus the volume of the removed cone ( 13 πr3 ).
Hence the volume of the hemisphere is 23 πr3 .

Cones and spheres are solids of revolution. We will reprove the obtained formulae
as more general formulae for the volumes of solids of revolution.

Rotation about the x-axis


129

Suppose the region R in the xy-plane under the curve y = f (x) between x = a and
x = b is rotated 360◦ around the x-axis to give the solid of revolution S.

Partition [a, b] by points xk and let ∆xk = xk −xk−1 . The strip of width ∆xk when
rotated about the x-axis produces a disc of width ∆xk and radius approximately
f (xk ). The volume of this disc is approximately
∆Vk ≈ π [f (xk )]2 ∆xk .
Summing up we get
n
X
V ≈ π [f (xk )]2 ∆xk .
k=1

This is a Riemann sum where x∗k = xk , the right endpoint. For continuous f the
Z b
sum on the right hand side approaches the integral π [f (x)]2 dx, as max ∆xk −→
a
0. Hence the volume of V of the region S is given by
Z b Z b
2
V =π [f (x)] dx = π y 2 dx.
a a

Example (Volume of a cone, alternatively): Let y = mx, 0 ≤ x ≤ h. Rotating


this line segment about the x-axis gives a cone of hight h and radius r = mh.

Solution: h
h
x3 πm2 h3 πr2 h
Z 
2 2
V =π (mx) dx = m π = = .
0 3 0 3 3


Example (Volume of a sphere, alternatively): Let f (x) = a2 − x2 for −a ≤
x ≤ a. If this curve is rotated about the x-axis, we obtain a sphere of radius a whose
volume is

Z a
V =π [f (x)]2 dx
Z−aa
a2 − x2 dx


−a a
2 x3
=π a x−
3 −a
a3 (−a)3
   
2 2
=π a a− − a (−a) −
3 3
 3 3

2a 2a
=π +
3 3
4
= πa3 .
3
130

Rotation about the y-axis

Consider the same region R as before, but this time rotate it around the y-axis. The
strip with width ∆xk sweeps out a cylindrical shell whose outer radius is xk . Hence
its outer circumference is 2πxk . The shell has width ∆xk and height f (xk ). Hence
its volume is approximately

∆Vk ≈ πx2k f (xk ) − π(xk − ∆xk )2 f (xk ) ≈ 2πxk f (xk )∆xk .

Here we have used that for small ∆xk the expression (∆xk )2 is so small that it can
be neglected.

Adding these together we get


n
X
V ≈ 2πxk f (xk )∆xk .
k=1

For continuous f , this sum has a limit as max ∆xk −→ 0. The required volume is
Z b Z b
V = 2πxf (x) dx = 2π xy dx.
a a

Example (Volume of a cone, third version): Let y = h − hr x, 0 ≤ x ≤ r.


Rotating the triangle formed by this line segment and the coordinate axes about
the y-axis gives a cone of hight h and radius r.

Solution:
r  2 r
x3 r2 πr2 h
Z
h x
V = 2π x(h − x) dx = 2πh − = 2πh = .
0 r 2 3r 0 6 3
131

21 The natural logarithm

Definition of the natural logarithm

1
The function f (t) = t
is a continuous for t > 0 and hence the function
Z x
1
F (x) = dt (12)
1 t

is well defined for x > 0. Without having a rigorous notion of the logarithm we
gave a handwavy argument that the function F (x) = ln x. We give now a rigorous
treatment of logarithmic and exponential functions by adopting the function (12)
as the definition of the natural log function. Then we prove that it satisfies the
properties we expect from ln x.

Properties of the Logarithm

(i) Derivative of ln x :

d 1
ln x = .
dx x
This follows from the definition of ln x and the Fundamental Theorem of Cal-
d
Rx
culus, dx a
f (t) dt = f (x).

(ii) Logarithm of 1: Z 1
dt
ln 1 = = 0.
1 t
(iii) Logarithm of a product:
d 1
Let x, b > 0. Then dx (ln bx) = bx ·b = x1 . Thus dx
d
(ln bx−ln x) = x1 − x1 = 0 and
so ln bx − ln x = c. Taking x = 1 shows that c = ln b. Thus ln bx − ln x = ln b.
Taking x = a > 0 gives
ln ab = ln a + ln b.
1
(iv) Logarithm of :
x
 
d 1 1 1
ln = · − 2 (by the chain rule)
dx x 1/x x
1
=− .
x
d
Hence dx
(ln x + ln x1 ) = 0 and ln x + ln x1 = c. Putting x = 1 shows that c = 0.
Hence
1
ln = − ln x (x > 0).
x
132

The last two results can be combined to give

a 1
ln = ln a + ln
b b
= ln a − ln b.

(v) Logarithm of a power:

ln xn = n ln x.

This may be proved by induction, using (iii).

(vi) Monotonicity and concavity:


Since
d 1
ln x = > 0, for x > 0,
dx x
d2 1
and 2 ln x = − 2 < 0, for x > 0,
dx x
we see that ln x is increasing and concave (downwards).

(vii) Asymptotic behaviour: We show that

lim ln x = ∞,
x−→∞

and
lim ln x = −∞.
x−→0+

For the first statement we need

∀M > 0 ∃N > 0 such that ∀x > N, ln x > M.

Indeed, for M > 0 let M 0 = d lnM2 e (that is, M 0 is the smallest integer that is
0
greater than or equal to lnM2 ). Let N = 2M . Then for x > N we have
0
ln x > ln N = ln 2M because ln is strictly increasing,
0
ln 2M = M 0 ln 2 ≥ M because of (v).

Thus ln x > M , as required.


The second statement follows from this:
1
lim+ ln x = lim ln = − lim ln t = −∞.
x→0 t→∞ t t→∞

Since ln x assumes arbitrarily large positive and arbitrarily large negative val-
ues and since it is continuous on R+ it also assumes all intermediate values.
We conclude that the range of ln x is R.
133

(viii) Graph of ln x :

(ix) The function ln |x| :


(
ln x if x > 0,
ln |x| =
ln(−x) if x < 0.

If x < 0,
d d 1 1
ln |x| = ln(−x) = (−1) = .
dx dx −x x
d 1
Thus ln |x| = for all x 6= 0, and
dx x
Z
dx
= ln |x| + C
x
is valid for negative as well as positive x.
Remark. As discussed earlier, two primitives of a given function differ by
a function whose derivative is zero. When we were looking for primitives
of functions on an interval then we could conclude that any function whose
derivative is zero must be a constant. This is not true when the integrand is
defined on disjoint intervals as for f (x) = x1 since we could choose different
constants in different components. Here and later on we will interpret the
integration “constant” C as a function whose derivative is zero, hence it can
assume different values at different components of the domain.

(x) Exponential functions. Since ln x : (0, ∞) → R is strictly increasing (and


hence injective) and also surjective, it has an inverse. We denote this inverse
by ex : R → (0, ∞). This inverse function is well-defined throughout R and
takes positive values. It is strictly increasing. Its derivative can be computed
by the inverse function rule: Let y = ex and x = ln y. Then

d x 1 1
e = d
= 1 = y = ex .
dx y
ln x y
134

The so-defined exponential function satisfies the rules

ex+y = ex · ey ,

since
x +ln ey x ey )
ex+y = eln e = eln(e = ex ey .

For a > 0, we define


ax = ex ln a .

It follows from this definition that

exy = (ey )x .

Indeed, let ey = a, i.e., y = ln a then

exy = ex ln a = ax = (ey )x .

♠ Exercises 43. Show that for a > 0, and any x, y ∈ R

ax+y = ax · ay
axy = (ay )x
d x
a = ax ln a
dx
ax
Z
ax dx = + C.
ln a

Worked Examples

Z −5  
dx −5 5
(i) = [ln |x|]−8 = ln 5 − ln 8 = ln .
−8 x 8

− sin x
Z Z
(ii) tan x dx = − dx = − ln | cos x| + C.
cos x
(Since cos x is sometimes negative it is necessary to include the absolute value
sign.)
Z
2x + 5
(iii) 2
dx: put u = x2 + 5x + 6, du = (2x + 5) dx,
x + 5x + 6
Z
du
Integral = = ln |u| + C
u
= ln |x2 + 5x + 6| + C.
135

Z
cos x
(iv) dx: put u = 2 + sin x, du = cos xdx,
2 + sin x
Z
du
Integral = = ln u + C
u
= ln(2 + sin x) + C.

(Since 2 + sin x > 0 we do not need the absolute value sign.)



(v) Differentiate ln(x + 1 + x2 ) and simplify. Write out the corresponding inte-
gration formula.
√ du 2x
Let y = ln u where u = x + 1 + x2 . Now =1+ √ , so
dx 2 1 + x2
 
dy dy du 1 x
= = 1+ √
dx du dx u 1 + x2
√ !
1 1 + x2 + x
= √ √
x + 1 + x2 1 + x2
1
=√ .
1 + x2

Hence Z
dx √
√ = ln (x + 1 + x2 ) + C.
1 + x2
In particular,
Z 1
dx h √ i1
√ = ln(x + 1 + x2 )
0 1 + x2 0

= ln(1 + 2).

(vi) Differentiate with respect to x :


√ !
1 + x2
y = ln .
2x

Here it is better to use the rules for the logarithm to expand the expression
before differentiating.

y = ln 1 + x2 − ln 2x
1
= ln(1 + x2 ) − ln 2 − ln x.
2
dy 1 2x 1
= · 2
−0−
dx 2 1+x x
x 1
= − .
1 + x2 x
136

22 Approaching linear algebra

We start with a simple “predator-prey” model. Such models are used to describe
the development of populations of two species, the predator and the prey, e.g. owls
and rats. We can record the number of individuals (or their density on some region
or the probability of sightings) at some instant of time in a column
   
o 20
= .
r 3000
If we consider a more complicated model with three or more species the column
will have more entries. We will call a column of n real numbers a vector . The set
of all vectors (with n entries) is denoted by Rn . For n = 2 or n = 3 the entries
of a vector can be interpreted as coordinates of a point on the 2-dimensional plane
or in 3-dimensional space. We will get back to this point of view and to resulting
applications of vectors in geometry later. At this stage we notice that it makes sense
to add vectors component-wise, e.g. if we want to compute the population vector
of a larger region from the vectors of the smaller subregions. We can also scale the
vector of a population density component-wise by the size of a region to find the
population vector of the region.

According to our model the population vector


 
O
R
(notice the upper case letters) one year later follows the rule
O =0.9o + 0.002r (13)
R = − 6o + 1.1r
The coefficient 0.9 in the first equation expresses the rate (births−deaths) at which
the owl population develops without the presence of rats. The owls prey on rats
and the presence of rats increases their reproduction, which is expressed by the
coefficient 0.002. In the second equation the negative coefficient −6 expresses the
detrimental effect of the presence of owls on the population of rats (one owl eats 6
rats), whereas the coefficient 1.1 shows the strong reproduction of rats.

If O and R are given, the two equations (13) become a system of two linear
equations and two unknowns o and r.

♠ Exercises 44. If the population vector is given by O = 20 and R = 1040 what


was the population vector one year before, i.e. solve the system of linear equations
0.9o + 0.002r =20 (14)
−6o + 1.1r =1040.
137

More generally, we will be interested in systems of m linear equations with n


unknowns

a11 x1 + a12 x2 + · · · + a1n xn = b1 (15)


a21 x1 + a22 x2 + · · · + a2n xn = b2
.. .
. = ..
am1 x1 + am2 x2 + · · · + amn xn = bm

We think of the mn numbers a11 , . . . , amn as given numbers. They are called the
coefficients of the system. The numbers b1 , . . . , bm are also given and can be con-
sidered as a column vector with m entries. We refer to the column of the numbers
b1 , . . . , bm as the right hand side of the system. The numbers x1 , . . . , xn are the
unknowns, which also can be considered as the entries of a column vector. We can
also write the coefficients of the system as a table of m rows and n columns. Such
table is called an m × n matrix , it is usually denoted by an upper case letter and
written as  
a11 a12 · · · a1n
 a21 a22 · · · a2n 
A= . .
 
. .
 .. .. .. 

am1 am2 · · · amn
A matrix with an equal number of rows and columns m = n is called a square
matrix.

The subscripts (or indices) of the entries show the position of each entry within
the matrix. The first index always refers to the row and the second one to the
column. We can scale a matrix by a factor component-wise and we can add matrices
as long as they have the same size, i.e. the same number of rows and columns:
   
a11 a12 · · · a1n ca11 ca12 · · · ca1n
 a21 a22 · · · a2n   ca21 ca22 · · · ca2n 
cA = c  . ..  =  .. ..  .
   
. .. ..
 . . .   . . . 
am1 am2 · · · amn cam1 cam2 · · · camn

   
a11 a12 ··· a1n b11 b12 ··· b1n
 a21 a22 ··· a2n   b21
  b22 ··· b2n 
A+B = . ..  +  ..
 
.. .. .. 
 .. . .   . . . 
am1 am2 · · · amn bm1 bm2 · · · bmn
 
a11 + b11 a12 + b12 ··· a1n + b1n
 a21 + b21 a22 + b22 ··· a2n + b2n 
= .
 
.. .. ..
 . . . 
am1 + bm1 am2 + bm2 · · · amn + bmn
138

Multiplication of matrices is less obvious. We can multiply a matrix A with a


matrix B only if the the number of columns of A equals to the number of rows
of B, i.e., A is an m × k-matrix and B is a k × n-matrix. The result AB is an
m × n-matrix, i.e., it has as many rows as the first factor and as many columns
as the second factor. In general, AB 6= BA (The product BA does not even make
sense unless the matrices are square). The definition of the matrix product is as
follows: The entries cµν of the m × n-matrix C = AB equal
k
X
cµν = aµ1 b1ν + · · · + aµk bkν = aµκ bκν .
κ=1

Example.
    
1 2 2 3 16 19
= .
4 3 7 8 29 36

♠ Exercises 45. Find an example of two 2×2-matrices A and B such that AB 6= BA.

Using the product of matrices we can rewrite the system of linear equations (15)
as
AX = B
where A is the m × n-matrix of coefficients and
   
x1 b1
 ..   .. 
X =  . , B= . 
xn bm
are interpreted as n × 1 and m × 1 matrices, respectively.

We call a system of linear equations homogeneous if B = 0 and inhomogeneous


otherwise. Any homogeneous system has at least one solution, namely X = 0. This
solution is called the trivial solution.

With any m × n-matrix A we can associate a mapping A : Rn → Rm by

Y = A(X) = AX.

This mapping is linear in the following sense: For any U, V ∈ Rn and c ∈ R

A(U + V ) = A(U ) + A(V )


A(cU ) = cA(U ).

The proof is a direct verification. The entry yµ of Y = A(U + V ) is


n
X n
X n
X
yµ = aµν (uν + vν ) = aµν (uν ) + aµν (vν )
ν=1 ν=1 ν=1
139

which is clearly the sum of the ν-th entryies of A(U ) and A(V ), respectively. We
just used distributivity of real numbers. The verification of the second statement is
similar and left as an exercise.

We can now investigate when a linear mapping

Y = AX

is injective or surjective. Injectivity means that the system of linear equations

AX = B

has at most one solution, no matter what B ∈ Rm we choose. Interestingly, we can


test for injectivity by just using B = 0.

Proposition 10. The linear mapping Y = AX is injective if and only if the homo-
geneous system AX = 0 has only the trivial solution.

Proof. It is clear that the mapping cannot be injective if the homogeneous


system has two solutions, namely the trivial solution and a nontrivial solution. Vice
versa, if the mapping is not injective, i.e. for some B there are different solutions
U 6= V such that
AU = AV = B.
Then
A(U − V ) = AU − AV = B − B = 0.
Since U − V 6= 0 this is a nontrivial solution. 2

Surjectivity means that for any B ∈ Rm the linear system

AX = B

has at least one solution. In any case we need to develop a technique that allows us
to solve an arbitrary system of linear equations and/or allows us to understand the
structure of such solution. This technique is called Gaussian elimination.
140

23 Gaussian elimination

The usual strategy for solving an equation is to replace it by an equivalent equation


that has the same solution. By repeating such manipulations we aim at an explicit
expression that equals to the unknown variable. We use the same strategy to solve
a system of (linear) equations.

It turns out that the following manipulations do not change the solutions and
that they are sufficient to solve the system:

1. interchanging any two equations

2. scaling (both sides of) any equation by the same non-zero factor

3. adding a multiple of any one equation to another equation

It is clear that any solution of the system also satisfies the modified system.
On the other hand, all these manipulations can be undone by the same kind of
procedure. This shows that, vice versa, any solution of the modified system also
solves the original one.

Let’s demonstrate this in a specific example. We want to solve the following


system of simultaneous linear equations for the unknowns x, y and z.

x+y+z =1
x + y − z = −1
−x − 2y + z = 2.

Step 1. We add the −1-fold of the first equation to the second equation and we
add the first equation to the last equation. These are manipulations of the 3rd kind.
This yields

x+y+z =1
−2z = −2
−y + 2z = 3.

Now the variable x occurs only in the first equation and has been eliminated from
the second and third equation. We could now consider the second and third equation
as a system of two equations and two unknowns, which is an easier problem of lower
complexity.
141

Step 2. Swapping the second and the third equations yields

x+y+z =1
−y + 2z = 3
−2z = −2.

The resulting system has a triangular form, where the first equation involves all
variables x, y, z, the second equation depends only on y, z and the last equation
depends only on z. We could now solve the new system by going backwards from
the bottom to the top. However we keep applying our procedures to obtain the
explicit solutions.

Step 3. Scaling the second equation by −1 and the third equation by − 21 gives

x+y+z =1
y − 2z = −3
z = 1.

Now the coefficient at x, y, z in the first, second and third equation respectively is
1. From this we read already that z = 1.

Step 4. Adding double of the third equation to the second equation and sub-
tracting the third from the first equation gives

x+y =0
y = −1
z = 1.

From this we read that y = −1 and z = 1.

Step 5. Subtracting the second equation from the first equation yields

x=1
y = −1
z = 1.

Our system of three equations and three unknowns has the unique solution x = 1,
y = −1, z = 1.

We now want to “abstract” this process and in doing so get an algorithm for
solving general linear systems.

Firstly, we note that we could write our system of equations as a matrix, the
augmented matrix – rows indicating the equation, columns the coefficient of the
142

unknown and a final column for the right hand sides. The prevents us from having
to write the variables x, y, z in each modified system again and again.

1 1 1 1
1 1 −1 −1
−1 −2 1 2

Of course, we have to remember that column 1 represents the x’s, column 2 the y’s
and column 3 the z’s.

The three procedures for manipulating the system translate into the equivalent
procedures for the augmented matrix

Any pair of rows may be interchanged.

Any row may be multiplied by a non-zero number.

Any multiple of a row may be added (or subtracted) from another.

How then do we use these three elementary row operations to arrive at the
solution? Well, if the solution looks like “x = number”, “y = number” and “z =
number”, the matrix for these three equations would be

1 0 0 “number”
0 1 0 “number”
0 0 1 “number”.

So if we can use our elementary row operations to reduce the augmented matrix to
this form we can read the solution from the right most column.

Let’s solve our problem using this technique. The best way to do this is to be
methodical: start with column 1, get a 1 as the first entry then try to get the zeros
for the entries beneath, go to column 2 and repeat the process with a 1 as second
entry and so on. We start with,

1 1 1 1
1 1 −1 −1
−1 −2 1 2.

We will indicate the operation performed using Ri to stand for row i with the first
R indicating the row on which the operation is performed. For example, R1 − 2R2
143

means an operation performed on row 1, the new row 1 is the old row 1 minus twice
row 2. Row 2 remains unchanged.

1 1 1 1 1 1 1 1
R2 − R1 0 0 −2 −2 0 0 −2 −2
−1 −2 1 2 R3 + R1 0 −1 2 3

1 1 1 1 R1 + R2 1 0 3 4
(interchange) R2 ↔ R3 0 −1 2 3 0 −1 2 3
0 0 −2 −2 0 0 −2 −2

1 0 3 4 R1 − 3R3 1 0 0 1
0 −1 2 3 0 −1 2 3
− 12 R3 0 0 1 1 0 0 1 1

1 0 0 1 1 0 0 1
−R2 0 1 −2 −3 R2 + 2R3 0 1 0 −1
0 0 1 1 0 0 1 1.

We are done, we read the answer from the right-most column; x = 1, y = −1, z = 1.

This technique of Gauss-Jordan elimination can be used on linear systems of


any size. The technique will always produce all solutions, if such a solution exists
(we’ll say more about this below).

Example. Solve the following system of linear equations

2x1 + x2 − x3 + x4 = 6
x1 + x3 + 3x4 = 4
3x1 − 2x2 + x3 = 2
x1 + x2 − x4 = −2

Solution.

The augmented matrix for the system is

2 1 −1 1 6
1 0 1 3 4
3 −2 1 0 2
1 1 0 −1 −2
144

We proceed as before, working column by column.


1 1
R
2 1
1 2
− 21 1
2
3 1 1
2
− 12 1
2
3
1 3 5
1 0 1 3 4 R2 − R1 0 −2 2 2
1
3 −2 1 0 2 3 −2 1 0 2
1 1 0 −1 −2 1 1 0 −1 −2
1
1 2
− 12 1
2
3 1 1
2
− 12 2
1
3
1 3 5 1 3 5
0 −2 2 2
1 0 −2 2 2
1
−7 5 3 7 5 3
R3 − 3R1 0 2 2
− 2 −7 0 −2 2
− 2 −7
1 1
1 1 0 −1 −2 R4 − R1 0 2 2
− 23 −5
1
1 2
− 21 1
2
3 R1 − 21 R2 1 0 1 3 4
−2R2 0 1 −3 −5 −2 0 1 −3 −5 −2
−7 5 −3 −7 5 −3
0 2 2 2
−7 0 2 2 2
−7
1 1 −3 1 1 −3
0 2 2 2
−5 0 2 2 2
−5

1 0 1 3 4 1 0 1 3 4
0 1 −3 −5 −2 0 1 −3 −5 −2
R3 + 72 R2 0 0 −8 −19 −14 0 0 −8 −19 −14
−3
0 21 1
2 2
−5 R4 − 12 R2 0 0 2 1 −4

5 9
1 0 1 3 4 R1 − R3 1 0 0 8 4
0 1 −3 −5 −2 0 1 −3 −5 −2
− 18 R3 0 0 1 19
8
7
4
0 0 1 19
8
7
4
0 0 2 1 −4 0 0 2 1 −4
5 9 5 9
1 0 0 8 4
1 0 0 8 4
17 13 17 13
R2 + 3R3 0 1 0 8 4
0 1 0 8 4
19 7 19 7
0 0 1 8 4
0 0 1 8 4
−15 −15
0 0 2 1 −4 R4 − 2R3 0 0 0 4 2

5 9
1 0 0 8 4
R1 − 85 R4 1 0 0 0 1
17 13 17 13
0 1 0 8 4
0 1 0 8 4
19 7 19 7
0 0 1 8 4
0 0 1 8 4
4
− 15 R4 0 0 0 1 2 0 0 0 1 2

1 0 0 0 1 1 0 0 0 1
17
R2 − 8
R4 0 1 0 0 −1 0 1 0 0 −1
19 7 19
0 0 1 8 4
R3 − 8
R4 0 0 1 0 −3
0 0 0 1 2 0 0 0 1 2

Our solution can be read from the last column of the final augmented matrix:
x1 = 1, x2 = −1, x3 = −3, x4 = 2. 2
145

Existence of Solutions

For two-dimensional systems, i.e. systems in two independent variables x and y,


a linear equations can be represented as a straight line in R2 . For example,

x+y = 2
x + 2y = 5,

represents a pair of lines intersecting in the point (x, y) = (−1, 3). This intersection
point is the solution of the system. Of course a pair of straight lines need not
intersect by one point – they can be parallel or coincide. If they coincide then all
points (x, y) on the line will satisfy the system. For example,

x + 2y = 5
−3x − 6y = −15.

The second equation is simply a multiple of the first one and all points (x, 21 (5 − x)),
for any x, solve the system. Two distinct parallel lines give equations, which have no
point in common, the equations are inconsistent – there is no solution. For example

x − 3y = 2
x − 3y = 6.

are inconsistent. The fact that the equations are inconsistent is easily discovered
if we are using Gauss-Jordan. Of course, it’s obvious in this case but for a large
system it can be far from obvious.

1 −3 2 1 −3 2
1 −3 6 R2 − R1 0 0 4 ←− inconsistency.

The last line in the resulting augmented matrix corresponds to the equation

0·x+0·y =4

which cannot hold, no matter what x and y are.

Example. Solve the following set of linear equations,

x − y − 3z = −3
3x + y − z = −5
x + 2y + 3z = 0.

Solution.
146

1 −1 −3 −3 1 −1 −3 −3
3 1 −1 −5 R2 − 3R1 0 4 8 4
1 2 3 0 1 2 3 0

1 −1 −3 −3 1 −1 −3 −3
1
0 4 8 4 R
4 2
0 1 2 1
R3 − R1 0 3 6 3 0 3 6 3

R1 + R2 1 0 −1 −2 1 0 −1 −2
0 1 2 1 0 1 2 1
0 3 6 3 R3 − 3R2 0 0 0 0

The last row is equivalent to the tautological (useless) equation

0 · x + 0 · y + 0 · z = 0.

This is as far as we can go with this system. 2

We consider now a system of m equations in n unknowns,

a11 x1 + a12 x2 + . . . + a1n xn = b1


a21 x1 + a22 x2 + . . . + a2n xn = b2
...
am1 x1 + am2 x2 + . . . + amn xn = bm .

Which can be written in matrix form as

AX = B.

The augmented matrix is (A|B). To solve the system (or to show it to be incon-
sistent) we would attempt to row reduce the augmented matrix. We notice that
in all our examples, even in the inconsistent cases, we could always row reduce the
augmented matrix to “stairstep” form
 
0 ... 0 ∗

 ∗ 

(∗) ∗
 
 

 
 
...

where all the entries under the steps are zero, all corner (or pivot) entries marked
with a ∗ are non-zero and all other entries are arbitrary. Note the steps descend one
147

row at a time whereas the span of each step may be more than one column. Such a
matrix is known as a row-echelon matrix.

Example. The following are row-echelon matrices


 
" #   0 1 3
1 5 1 10
, ,  0 0 2 
0 0 0 1
0 0 0
 
  0 15 2
0 0 1 5 6 7
0 0 1 
 
 0 0 0 2 0 0  
0 0 0 
 

0 0 0 0 0 4
0 0 0

As you might have guessed every matrix can be turned into a row-echelon matrix.

Theorem 25. By means of elementary row operations any non-zero matrix can be
reduced to row-echelon form.

Proof. Let A = (aij ) be a m × n matrix. If A is the zero matrix we are done.


Assume now that A has at least one non-zero column. From the left this first non-
zero column must contain at least one non-zero element. By interchanging rows, if
necessary, we can make sure that the first (top-most) element of the first non-zero
column is non-zero. So A will have been transformed into a matrix of the form
 
0 . . . 0 b11 b12 . . . b1n
 0 . . . 0 b21 b22 . . . b2n 
B=
 
.. .. .. .. 
 . . . . 
0 . . . 0 bm1 bm2 . . . bmn

with b11 6= 0.

b21 bm1
Performing R2 − R , . . . , Rm
b11 1
− b11
R1 yields
 
0 . . . 0 b11 b12 . . . b1n
 0 . . . 0 0 c22 . . . c2n 
.
 
 .. .. .. ..
 . . . . 
0 0 0 cm2 . . . cmn
bk1
where ckj = bkj − b ,
b11 1j
for k ≥ 2. Now apply the same process to the submatrix
 
c22 . . . c2n
 .. ..  .
 . . 
cm2 cmn
148

So after no more than m steps of this process we will arrive at a row-echelon matrix.
2

If you now look a little closer at the row reductions we have performed you will
see that they all have two other things in common, aside from being in row-echelon
form. Firstly, the non-zero corner entries are all 1’s. Secondly, every entry above
each corner 1 is zero. A row echelon matrix with these two additional properties is
called a reduced row-echelon matrix or Hermite matrix.

Example. The following are reduced row-echelon matrices


   
  0 0 1 0 0 2 1 0 0
1 0
,  0 0 0 0 1 3 ,  0 1 0 .
0 1
0 0 0 0 0 0 0 0 1

Using the same method of proof as above we can now easily prove the following
theorem.

Theorem 26. Every non-zero matrix can, by means of elementary row operations,
be transformed to a reduced row-echelon matrix.

In fact, our solution method – Gauss-Jordan elimination is just the process of


reducing a matrix to reduced row-echelon form.

Once we have reduced the augmented matrix to row-echelon form we can analyse
the possible solutions of the system. Before drawing a conclusion whether the system
has exactly one, infinitely many or no solutions we delete all zero rows (if there are
any) at the bottom of the augmented matrix in row-echelon form. Now we have the
following possibilities:

• The last non-zero equation has a non-zero coefficient. Then there is either a
unique solution or an infinite number of solutions. The latter occurs if the row
echelon form has any step of span greater than 1.

• The last equation reads 0 = c, where c 6= 0. There is no solution, the equations


are inconsistent.

One point we should make here is that it is straight forward to solve a system
of equations once you have it in row-echelon form. The method simply involves
systematically “back substituting” from the last equation. This technique is known
as Gaussian elimination; on some occasions it may be quicker than Gauss-Jordan
elimination.
149

Example. Use Gaussian elimination to solve the following system

x + 2y + 3z = −1
3x + y + 2z = 2
2x + 3y + z = 0

Solution

The augmented matrix is

1 2 3 −1
 
 3 1 2 2 .
2 3 1 0

We now reduce to row-echelon form.

3 −1 3 −1
   
1 2 1 2
R2 − 3R1  0 −5 −7 5  R3 − 2R1  0 −5 −7 5 
2 3 1 0 0 −1 −5 2
3 −1 3 −1
   
1 2 1 2
−1  7 7
R2 0 1 5
−1  R3 + R2  0 1 1 
5
5 −18
0 −1 −5 2 0 0 5
1

The matrix is in row-echelon form the equations are now

x + 2y + 3z = −1
7
y+ z = 1
5
−18
z = 1.
5
5
From the last equation, z = − 18 . Substituting into the second equation gives
7 5 25

y = 1 − 5 × − 18 = 18 . Finally, substituting these values for y and z into the first
equation gives x = − 53
18
. 2
150

24 Square systems and determinants

Consider a system of two linear equations and two unknowns


    
a11 a12 x1 b
= 1 .
a21 a22 x2 b2

By subtracting the a12 -fold of the second equation from the a22 -fold of the first
equation we get
(a11 a22 − a21 a12 )x1 = b1 a22 − b2 a12
hence
b1 a22 − b2 a12
x1 =
a11 a22 − a21 a12
if a11 a22 − a21 a12 6= 0.

Similarly, we find
b2 a11 − b1 a21
x2 =
a11 a22 − a21 a12
if a11 a22 − a21 a12 6= 0. The numerator and denominator expressions have a similar
structure: they are differences of products. It is convenient to write this in the form

a11 a12
= a11 a22 − a21 a12 .
a21 a22

This expression is called the determinant of the 2 × 2 matrix A = (aij ). Then

b1 a12 a11 b1
b2 a22 a21 b2
x1 = and x2 = .
a11 a12 a11 a12
a21 a22 a21 a22

This is Cramer’s rule.

In a similar way, one can define the determinant of a 3 × 3 matrix

a11 a12 a13


a21 a22 a23 = a11 a22 a33 + a12 a23 a31 + a13 a21 a32 − a12 a21 a33 − a11 a23 a32 − a13 a22 a31 .
a31 a32 a33

With some effort one can verify that Cramer’s rule is also valid for linear systems
of 3 variables and 3 unknowns. The solution of
    
a11 a12 a13 x1 b1
a21 a22 a23  x2  = b2 
a31 a32 a33 x3 b3
151

is
b1 a12 a13 a11 b1 a13 a11 a12 b1
b2 a22 a23 a21 b2 a23 a21 a22 b2
b3 a32 a33 a31 b2 a33 a31 a32 b3
x1 = , x2 = and x3 = .
a11 a12 a13 a11 a12 a13 a11 a12 a13
a21 a22 a23 a21 a22 a23 a21 a22 a23
a31 a32 a33 a31 a32 a33 a31 a32 a33

Determinants “determine” whether a square system of n equations and n un-


knowns have a unique solution. This can be expressed in terms of the inverse
matrix . The matrix B is inverse to the matrix A if

AB = BA = I

where I is the identical matrix that has 1 along the main diagonal and zeros other-
wise, i.e.  
1 0 ··· 0
0 1 · · · 0
I = . . .
 
 .. .. . . .. 
. .
0 0 ··· 1
We write B = A−1 . Inverse matrices can be used to solve square systems of linear
equations
Ax = b.
Multiplication by A−1 gives

x = A−1 Ax = A−1 b.

Finding the inverse matrix is in general not easier than solving the system itself.

The determinant indicates whether an inverse matrix exists: the matrix A has an
inverse if and only if the determinant of A is different from zero. For 2 × 2 matrices
there is a simple formula which illustrates this. For
 
a11 a12
A=
a21 a22

the inverse matrix is  


−1 1 a22 −a12
A =
det A −a21 a11
if det A 6= 0.

We will study determinants and the algebra of matrices in more detail in MTHS130
and Pmth213.
152

25 Applications in Geometry

Vectors have become a powerful tool in geometry, physics and other applications.
It is common to denote a vector in this context by lower case boldface letters. The
entries of a 2-vector  
x
v=
y
can be interpreted as the coordinates (x, y) of a point in the Cartesian plane and
the entries of a 3-vector  
x
w = y 
z
can be viewed as the coordinates x, y, z of a point in three-dimensional space.

We have already interpreted linear equations of two variables:

ax + by = c

as equations of straight lines, if at least one of a, b is different from 0. If b 6= 0 this


is the line
a c
y =− x+
b b
a c
with slope − b and y-intercept b . If b = 0 the equation gives a vertical line through
through the point with coordinates x = ac , y = 0. Now solving systems of linear
equations with two variables means to find all points where the corresponding lines
intersect.

It is preferable to change the geometric view on vectors slightly: To each point


P on the plane or in space we can assign the unique parallel translation that shifts
−→
the origin O to P . We use the notation v = OP . We consider now vectors in
3-dimensional space. For vectors in the 2-dimensional plane just ignore the third
entry. The parallel translation by a vector
 
x
v = y

z

of a point P1 (a1 , b1 , c1 ) is the point P2 (a2 , b2 , c2 ) with coordinates a2 = a1 + x,


b2 = b1 + y, c2 = c1 + z. The vector v is completely determined if we know the result
P2 of the translation of any point P1 . Namely,

a − a1
 
−−→  2
v = P 1 P 2 = b2 − b 1  .
c2 − c1
153

The advantage of the interpretation of a vector as a translation is that we can


“add” and “scale” translations. Adding the translations u and v just means to
−−→ −−→
perform them consecutively. If u = P1 P2 and v = P2 P3 then

a2 − a1 a3 − a2 a3 − a1
     
−−→ −−→ −−→
u + v = P 1 P 2 + P 2 P 3 =  b2 − b1  +  b3 − b2  =  b3 − b 1  = P 1 P 3 .
c2 − c1 c3 − c2 c3 − c1

The addition of vectors in their algebraic form is just component-wise addition:


     
u1 v1 u1 + v1
u + v = u2  + v2  = u2 + v2  .
u3 v3 u3 + v3

It is clear that this addition is commutative, i.e. u + v = v + u. Geometrically,


vector addition can be performed by the so-called “parallelogram rule”:

In its geometric interpretation a vector is characterised by

• its length (or norm or magnitude), i.e. a non-negative number equal to the
distance by which points are shifted

• its direction, given by a straight line parallel to which the translation is per-
formed

• its orientation, i.e. one of the two ways of moving along a line, given by two
points on the line, labelled ‘initial’ and ‘terminal’.

Vector quantities that feature magnitude, direction and orientation are very com-
mon in physics, e.g. velocity, force etc.
154

 
x p
The length of the vector v = y  is denoted by kvk and equals kvk = x2 + y 2 + z 2 .

z

Scaling of a vector v by a scalar (= number) c does not affect its direction, but
changes the length kvk to kcvk = |c|kvk and reverses the orientation iff c < 0.

We notice that two vectors are parallel if and only if one can be obtained from
the other by scaling. In this case we also call the two vectors collinear .

We apply the geometric version of vectors to describe straight lines in two- and
three-dimensional space and, actually, in spaces of any dimension as the trajectory
−→
of a particle moving with constant vector velocity. Let r = OP be the vector that
shifts the origin O to an arbitrary point P on the trajectory. Furthermore, let P0
−−→
be some given point on the trajectory and let v be the velocity vector. Then P0 P
is a scalar multiple of v, i.e.
−−→
P0 P = tv,

where the parameter t can be interpreted as the time lapsed since the particle passed

the position P0 .
155

Hence
−→ −−→
r(t) = OP = OP0 + tv = a + tv, (16)
−−→
where the vectors a = OP0 and v are given.

In the 2-dimensional plane the vector equation (16) is equivalent to the para-
metric equations

x = a1 + v1 t
y = a2 + v2 t

where      
x a v
r= , a= 1 , v= 1 .
y a2 v2

These parametric equations give a vertical line if v1 = 0. If v1 6= 0 we can


determine t from the first equation and plug the resulting expression into the second
equation:
v2 v2 v2
y = a2 + (x − a1 ) = x + a2 − a1 ,
v1 v1 v1
which is the usual slope-intercept equation for a non-vertical line.

In 3-dimensional space the parametric equation has three components

x = a1 + v1 t
y = a2 + v2 t
z = a3 + v3 t

where      
x a1 v1
r = y ,
 a = a2  ,
 v = v2  .

z a3 v3
156

26 Linear combinations, linear independence and


bases

Often we are interested in a subset of Rn , such as the subset of all solutions of a sys-
tem of linear equations with n unknowns. Some of these sets have a special structure
of a linear subspace. Before we give a precise definition and geometric interpretation
of linear subspaces we introduce the important notion of linear combinations.

For a number of vectors v1 , . . . , vk and the scalars t1 , . . . , tk we define the linear


combination as the vector

t1 v1 + · · · + tk vk .

The set of all linear combinations of the vectors v1 , . . . , vk is called the span of
v1 , . . . , vk .

Example. If k = 1 and v1 is a non-zero vector then t1 v1 is a parallel vector with


scaled length and possibly reversed orientation. The span of v1 is a straight line
passing through the origin.

If k = 2 we have to consider two cases. If v1 , v2 are collinear, e.g. v2 = rv1 ,


then the linear combinations

t1 v1 + t2 v2 = (t1 + rt2 )v1

form just a straight line through the origin, as above. If v1 , v2 are not collinear their
linear combinations span a two-dimensional plane passing through the origin.
157

We define now the notion of a linear subspace V of Rn as a non-empty subset,


which contains all linear combinations of its elements.

Example. 1. The subset that consists of the zero vector {0} is a linear subspace.

2. Any straight line passing through the origin is a linear subspace. For such
straight line we can choose P0 = O, hence a = 0, so that the parametric equation
becomes
r = tv.

Therefore, this straight line is the linear subspace spanned by the vector v.

3. A straight line (more generally, any set) that does not contain the zero vector
0 is not a linear subspace. Indeed, a linear subspace V is, by definition, not empty.
Let v ∈ V . Then the linear combination 0 = 0 · v ∈ V .

4. A plane passing through the origin spanned on two non-collinear vectors u


and v. It can be described by a parametric equation that depends on two parameters
s and t by
r = su + tv.

An arbitrary plane in R3 can be described by a parametric equation

r = a + su + tv

−−→
where a = OP0 and P0 is some known point of the plane and s, t are arbitrary real
parameters. The components of the parametric vector equation are

x =a1 + su1 + tv1


y =a2 + su2 + tv2
z =a3 + su3 + tv3
158

We can try and determine s, t from the first two equations

su1 + tv1 =x − a1
su2 + tv2 =y − a2 .

If u1 v2 − u2 v1 6= 0 then there is a unique solution

x − a1 v1
x − a2 v2 v2 v1
s= = (x − a1 ) − (y − a2 ) = α1 + β1 x + γ1 y
u1 v1 u1 v2 − u2 v1 u1 v2 − u2 v1
u2 v2
u1 x − a1
u2 x − a2 u2 u1
t= =− (x − a1 ) + (y − a2 ) = α2 + β2 x + γ2 y.
u1 v1 u1 v2 − u2 v1 u1 v2 − u2 v1
u2 v2

Plugging this into the third equation gives the equation of the plane

z = Ax + By + D, (17)

where A = β1 u3 + β2 v3 , B = γ1 u3 + γ2 v3 , D = a3 + α1 u3 + α2 v3 .

A more general equation (without the condition u1 v2 − u2 v1 6= 0) for a plane in


3
R is
Ax + By + Cz + D = 0, (18)
where A, B, C, D are real constants and at least one of A, B, C is different from 0.
Notice that equation (18) is equivalent to equation (17) if C 6= 0. Dividing by C
yields
A B D
z =− x− y− .
C C C

We can now interpret a system of m linear equations with three unknowns ge-
ometrically as the problem of finding the common points of m planes in R3 . Two
equations give two planes which may intersect in a line or be parallel. If the planes
are parallel the pair of equations will be inconsistent, if they coincide all points on
the plane satisfy the pair of equations. If we have a third plane (third equation)
then there are a number of possibilities, for distinct planes,

• two (or all three) of the planes are distinct and parallel – no common inter-
section, inconsistent.

• all planes distinct and non-parallel but they intersect pairwise by three parallel
straight lines – inconsistent.
159

• all three planes intersect in a single straight line – we can solve for two of the
unknowns in terms of the third. – Infinitely many solutions forming a straight
line.

• the three planes intersect in a single point – a unique solution.

Linear subspaces of Rn contain infinitely many elements (except for {0}) but can
be described as the spans of finitely many vectors. A minimal set that spans a linear
subspace is called basis of the subspace. Being minimal implies that the spanning
set does not contain vectors that are linear combinations of the other elements. This
is captured by the following definition:

A set of vectors v1 , . . . , vk is called linearly independent if the vector equation

t1 v1 + · · · + tk vk = 0

is only satisfied if t1 = · · · = tk = 0, i.e it has only the trivial solution. Otherwise,


the set is called linearly dependent. This can be interpreted as a homogeneous
system of n equations and k unknowns in the following way: Write the k columns
v1 , . . . , vk as the columns of a matrix
 
v11 v12 · · · v1k
 v21 v22 · · · v2k 
V = [v1 , . . . , vk ] =  . ..  .
 
.. ..
 .. . . . 
vn1 vn2 · · · vnk

Then  
v11 v12 · · · v1k    
 v21 v22 · · · t1 0
v2k 
  ..   .. 
t1 v1 + · · · + tk vk =  . ..   .  =  . 

.. ..
 .. . . . 
tk 0
vn1 vn2 · · · vnk
is indeed a homogeneous systems of linear equations and we have linear independence
if and only if the trivial solution t1 = · · · = tk = 0 is the only solution.

Example. The vectors


   
1 1
v1 = and v 2 =
1 −1
are linearly independent because the system
    
1 1 t1 0
=
1 −1 t2 0

has only the trivial solution.


160

The vectors    
2 4
v1 = and v 2 =
3 6
are linearly dependent because the system
    
2 4 t1 0
=
3 6 t2 0

has the non-trivial solution t1 = −2, t2 = 1. Notice that v 2 is a multiple of v 1 .

In a linearly dependent set there exists at least one vector, which is the linear
combination of the remaining ones. Indeed, if one of the t1 . . . , tk is different from
zero then the corresponding vector is a linear combination of the others. E.g. if
t1 6= 0 then
t2 tk
v1 = − v2 − · · · − vk
t1 t1

Although a linear subspace can have many different bases, their cardinality is
always the same and is called the dimension of the subspace. This topic will be
studied in more detail in MTHS130 and Pmth213.

The notion of linear subspaces helps us to better understand the structure of the
solution set of a homogeneous system of m linear equations with n unknowns

Ax = 0.

In fact, this solution set is a linear subspace of Rn . For any solutions x1 , . . . , xk any
linear combination is also a solution since

A(t1 x1 + · · · + tk xk ) = t1 Ax1 + · · · + tk Axk = 0.

In MTHS130 we will show that the dimension d of this subspace equals n−r, where r
is the dimension of the subspace of Rm spanned by the rows of A, thus n−m ≤ d ≤ n.
One can expect that each equation brings down the dimension by 1 starting from
n. However this is only the case if the equations are linearly independent. Rows
of A that are linearly dependent from other rows can be deleted from the system
without changing the space of solutions. Geometrically, the solution space can be
interpreted as a d-dimensional plane that passes through the origin 0.

The solution set of a non-homogeneous system

Ax = b

with b 6= 0 is never a linear subspace. (Because it does not contain 0.) However,
it can be interpreted as a d-dimensional plane passing through a point that corre-
sponds to a single particular solution. Assume that xpart is a particular solution
161

of the inhomogeneous system and x0 is an arbitrary solution of the corresponding


homogeneous system (i.e., same A and b = 0.) That is

Axpart = b

and
Ax0 = 0.
Then xpart + x0 is also a solution because

A(xpart + x0 ) = Axpart + Ax0 = b + 0 = b.

Any solution x is like this, because the difference x − xpart is a solution of the
homogeneous system:

A(x − xpart ) = Ax − Axpart = b − b = 0.

Example. Consider the homogeneous system

2x + 3y − z = 0
3x + 2y − z = 0.

Gaussian elimination reduces this system to


3 1
x+ y− z =0
2 2
1
y − z = 0.
5
For any arbitrary value of z we find the parametric solution x = 5z, y = 5z, z = z.
The solution space is 1-dimensional and spanned on the vector
 
5
5 .
1

The geometric interpretation of the solution is the straight line


 
5
r = t 5 .
1

Consider now the inhomogeneous system

2x + 3y − z = 2
3x + 2y − z = 3.
162

Gaussian elimination yields


3 1
x+ y− z =1
2 2
1
y − z = 0.
5
Since we need only one particular solution we can put z = 0. Then y = 0 and x = 1.
This yields the general solution
     
x 1 5
y  = 0 + t 5 .
z 0 1

Geometrically, this is a straight line passing through the point P0 (1, 0, 0):
   
1 5
r = 0 + t 5 .
0 1
163

27 Complex numbers

We have seen that vectors can be added component-wise and that this addition
satisfies the same properties as the addition of numbers.

It is much more tricky to multiply vectors. A completely satisfactory approach


exists only in R2 .

We want to define (x, y) · (u, v). A first naive attempt suggests component-wise
multiplication
(x, y) ∗ (u, v) = (xu, yv).

The so defined product would be commutative, associative and distributive. Then


(1, 1) would be the neutral element: (1, 1) ∗ (x, y) = (x, y). The problem of such
definition is that too many vectors have no multiplicative inverse: We cannot divide
by a vector if one of its components is zero.

It turns out that a much better definition is

(x, y) · (u, v) = (xu − yv, xv + yu).

This product is commutative. Interchanging (x, y) and (u, v) does not affect the
result. The vector (1, 0) serves as the neutral element, i.e.

(x, y)(1, 0) = (x, y).

If x and y are not both zero then


 
x −y
, 2
x + y x + y2
2 2

is a multiplicative inverse of (x, y). In fact,

x −y x2 y2 −xy yx
(x, y)( , ) = ( + , + ) = (1, 0).
x2 + y 2 x2 + y 2 x 2 + y 2 x2 + y 2 x2 + y 2 x2 + y 2

This motivates the following definition.

A complex number is a vector (x, y) with x, y ∈ R. The sum of


two complex numbers (x, y) + (u, v) is defined as the vector
(x + u, y + v). The product (x, y)(u, v) is defined as the vector
(xu − yv, xv + yu). The set of complex numbers is denoted by C.
164

Usually we denote a complex number by just one letter, e.g., z = (x, y), w =
(u, v).

All the axioms for multiplication and addition of the rational or real numbers
hold for the complex numbers. Any set that satisfies those axioms is called a field.
Thus the sets of rational, real and complex numbers are fields.

1. z + w = w + z for all z, w ∈ C.

2. (z + w) + s = z + (w + s) for any z, w, s ∈ C.

3. Denote the complex number (0, 0) by 0. Then 0 + z = z + 0 = 0, i.e. 0 is the


neutral element for the addition of complex numbers.

4. For any complex number z = (x, y) there is a complex number w = (−x, −y)
such that z + w = 0. We write w = −z.

5. z · 0 = 0 · z = 0 for any z ∈ C.

6. zw = wz for any z, w ∈ C.

7. (zw)s = z(ws) for any z, w, s ∈ C.

8. Denote the complex number (1, 0) by 1. Then 1 · z = z · 1 = z, i.e. 1 is the


neutral element for the multiplication of complex numbers.

9. For any complex number z = (x, y) with z 6= 0 there is a complex number w


such that zw = 1. We write w = z1 or w = z −1 .

10. (z + w)s = (zs + ws) for any z, w, s ∈ C.

The real numbers can be included in C as a subset, R can be identified with the
complex numbers of the form (x, 0). For such numbers we just write x instead of
(x, 0). The multiplication rule simplifies to

x(u, x) = (x, 0)(u, v) = (xu, xv).

It is common to denote the complex number (0, 1) by i. It is called the imaginary


unit. It has the surprising property

i2 = (0, 1)2 = (−1, 0) = −1.

The square of the imaginary unit is a negative real number! We will find out later
that any complex number has a square root.

Now any complex number can be written as

z = (x, y) = (x, 0) + (0, y) = (x, 0) + (y, 0)(0, 1) = x + y i .


165

This is the standard notation for complex numbers. The component x is the real
part and y is the imaginary part of z. Notice that both real and imaginary part
are real numbers. We write Re z = x for the real part of z and Im z = y or the
imaginary part of z

Example.

(a) (1 + 3i) + (3 + i) = 4 + 4i = 4(1 + i)

(b) (1 + 3i) − (3 + i) = −2 + 2i = 2(−1 + i)


√ √
(c) (π + i) − (1 + 2i) = (π − 1) + (1 − 2)i

(d) 12 + 13 i + 14 − 61 i = 34 + 16 i
 

The multiplication rule for complex numbers looks rather difficult at the first
glance. However it is easy to multiply complex numbers by expanding the expression

(x + i y)(u + i v) = xu + i xv + i yu + i2 yv.

Then remember that i2 = −1 and extract the real and the imaginary parts. This
yields
(x + i y)(u + i v) = xu − yv + i(xv + yu).

Example.

(a) (3 + 4i)(6 + i) = 3 · (6 + i) + 4i · 6 + i)
= 18 + 3i + 24i + 4i2
= 18 + 3i + 24i − 4
= 14 + 27i.

(b) (2 − 7i)(3 − 2i) = 2(3 − 2i) − 7i(3 − 2i)


= 6 − 4i − 21i − 14
= −8 − 25i.
√ √ √ √
(c) ( 2 + i 3)(1 − i) = 2(1 − i) + i 3(1 − i)
√ √ √ √
= 2−i 2+i 3+ 3
√ √ √ √
= ( 2 + 3) + i( 3 − 2).
√ √ √
(d) ( 2 − i)2 = ( 2)2 − 2 2i + i2

= 2 − 2 2i − 1

= 1 − 2 2i.
166

Equality of Complex Numbers

To specify a complex number we must give two real numbers, the real and imagi-
nary parts. So two complex numbers are equal if and only if their real and imaginary
parts are equal (respectively).

For complex numbers z1 = a1 +ib1 and z2 = a2 +ib2 we have z1 = z2


if and only if a1 = a2 and b1 = b2 .

Example. Find all complex numbers for which

z 2 = −3 + 4i.

Solution We write z = x + iy, with x and y real. Substituting into the equation
we have

z 2 = (x + iy)2 = −3 + 4i
i.e. x2 − y 2 + i2xy = −3 + 4i.

Now equate real and imaginary parts – remember the complex number on the
left can only equal that on the right if and only if their real and imaginary parts are
(respectively) equal. We get

x2 − y 2 = −3 and 2xy = 4.

From the second of these equations we have


2
y= ,
x
which we substitute into the first equation. This gives
 2
2 2
x − = −3.
x

Multiplying this equation through by x2 gives as

x4 − 4 = −3x2
i.e. x4 + 3x2 − 4 = 0.

This is a quadratic in x2 , we factorise

(x2 + 4)(x2 − 1) = 0,
167

so that x2 = 1 or x2 = −4. But x must be real, so we cannot have x2 = −4. So we


conclude x2 = 1, which gives x = ±1. We found earlier that y = 2/x, so we have
two possible solutions
(x, y) = (1, 2) or (−1, −2).
Giving two possible complex numbers z,

z = 1 + 2i or z = −1 − 2i.

The geometry of Complex numbers

Similarly to the visualisation of real numbers as points at a line, we can represent


complex numbers as points in the plane. A number z = x + i y corresponds to
the point with coordinates (x, y). Below we introduce some functions of complex
numbers that have a clear geometric meaning.

Conjugate of a Complex Number

For any complex number z = x + i y we define the conjugate

z̄ = x − i y.

Notice that all we have to do to get the complex conjugate of a complex number
is to replace the imaginary part by its negative.

Example.

(a) If z = 3 + 2 i then z = 3 − 2 i.

(b) If z = 27 − 5 i then z = 27 + 5 i.

(c) If z = 5 then z = 5.

(d) If z = 6 i then z = −6 i.

Taking the conjugate is a simple but very important function C → C. It has the
following properties:

1. z̄¯ = z

2. z + w = z̄ + w̄

3. zw = z̄ w̄.
168

4. z z̄ = (Re z)2 + (Im z)2 .

5. Re z = 12 (z + z̄).
1
6. Im z = 2i
(z − z̄).

The conjugate z̄ of the number z considered as a point in the plane is the reflec-
tion of z with respect to the x-axis.

Absolute value and argument

A point x 6= 0 in the plane can be determined by its Cartesian coordinates (x, y)


but also by its distance from the origin and the angle between the x-axis and the
unique line through 0 and z. (See the picture below.)

The distance between z and 0 is the length of the hypotenuse of a right triangle
with catheti11 Re z and Im z. According to Pythagoras’ theorem this distance equals
p √
x2 + y 2 = z z̄.


We define the absolute value (or modulus) function C → R+ by z 7→ |z| = z z̄.
The absolute value of a complex numbers is non-negative and it equals zero if and
only if z = 0.

Notice that
|x| = | Re z| ≤ |z| and |y| = | Im z| ≤ |z|.
Example.

(a) For z = 2 + 3 i we have zz = 22 + 32 = 13

(b) If z = 2 then zz = 22 = 4
11
Cathetus (pl. catheti) is the name for the two short sides of a right triangle.
169

(c) If z = −3 i then zz = (−3)2 = 9.

If θ denotes the angle (measured in radians) between the x-axis and the line
through 0 and z then

Re z = x = |z| cos θ
Im z = y = |z| sin θ.

The angle θ is called the argument12 of z. We write

θ = arg z.

If z is in the right half plane (i.e. if Re z > 0) then arg z can be found from

Im z
tan θ = ,
Re z
hence arg z = arctan Im z
Re z
. If Re z < 0 we have the modified formula arg z =
Im z
arctan Re z + π. If Re z = 0 the argument of z is π2 (if Im z > 0) or − π2 (if Im z < 0)
or undefined (if Im z = 0).

Notice that the argument of a complex number is only defined up to a summand


of 2kπ where k is an integer. We could resolve this ambiguity by restricting the
arguments to the interval
0 ≤ θ < 2π,
(or, better, to −π < θ ≤ π. However the resulting arg function would be discontin-
uous: If we approach z = 1 from a region below the x-axis arg z would tend to 2π.
This is different from arg 1 = 0, which is the limit for z approaching 1 from a region
above the x-axis.

The coordinates (r, θ) = (|z|, arg z) are called polar coordinates. They are very
well adapted to the multiplication of complex numbers.

Theorem 27. If z, w are non-zero complex numbers then

|zw| = |z||w|
arg zw = arg z + arg w.

Notice that the formula arg zw = arg z + arg w would not be true if we took the
arguments only between 0 and 2π because the sum of two such argument needs not
to stay within that interval.
12
Notice that the word argument can have different meanings in mathematics. One meaning is
as defined here. The other meaning is the input of a function and has been used before.
170

Proof. |zw| = |z||w| is equivalent to |zw|2 = |z|2 |w|2 . Here the LHS equals

zwzw = zwz̄ w̄ = z z̄ww̄ = |z|2 |w|2 ,

which is the required RHS.

The second statement is more tricky. Recall the addition formulae for sin and
cos.

sin(θ + φ) = sin θ cos φ + cos θ sin φ


cos(θ + φ) = cos θ cos φ − sin θ sin φ.

Now let θ = arg z and φ = arg w. Then

zw = |z|(cos θ + i sin θ)|w|(cos φ + i sin φ)


= |z||w|[(cos θ cos φ − sin θ sin φ) + i(sin θ cos φ + cos θ sin φ)]
= |z||w|(cos(θ + φ) + i sin(θ + φ)).

This implies that (up to a summand of 2kπ) the argument of the product is the sum
of the arguments of the factors. 2

It readily follows that division of complex numbers in polar coordinates can be


carried out by dividing the respective absolute values and subtracting the arguments.
In particular, we have

1 |z 2 | 1
arg = − arg z, arg z̄ = arg = arg = − arg z.
z z z

A shorter notation13 for cos θ + i sin θ is ei θ . The formula

ei θ = cos θ + i sin θ

is called Euler’s formula. For the time being we just take it as a definition of the
exponential function applied on imaginary numbers. Notice that this definition is
compatible with the usual rule for the exponential function.

ei θ ei φ = ei(θ+φ) .

Moreover, we can define the exponential function for an arbitrary complex input
z = x + i y as
ex+i y = ex · ei y = ex (cos y + i sin y).

We have the remarkable Eulers’s identity

ei π = cos π + i sin π = −1
13
In school mathematics sometimes cis θ is used instead of ei θ .
171

which relates the numbers 1, e, i, π to each other.

The multiplication formula has an immediate consequence for powers of complex


numbers:
z n = (|z| ei arg z )n = |z|n ei n arg z .
This is de Moivre’s formula. Again n arg z needs not to be in the interval [0, 2π)
even if arg z was.

For z = cos θ + i sin θ this becomes

(cos θ + i sin θ)n = cos nθ + i sin nθ,

which gives the formulae for sin and cos of nθ:

cos nθ = Re(cos θ + i sin θ)n


sin nθ = Im(cos θ + i sin θ)n .

Roots

An n-th root of a (complex) number a is defined as a number z such that

z n = a.

From de Moivre’s formula we find

|z|n ei n arg z = |a| ei arg a .

This implies that |z| must be the n-th root of the non-negative number |a| in the
usual real sense. To determine the argument of z is more subtle due to the ambiguity.
We have
n arg z = arg a + 2kπ,
where k can be any integer. On dividing by n we get
1 2kπ
arg z = arg a + .
n n
The additional summand 2kπ n
is, in general, not an integer multiple of 2π. Therefore
we obtain n different roots corresponding to k = 0, 1, . . . , n − 1, namely
1 i arg a 1 i arg a i arg a i arg a 2(n−1)π i
+ 2π i 1
+ 4π i 1
+
|a| n e n , |a| n e n n , |a| n e n n , . . . , |a| n e n n .
1 i arg a 2nπ i 1 i arg a 2(n+1)π i
Notice that |a| n e n + n , |a| n e n + n , . . . do not give new solutions because
1 i arg a 1 i arg a 2π i
their arguments differ by 2π from the arguments of |a| n e n , |a| n e n + n , . . . .

The n-th root of a complex number z is not a function in the usual sense because

it does not assign to z a unique output. When we write n z for complex z we mean
172

the set of all complex numbers w such that wn = z. This is in contrast to the
definition of the n-th root of a real number.

Example. Compute i.

We have | i | = 1 and arg i = π2 . We find the two roots


√ √ √ √
π
i 2 2 ( π2 + 2π ) i 2 2
e 2 = + i and e 2 =− − i.
2 2 2 2

Example. Compute all n-th roots of 1.

We have |1| = 1 and arg 1 = 0. Therefore the roots are


2π i 4π i 2(n−1)π i
e0 i = 1, e n , e n ,...,e n .

2π i
If we denote e n = ε then all roots can be expressed as

ε, ε2 , . . . , εn (= 1).

♠ Exercises 46. Show that ε + ε2 + · · · + εn = 0.


n+1
(Hint. Use the formula nk=0 q n = q q−1−1 .)
P

Geometrically, these complex numbers represent n points in the plan, which have
distance 1 from the origin. The sectors cut out by two adjacent roots open at an
angle 2π
n
, so that the n roots form a regular n-gon inscribed in the unit circle.

The triangle inequality

For real numbers we have the inequality

|a + b| ≤ |a| + |b|.

The analogous inequality is also true for complex numbers. An equivalent form is

|a − b| ≤ |a| + |b|

(just replace b by −b and use | − b| = |b|.) Now we look at the triangle through the
origin and a, b interpreted as points in the plane. Then |a| and |b| are the length of
the sides 0a and 0b respectively, whereas |a − b| is the length of the side ab. The
geometric meaning of the inequality above is that in any such triangle the length of
the third side cannot be bigger than the sum of the lengths of the other two sides.
This is called triangle inequality. A formal proof is given below.
173

Theorem 28. If z, w ∈ C then


|z + w| ≤ |z| + |w|.
Here equality holds if and only if arg z = arg w (or one of z, w is zero).

Proof. We have
|z+w|2 = |z|2 +|w|2 +2 Re z w̄ ≤ |z|2 +|w|2 +2| Re z w̄| ≤ |z|2 +|w|2 +2|z||w| = |z|2 +|w|2 ,
since
Re z w̄ ≤ | Re z w̄| ≤ |z w̄| = |z||w|.
Equality occurs if Re z w̄ = |z w̄|, i.e.
|z||w| ei(arg z−arg w) = |z||w|,
which requires that z = 0 or w = 0 or arg z = arg w. 2

A similar argument to the proof above can be used to prove the law of cosines:

We compute
|a − b|2 = (a − b)(ā − b̄) = |a|2 + |b|2 − ab̄ − bā
= |a|2 + |b|2 − 2 Re ab̄
= |a|2 + |b|2 − 2 Re |a||b|(cos(arg a − arg b) + i sin(arg a − arg b))
= |a|2 + |b|2 − 2|a||b| cos(arg a − arg b).
Here, we used arg b̄ = − arg b. In our proof we have implicitly used the addition
theorem for sine and cosine.

Final remarks

The methods developed for solving systems of linear equations have been based
on the arithmetic properties of the real numbers. We have seen that the complex
numbers satisfy the same properties. Therefore the whole theory (including the
notion of determinants) carries over to linear equations with complex coefficients.
In such case the solutions will be complex as well.

For solving polynomial equations, the set of complex numbers is even more suit-
able than the set of real numbers. We know that the quadratic equation
x2 + 1 = 0
cannot have a real solution. This follows from x2 ≥ 0, which implies x2 + 1 ≥ 1 > 0.
We have seen that this equation has complex solutions, namely, x = ± i.

In fact, any polynomial (of order at least 1) with complex coefficients has complex
roots. This is the statements of the Fundamental Theorem of Algebra:
174

Theorem 29. Any polynomial equation


an xn + an−1 xn−1 + · · · + a0 = 0
where a0 , . . . , an are arbitrary complex coefficients with an 6= 0 and n > 0 has at
least one complex solution.

The Fundamental Theorem of Algebra is usually attributed to C.F. Gauss, al-


though the first proof is due to J.-R. Argand. The proof requires techniques beyond
this unit. The units on Complex analysis and Topology both feature such proofs.

In the case of quadratic equations the well-known solution formula remains true
and delivers a solution even if the discriminant is negative. For example we can
solve
z2 + z + 1 = 0
by applying the usual quadratic formula

−1 +12 − 4
z =
√2
−1 + −3
= .
2

Clearly the solutions are complex, we need to write them in the standard a + i b
format. We note that
√ √ π i √ 3π i √
−3 = { 3 e 2 , 3 e 2 } = ± i 3.
So the solutions to the quadratic are
√ √
−1 + −3 1 3
z= =− ±i .
2 2 2

Example. Solve the quadratic equation z 2 − (2 − 2 i)z − 1 − 2 i = 0.

We have √
2 − 2i+ 4
z1,2 = = 1 − i ±1 = {− i, 2 − i}.
2

♠ Exercises 47.

1. Express each of the following complex numbers in the form x + i y.

(a) (2 − i)(3 + 2i) (b) (6 + 5i)(2 + 7i)


(c) (3 − 2i)2 (d) i3
2−i 2 1+i
(e) (f) −
1+i 3+i 1−i
1−i
(g) (h) i7
(2 + i)2
175

1 + sin θ + i cos θ
2. Show that = sin θ + i cos θ.
1 + sin θ − i cos θ
3. Solve the following equations for z, writing your solution in the form a + ib

(a) (−1 + 2i)z − 1 = 3i


(b) z 2 + 2i + 5 = 0
(c) 5z 2 − 4z + 1 = 0.

4. Find all solutions of the equation

z 2 = 6 − 8i.

5. For each of the following complex numbers write down the complex conjugate
and modulus

(a) 6 + 2i
(b) 1 − 3i
1+i
(c) √
2
1
(d) 1+i
2−3i
(e) 1−i

(f) i.

6. Let z1 , z2 ∈ C. Show that

|z1 + z2 |2 + |z1 − z2 |2 = 2|z1 |2 + 2|z2 |2 .


 
z1 z1
7. For z1 , z2 ∈ C prove that = , for z2 6= 0.
z2 z2
8. Show that arg(−z) = arg(z) + π.

9. Find a formula for sin 3θ. (Hint. Use de Moivre’s theorem.)


176

28 The Inner or dot Product

The content of this and the next lecture will be taught in the second year unit
Pmth212.

From school mathematics we are used to measuring lengths to line segments


and angles to pairs of intersecting lines. How are we to do this in our vector space
setting?

In general, lengths and angles between vectors are defined using what is known
as an inner product. The inner product is a mapping, which associates to each pair
of vectors a scalar. We will not pursue things in such generality here. The interested
student will meet inner products in the units Pmth212 and Pmth213.

What we require here is an inner product which leads naturally to the Euclidean

distance measure via the Pythagoras theorem.

In fact we just about have such an inner product at hand. Take two vectors
x = (x1 , x2 , . . . , xn ) and y = (y1 , y2 , . . . , yn ) in Rn , then we can define a map
Rn × Rn −→ R as follows

x · y = x1 y1 + x2 y2 + . . . + xn yn .

This inner product (in R3 often called the dot product) of two vectors is easy to
remember, it is just the sum of the products of the components of the two vectors.

The inner product has the following obvious properties:

1. It is symmetric, i.e.
x·y =y·x
177

for any x, y ∈ Rn .

2. It is bilinear, i.e.
(x1 + x2 ) · y = x1 · y + x2 · y,
for any x1 , x2 , y ∈ Rn , and

(αx) · y = α(x · y)

for any x, y ∈ Rn and α ∈ R. (The analogous linearity property with respect


to the second factor holds due to the symmetry.)

3. It is positive definite, i.e.

x · x = (x1 )2 + (x2 )2 + · · · + (xn )2 ≥ 0.

and can be equal to 0 only if all x1 = x2 = · · · = xn = 0, i.e. x = 0.

The length of a vector is now just given as



kxk = x·x
p
= (x1 )2 + (x2 )2 + . . . + (xn )2 .

This is the usual length given by Pythagoras’ theorem. For example in R2

p
The length of u = (x, y) is just kuk = x2 + y 2 .

Example. Let i = (1, 0, 0), j = (0, 1, 0) and k = (0, 0, 1) the so-called standard
vectors in R3 . Calculate the following

(a) i · i (b) j·j (c) k · k (d) i · j


(e) i · k (f) j·k
178

Solution

(a) i · i = 12 + 02 + 02 = 1
The length of i is 1.

(b) j · j = 02 + 12 + 02 = 1

(c) k · k = 02 + 02 + 12 = 1

(d) i · j = 1 × 0 + 0 × 1 + 0 × 0 = 0

(e) i · k = 1 × 0 + 0 × 0 + 0 × 1 = 0

(f) i · k = 0 × 0 + 1 × 0 + 0 × 1 = 0

Example. Calculate the following

(a) a · b where a = (1, −2), b = (3, 4)

(b) (i + j − k) · (2i + j − k)

Solution

(a)

a · b = 1 × 3 + (−2) × 4
= 3−8
= −5

(b) Either use the earlier example after expanding brackets or think of the vectors
in row vector form.

(i + j − k) · (2i + j − k) = 1 × 2 + 1 × 1 + (−1) × (−1)


= 2+1+1
= 4.

We mentioned earlier that inner products also have something to say about the
angle between two vectors. We first look at R2 , where the inner product can be
179

expressed with complex numbers. The inner product of z = (x, y) and w = (u, v) is
z · w = xu + yv = Re z w̄. It follows

z · w = |z||w| Re ei (arg z−arg w) = |z||w| cos(arg z − arg w) = |z||w| cos θ,

where θ = arg z − arg w is the angle between the vectors z and w.

The following theorem shows explicitly how the dot product gives you informa-
tion on the angle between a pair of vectors in any Rn .

Theorem 30. Let θ be the acute angle between two vectors z and w in Rn . Then

z · w = kzkkwk cos θ. (19)

Proof. Consider the triangle OP Q where O is the origin and P, Q are the tips of
the vectors z, w with tails placed at O. Then the lengths of the sides are
√ √ p
|OP | = z · z, |OQ| = w · w, |P Q| = (z − w) · (z − w).

The laws of cosines states

|P Q|2 = |OP |2 + |OQ|2 − 2|OP ||OQ| cos θ.

In terms of the inner product this can be rewritten as

(z − w) · (z − w) = z · z + w · w − 2kzkkwk cos θ.

This yields
1
kzkkwk cos θ = (z · z + w · w − (z − w) · (z − w))
2
1
= (z · z + w · w − z · z − w · w + z · w + w · z)
2
1
= (z · w + w · z)
2
=z·w

as required. 2

A consequence of the relation (19) is the important Cauchy-Schwarz inequality

|x · y| ≤ kxkkyk,

which follows from | cos θ| ≤ 1.

Our theorem gives also a nice criterion for determining when two vectors are
orthogonal (i.e. perpendicular).
180

Corollary Two non-zero vectors u and v are orthogonal if and only if u · v = 0.

Proof. The proof is a very simple consequence of the earlier theorem. Note that it
is an ‘if and only if’ proof. Firstly, if u and v are orthogonal then the angle between
them, θ, is π2 so

u · v = kukkvk cos θ
π
= kukkvk cos = 0.
2
On the other hand if u · v = 0 then, as kuk =
6 0 and kvk = 6 0, we have cos θ = 0.
π
As θ is the acute angle between u and v, θ = 2 . The vectors are orthogonal. 2

Example. Find the angle between the following two lines

OP : joining 0 to (1, 1, 2)
OQ : joining 0 to (0, 1, 1, ).

Solution. We have
−→
OP = (1, 1, 2)(= i + j + 2k)
−→
OQ = (0, 1, 1)(= j + k).

−→ −→
So OP · OQ = 1 × 0 + 1 × 1 + 2 × 1 = 3.
−→ √ √
Also, |OP | = 12 + 12 + 22 = 6 and
−→ √ √
|OQ| = 02 + 12 + 12 = 2.
−→ −→
If θ is the angle between OP and OQ then we have
−→ −→ −→ −→
OP · OQ = |OP ||OQ| cos θ.

So,


3 =6 · 2 cos θ
3 3
i.e. cos θ = √ √ = √
6 2 12
3
= √
2 3

3
=
2

Hence the angle θ is π


6
or 30◦ . 2

Example. Use vectors to prove that the median drawn from the vertex made by the
equal sides of an isosceles triangle is perpendicular to the third side of the triangle.
181

Solution. Let a, b, c and d be as shown

Notice that the median d bisects the base of the isosceles triangle represented
by 2c. We use the vector rule of addition

a = c + d and
d = c + b.

From this pair of equations we deduce that


1
d = (a + b) and
2
1
c = (a − b).
2

1
So that d · c = (a · a + a · b − b · a − b · b)
4
1
= (kak2 − kbk2 ),
4

since kuk = u · u for any vector u. However, as the triangle is isosceles kak = kbk
— the sides given by a and b have equal length. Thus,

d · c = 0.

We conclude that the median (represented by d) is perpendicular to the base (rep-


resented by 2c). 2

Orthogonal Projection

In R3 our basis vectors i, j and k are mutually orthogonal (each one is perpen-
dicular to the other two), unit vectors (they all have length 1).
182

A general vector u in R3 can be written as

u = u1 i + u2 j + u3 k,

where the ui are the components of u with respect to the basis i, j, k. We can think
of u1 as the component of the projection onto i of u — in fact it is the perpendicular
or orthogonal projection.

In the same sense u2 and u3 are the projections onto j and k respectively.

We now want to use our inner product to characterise such projections. We note
that

u1 = i · u
u2 = j · u
and u3 = k · u.

So we find the component u1 of the projection of u onto i by simply taking the dot
product.

Let’s generalise. Let e be any vector, suppose we want to find the component
of the projection of u onto e. First, we need to make e into a unit vector, i.e a
vector of length 1. We are interested only in the component of u in the direction of
e. The unit vector in the e direction is
e
ê = .
kek

Note that, ê · ê = kee·e ek2 = 1, so ê has indeed got unit length.


= kke
k2 k2
183

The required component of projection is now simply

ê · u.

The projection of the vector u onto e is then the vector of length ê · u in the e i.e.
ê, direction.

The orthogonal projection of u onto a nonzero vector e is

proje u = (ê · u)ê,

a vector of length (ê · u) in the ê direction.

As ê = ke
ek this can also be written as
e·u
proje u = e.
kek2

Note |proje u| = |ê · u| = |eke·uk | .

Notice that the vector labelled v is orthogonal to e (and proje u). It is known
as the component of u orthogonal to e. In fact, using the vector addition rule

v = u − proje v.

Example. Find the orthogonal projection and component orthogonal to it for

u=i+j+k

in the direction of e = i + j.

Solution. Unit vector in e direction,


e i+j 1
ê = =√ = √ (i + j).
kek 2
1 +1 2 2
184

1 √
Then ê · u = √ (1 + 1) = 2, so that
2

2
proje u = √ (i + j)
( 2)2
1
= √ (i + j).
2
The vector orthogonal to proje u is
1 1
u − proje u = (1 − √ )i + (1 − √ )j + k.
2 2
2

♠ Exercises 48.

1. In each part find the inner product of the vectors and the cosine of the angle
between them.

(a) u = i + j, v = i − j
(b) u = (1, −1), v = (2, −3)
(c) u = 2i − j + k, v = −i + 3j + k.
(d) u = i + j − k, v = 3i − k.

2. Use vectors to show that A(2, −1, 1), B(3, 2, −1) and C(7, 0, −2) are vertices
of a right angled triangle.

3. In each part find the orthogonal projection on e = i + j − k and also the


vector component orthogonal to e.

(a) u = 4i − j + 7k (b) u = i + j + k
(c) u = i − 2j (d) u = −i + j.

*4. Use vectors to prove that the angle inscribed in a semi-circle is a right angle.

Oriented area

Let z and w be vectors in the two-dimensional plane, which can again be ex-
pressed through complex numbers z = x + i y, w = u + i v. These vectors span a
triangle with vertices 0, z, w. The area of this triangle is
1
|z||w| sin θ,
2
where θ ∈ [0, π] is the angle between the vectors z and w. We have

x u
|z||w| sin θ = Im z̄w = xv − yu = .
y v
185

The expression
1 1 x u
|z||w| sin θ =
2 2 y v
can become positive, zero or negative if θ is interpreted as the angle between z and
w in counterclockwise orientation. The sign changes if we swap the two vectors.
Thus the expression includes two pieces of information: the area (as absolute value)
and the orientation (as sign). We call the number

1 x u
2 y v

the oriented area of the triangle spanned by the two vectors z and w. The traditional
area is then just the absolute value of that expression.

The expression
x u
y v

can be interpreted as a scalar-valued product of the vectors z = (x, y) and w = (u, v)


in R2 , similar to the dot product. We denote this product by z ∧ w. This wedge
product is only defined for vectors in R2 . It is bilinear, like the dot product, however
it is antisymmetric
z ∧ w = −w ∧ z.

The wedge product gives the oriented area of the parallelogram spanned by the
vectors z, w.

Remark. Felix Klein, a prominent mathematician of the 19th and early 20th
century, initiated a revision of the school curriculum in mathematics in his time.
Many of his thoughts are summarised in the book “Elementary mathematics from
an Advanced Standpoint”. This book was meant as a contribution to the training
of maths teachers. One of the first topics in geometry is the oriented area. He shows
that many statements in geometry become more natural when area is replaced by
oriented area. E.g., it is a standard procedure to compute the area of a convex
polygon by dissecting it into triangles with one common vertex inside the polygon
and the other vertices being adjacent vertices of the polygon. This procedure will
also work for non-convex polygons and an arbitrary common vertex if oriented areas
are used. This idea has far-reaching consequences for computing the area of a
curvilinear shape. This will be studied in MTHS130.

Example. Compute the area of the pentagon with vertices (−1, −1), (1, −1), (0, 0),
(0, 1), (−1, 0).

This pentagon is not convex but using orientated areas we can express the area
186

as
 
1 −1 1 1 0 0 0 0 −1 −1 −1
A= + + + +
2 −1 −1 −1 0 0 1 1 0 0 −1
1
= (2 + 0 + 0 + 1 + 1) = 2
2

Another application of the wedge product u ∧ v is a test for linear dependence.


We have
u∧v =0
if and only if sin θ = 0 or u = 0 or v = 0. This corresponds exactly to the situation
when u and v are linearly dependent.
187

29 The Cross Product

For our final lecture on vectors and vector spaces we want to examine a notion
which is very specific to vectors in R3 . This is the cross product. Although there
are generalisations of the vector product to higher dimensional vector spaces they
require more technical machinery, only in R3 does the vector product have a natural
definition within the vector space itself.

What we want to do is to define a “product” of two (non-parallel) vectors which


produces a new vector orthogonal (perpendicular) to the original pair. Here is our
definition.

If u = u1 i + u2 j + u3 k and v = v1 i + v2 j + v3 k are two vectors in


R3 then the cross product u × v is the vector defined by

u × v = (u2 v3 − u3 v2 )i − (u1 v3 − u3 v1 )j + (u1 v2 − u2 v1 )k.

There are in fact deeper mathematical reasons why we would choose such a
bizarre looking definition. We’ll just have to accept it for the time being. At least
until you have done some more mathematics. What we want to do is explore some
of the consequences of the definition. The cross product became popular initially
because of its great utility in applications to fluid mechanics and electromagnetism.

Our definition of the cross product is, as it stands, difficult to use and remember.
However, if you look at the three components of u × v, i.e. (u2 v3 − u3 v2 ), −(u1 v3 −
u3 v1 ) and (u1 v2 − u2 v1 ), you should be reminded of the determinant! You can verify
for yourself the following formula.

i j k
u×v = u1 u2 u3 .
v1 v2 v3

In practice this is how one remembers the cross product definition.

Example. Calculate u × v where u = i − j + k and v = 2i + 3j − k. Verify that


u × v is orthogonal to u and v.
188

Solution.

i j k
u×v = 1 −1 1
2 3 −1
= [(−1) × (−1) − 3 × 1]i − [1 × (−1) − 2 × 1]j + [1 × 3 − 2 × (−1)]k
i.e. u × v = −2i + 3j + 5k.

To check the orthogonality of u and v with u × v we need to calculate the angle


between u and u × v; and, v and u × v. We use the inner product formula. Let θ
be the angle between u and u × v. Then,

u · (u × v)
cos θ =
kukku × vk
1 × (−2) + (−1) × 3 + 1 × 5
= p p
12 + (−1)2 + 12 (−2)2 + 32 + 52
= 0.

So cos θ1 = 0 and θ1 = π2 , u is orthogonal to u × v. 2

It is worth noting at this point the differences between the scalar and cross
products.

• The inner (or dot) product is defined on any Rn . The cross product is defined
only in R3 .

• The inner product produces a scalar, i.e. u · v is a scalar. The cross product
produces a vector, i.e. u × v is a vector.

Properties of the Cross Product

We summarise the main properties of the cross product in the following theorem.

Theorem 31. If u, v and w are any vectors in R3 and λ is any scalar, then

1. u × v = −(v × u) (anti-commutativity)

2. u × u = 0 (this is actually a consequence of 1.)

3. λ(u × v) = (λu) × v = u × (λv)

4. w × (u + v) = w × u + w × v (Properties 3. and 4. are called bilinearity.)


189

5. u · (u × v) = 0 and v · (u × v) = 0.

6. u × (v × w) − (u × v) × w = v × (u × w). This property is called Jacobi


identity. It shows that the cross product is not associative.

7. u × (v × w) = v(u · w) − w(u · v).

Proof.

1. follows from the determinantal formula for u × v — interchange the rows of


the determinant to create v × u, but interchanging rows of a determinant
multiplies the determinant by −1.

2, 3, and 4 also follow easily from the determinant formula. They are left as an
exercise.

5. says that both u and v are perpendicular to u×v. The proof is easy, following
from the general formulae for the dot and cross products.

6. A direct verification is possible but rather tedious. Using bilinearity one can
reduce the problem to verifying the identity just for combinations of the basis
vectors i, j and k. Moreover, if one basis vector appears twice, one of the
products vanish and the other two become identical, thus the identity holds.
Using the symmetry of the identity it is enough to prove it for u = i, v = j
and w = k. In this case all three products vanish.

7. We leave this as a (challenging) exercise. 2

Note that the cross product anti–commutes, i.e. u × v = −v × u, and is not


associative. This is quite unlike ordinary multiplication and the inner product.

Example. The vectors i, j and k are mutually orthogonal unit vectors show that

i × j = k, j × k = i and k × i = j

Solution.
190

We will show i × j = k. Note


j = 1i + 0j + 0k
and j = 0i + 1j + 0k,
i j k
i×j = 1 0 0
0 1 0
0 0 1 0 1 0
= i− j+ k
1 0 0 0 0 1
= k.
The other formulae follow in a similar manner. 2

You will recall that we were able to calculate the scalar product in terms of the
lengths of the vectors and the angle between them. Is a similar type of formula valid
for the cross product? The following theorem provides the answer.
Theorem 32. Let u and v be vectors in R3 with θ being the smaller angle between
them. Then
ku × vk = kukkvk sin θ.

Proof. We have
u·v
cos θ = ,
kukkvk

so sin θ = 1 − cos2 θ
s  2
u·v
= 1− .
kukkvk
Then,
s
(u · v)2
kukkvk sin θ = kukkvk 1−
kuk2 kuk2
p
= kuk2 kvk2 − (u · v)2
q
= (u21 + u22 + u23 )(v12 + v22 + v32 ) − (u1 v1 + u2 u2 + u3 v3 )2
p
= (u2 v3 − u3 v2 )2 + (u1 v3 − u3 v1 )2 + (u1 v2 − u2 v1 )2
= ku × vk. 2

Notice in proving our formula we derived the following interesting formula


ku × vk2 = kuk2 kvk2 − (u · v)2 .
We have the following easy corollary.

Corollary. Let u and v be two non-zero vectors in R3 . Then


191

(a) The area of the parallelogram with sides u, v is ku × vk.

(b) u × v = 0 if and only if u and v are parallel.

Proof.

(a)

Area of the parallelogram = (base) × (perpendicular height)


= kukkvk sin θ
= ku × vk.

(b) u and v are assumed nonzero so kuk =


6 0 and kvk =
6 0. So we have

u × v = 0 if and only if sin θ = 0.

This is true if and only if θ = 0 or θ = π. So u × v = 0 if and only if u and v


are parallel (or anti-parallel).

Example. Find the area of the triangle whose vertices are

P1 (1, 1, 1), P2 (−1, 1, 0) and P3 (0, 2, 1).

Solution.

The area of the triangle A, say, is half the area of the parallelogram determined
by vectors
−−→
P1 P2 = (−1 − 1, 1 − 1, 0 − 1)
= −2i − k
−−→
and P3 P2 = (−1 − 0, 1 − 2, 0 − 1)
= −i − j − k.
192

So
1 −−→ −−→
A= P1 P2 × P3 P2 .
2
Now,

i j k
−−→ −−→
P 1 P2 × P 3 P2 =
−2 0 −1
−1 −1 −1
= −i − j + 2k.
1 1p
Then A = | − i − j + 2k| = (−1)2 + (−1)2 + 22
2 2√ r
6 3
= = .
2 2
2

The Mixed Triple Product

The fact that the cross product produces a vector means that we can define a
product of three vectors using the cross product and the inner product.

If u, v and w are vectors in R3 we define the mixed triple product


of u, v and w as the scalar

u · (v × w).

We can give a rather nice formula for the triple product in terms of a determinant.

i j k
v×w = v1 v2 v3
w1 w2 w3
v2 v3 v1 v3 v1 v2
= i− j+ k
w2 w3 w1 w3 w1 w2

So,

v2 v3 v1 v3 v1 v2
u · (v × w) = u1 − u2 + u3
w2 w3 w1 w3 w1 w2
u1 u2 u3
= v1 v2 v3 .
w1 w2 w3
193

u1 u2 u3
u · (v × w) = v1 v2 v3 .
w1 w2 w3

Example. Calculate the triple product u · (v × w) if u = i + j − k, v = 2i − j and


w = −i + 3k.

Solution.

1 1 −1
u · (v × w) = 2 −1 0
−1 0 3
= −8.

The scalar triple product has a geometrical interpretation as the oriented volume
of the parallelepiped defined by the three vectors u, v and w. This can be seen as
follows,

Volume of parallelepiped, V = (Area of base) × (perpendicular height)


= |v × w|h.

Where h is the perpendicular height,

|u · (v × w)|
h = projv ×w u = kv × wk
kv × wk2
|u · (v × w)|
= .
kv × wk

So we have

V = |u · (v × w)|,
or V = ±u · (v × w).

As in the case of the oriented area, the triple product gives additional information
of a + or − sign. The + indicated that the vectors u, v, w follow the right hand
rule, e.g. the thumb of the right hand points in w direction when your fingers move
u into v.

The oriented area of a parallelogram can be derived from the triple product in
the following way: Let u = (u1 , u2 , 0) and v = (v1 , v2 , 0) be two vectors in the
x, y-plane. Then the oriented area of the parallelogram formed by u, v is equal to
194

the oriented volume of the parallelepiped formed by u, v and w = (0, 0, 1). Notice
that w has length 1 and is perpendicular to the x, y-plane. Now

u1 u2 0
u u
u · (v × w) = v1 v2 0 = 1 2 .
v1 v2
0 0 1

Example. Verify the parallelepiped volume formula by calculating the volume of


the unit cube with sides i, j and k.

Solution

Volume = |i · (j × k)|
= |i · i|
= 1.

The triple product can also be used as a test of linear dependence of three vectors
in R3 . The vectors      
u1 v1 w1
u = u2 , v = v2 , w = w2 
    
u3 v3 w3
are linearly dependent if an only if they lie in the same plane, that is the volume of the
parallelepiped spanned is zero. Therefore, the three vectors are linearly dependent
if and only if the determinant

u1 u2 u3
v1 v2 v3 = 0.
w1 w2 w3

♠ Exercises 49.

1. If u = i + 2j − k, v = −4i + j + 2k calculate the following

(a) u × v
(b) u × (u + v)
(c) the area of the triangle with u and v as two of its sides.

2. Prove property 5 of cross products:

u · (u × v) = 0 and v · (u × v) = 0.

3. Let u = i − j, v = 2i − j + 2k and w = 2j − 3k. Calculate


195

(a) (u × v) × w (b) u × (v × w)
(c) u · (v × w) (d) v × (w × u)

4. Let P1 , P2 , P3 and P4 be the following four points in R3 , P1 (−1, 0, 0), P2 (0, 1, −1),
P3 (1, 0, 1), P4 (0, 0, 1). Calculate

(a) the area of the triangle formed by P1 , P2 and P3 ,


(b) the volume of the parallelepiped with sides given by the three vectors
−−→ −−→ −−→
P1 P2 , P1 P3 and P1 P4 .

5*. Let d be the perpendicular distance from a point P to the line through two
points Q and R. Show that
−→ −→
|P Q × QR|
d= −→ .
|QR|

30 Appendix: Archimedean axiom

p s
It is easy to show that for any two positive rational numbers x = q
and y = t
there
is a natural number n such that
xn > y.
Indeed, just take n = 2qs. Then
s
xn = 2ps > s ≥ = y.
t
For real numbers we stipulate this as an additional axiom that makes sure that there
aren’t “too many” real numbers. This is the Archimedean axiom:

For any two positive real numbers x, y there is a natural number n


such that xn > y.

The Archimedean axiom essentially says that we can make a positive number
arbitrarily large by adding sufficiently many copies of it. It is clearly equivalent to
the statement:

For any two positive real numbers x, y there is a natural number n


such that ny < x.

This axiom is needed to prove seemingly obvious statements like “The set N is
not bounded” or “For any two real numbers a < b there exists a rational number c
such that a < c < b.

Proposition 11. The set of natural numbers N is unbounded above.


196

Proof. We show that the assumption that N is bounded above contradicts the
Archimedean axiom. Assume that there is an upper bound K ∈ R that is

n=n·1≤K

for all n ∈ N. This means that the Archimedean axiom does not hold for x = 1 and
y = K. 2

The following Corollary is just a reformulation of the Proposition above:

Corollary 3.
∀ K ∈ R ∃n ∈ N such that n > K.

It turns out that the unboundedness of the set of natural numbers N in R is


equivalent to the Archimedean axiom. The converse of Proposition 11 is also true:

Proposition 12. If the Archimedean axiom is not satisfied then N is bounded.

Proof. If the Archimedean axiom is not satisfied then there exist positive real
numbers x, y such that nx ≤ y for any n ∈ N . This means that xy is an upper bound
for N. 2

We will need the following

Lemma 1. Let a > 0 be a real number. Then there exists a unique natural number
s such that s ≤ a and s + 1 > a.

Proof. We give a proof by contradiction and induction. Assume that such


number does not exist and consider the set S of all natural numbers s with s ≤ a.
The set S is bounded above by a. Clearly, 0 ∈ S. Our assumption means that
for any s that belongs to S, s + 1 does belong to S as well. By induction, S = N
which contradicts Proposition 11. The contradiction proves that the desired number
s exists.

We prove uniqueness. Let s and t be two such integers. Then

s≤a<s+1
t≤a<t+1

implies

t<s+1
s<t+1
197

hence
0 ≤ |t − s| < 1.
Since t − s is an integer it follows that t − s = 0, thus s = t. 2

♠ Exercises 50. Show that for any real number a there exists an integer s such that
s ≤ a and s + 1 > a.

We are now ready to prove a stronger version of the density property for rational
numbers:

Theorem 33. For any two real numbers a < b there exists x ∈ Q such that a <
x < b.

Proof. First, we find a natural number n such that n(b−a) > 1. Then we choose
another natural number m > −na. Then the interval (an + m, bn + m) has length
greater than 1 and an + m > 0. Our aim is to show that this interval contains an
integer. Indeed, by Lemma 1 there exists a natural number s such that s ≤ an + m
and s + 1 > an + m. On the other hand s + 1 ≤ an + m + 1 < bn + m and therefore

an + m < s + 1 < bn + m

that is
s+1−m
a< < b.
n
Therefore the rational number s+1−m
n
has the desired property. 2

♠ Exercises 51. Show that for any two real numbers a < b there are infinitely many
rational numbers x such that a < x < b.

Another consequence of Lemma 1 is:

Theorem 34. Any real number a is the limit of a sequence of rational numbers.

Proof. Given a real number a. For any positive integer n there is an integer sn
such that
sn ≤ an < sn + 1
and hence
sn sn + 1
≤a< .
n n
Now,
sn
lim =a
n→∞ n
198

because
 
1 sn sn + 1 sn 1 1
∀ε > 0 ∃N = ∀n > N : a− < − = < < ε. 2
ε n n n n N

Finally, let us show that any real number can be expressed in a unique way as
an infinite decimal fraction. For a non-negative real number we can write
n
X
x = s0 .s1 s2 s3 · · · = lim sj 10−j ,
n→∞
j=0

where sj ∈ N and 0 ≤ sj ≤ 9 for j > 0. For negative x we can find the decimal
representation for
−x = s0 .s1 s2 s3 . . .
and get
x = −s0 .s1 s2 s3 . . .

We show by induction that there exist unique sj such that

0 ≤ x − xn < 10−n

with n
X
xn = sj 10−j .
j=0

From Lemma 1 we get the unique s0 ∈ N such that

s0 ≤ x < s0 + 1,

which is equivalent to

0 ≤ x − x0 = x − s0 < 1 = 100 .

This starts the induction. For the induction step assume that unique s0 , s1 , . . . , sn
exist such that
0 ≤ x − xn < 10−n ,
which is equivalent to
0 ≤ 10n+1 (x − xn ) < 10.
To satisfy the inequalities

0 ≤ x − xn − sn+1 10−n−1 < 10−n−1

we need
sn+1 10−n−1 ≤ x − xn < (sn+1 + 1)10−n−1 ,
199

that is
sn+1 ≤ (x − xn )10n+1 < (sn+1 + 1).
Again, by Lemma 1, there exists a unique integer that satisfies the inequality above.
Since
(x − xn )10n+1 < 10
we have sn+1 ≤ 9. By construction

0 ≤ x − xn − sn+1 10−n−1 < 10−n−1 .


Index
ε-neighbourhood, 13 Euler’s identity, 171
even function, 43
antiderivative, 115
argument, 4 function, 4
argument of a complex number, 170 Fundamental Theorem of Algebra, 174
arithmetic progression, 19 Fundamental Theorem of Calculus, 114

bijective, 6 Gauss-Jordan elimination, 144


geometric progression, 19
cardinality, 1 graph, 4
Cartesian product, 3
Cauchy-Schwarz inequality, 180 homogeneous system, 139
ceiling function, 25
increasing function, 42
chain rule, 84
induction, 8
codomain, 4
inhomogeneous system, 139
collinear vectors, 155, 157
injective, 6
completeness, 17
inner product, 177
composition, 67 integers, 1
concave down, 93 intersection, 3
concave up, 91 inverse matrix, 152
conjugate of a complex number, 168
convergent, 24 limit, 24
Cramer’s rule, 151 linear combination, 157
critical point, 97 linear independence, 160
cross product, 188 linear mapping, 139
linear subspace, 157
Darboux sum, 106
de Moivre’s formula, 172 matrix, 138
decreasing function, 42 Mean Value Theorem of Differential Cal-
definite integral, 106 culus, 88
derivative, 75 Mean Value Theorem of Integral Calcu-
derived sequence, 20 lus, 111
determinant, 151 mixed triple product, 193
difference of sets, 3 modulus of a complex number, 169
differentiable function, 75
natural domain, 40
divergent, 24
natural log, 73
domain, 4
natural numbers, 1
element, 1
odd function, 43
empty set, 2
orthogonal vectors, 180
equal sets, 2
Euler’s formula, 171 polynomial function, 45
INDEX 201

preimage, 4
primitive, 115
proper subset, 2

range, 4
rational function, 46
rational numbers, 1
reverse triangle inequality, 14
Riemann sum, 108

set, 1
set operations, 2
singleton, 2
span, 157
Squeeze theorem, 33
stationary point, 97
subset, 2
surjective, 5
systems of m linear equations with n un-
knowns, 138

triangle inequality, 14
trivial solution, 139

union, 2
unit vector, 183

value, 4
vector, 137

You might also like