Lecture Notes
Lecture Notes
MTHS120
Lecture Notes
Trimester 1, 2026
2 Numbers 8
3 Sequences 18
4 Limits of sequences 23
6 Infinity as a limit 36
7 Functions 39
8 Transcendental functions 46
9 Continuity of functions 50
10 Limits of functions 56
15 Application: Optimisation 95
16 Integration 103
ii CONTENTS
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 integers Z = {. . . , −2, −1, 0, 1, 2, . . . }. Again, the dots at both sides
indicate that we continue the pattern.
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.
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.
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,
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,
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.
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, . . . }.
If the domain X of a function f : X → Y is finite we can list the pairs (x, f (x))
in a table.
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).
Functions that are both injective and surjective are called bijective.
Compositions of functions
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),
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
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 .
2 Numbers
We assume that you are familiar with natural numbers, integers, rational numbers,
the rules of arithmetic operations and the ordering of numbers.
1. 0 is a natural number
3. Each natural number, except 0 is the successor of exactly one natural number.
0 is not the successor of any natural number
These axioms reflect the structure of natural numbers as a connected graph with
one root, no branching and no loops:
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.
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(6= 0) ∈ Q there exists y ∈ Q such that ay = 1 (the reciprocal of a).
a > b, a = b, a < b
is true.
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.
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
♠ 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(6= 0) ∈ R there exists y ∈ R such that ay = 1 (the reciprocal of a).
Real numbers that are not rational are called irrational numbers.
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|.
|x − 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.
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
|a + b| = −(a + b)
= −a − b
= −a + (−b)
≤ |a| + |b|,
|a + b| = a + b
≤ |a| + |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
So we have (5),
|a − b| ≥ ||a| − |b||.
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.
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 .
[a, b] = {x ∈ R | a ≤ x ≤ b},
(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.
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
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
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.
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.
Now we are ready to formulate the axiom of completeness of the real numbers:
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:
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.
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
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.
A sequence (an )∞
n=0 is called
19
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 .
(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
Let us compute the derived sequences for some list of standard sequences:
p−1
X p k
a0n p p
= (n + 1) − n = n = pnp−1 + · · · .
k=0
k
♠ Exercises 17. Compute the derived sequence for the sequence of reciprocals an =
1
n
. Here we assume that n ≥ 1.
a0 = c
a1 = c + b 0
..
.
n−1
X
an = an−1 + bn−1 = bn−1 + · · · + b0 + c = c + bν
ν=0
21
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.
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
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:
♠ 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 ).
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 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
where dxe is the “ceiling” function that assigns to a real number x the smallest
integer that is greater than or equal to x.
This sequence is also positive and decreasing and seems to approach 0. To confirm
this we need to show that
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
♠ 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| ≥ ε.
which is a contraditction.
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 ,
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 .
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.)
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
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.
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
In this section we investigate the relation between the notions of limit and supremum
and prove some new criteria for convergence.
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.
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
as required. 2
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 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 .
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
then L ≤ K.
Proof. We have
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→∞
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→∞
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→∞
sin n
lim = 0.
n→∞ n
an + 2 1
an+1 = =1+ .
an + 1 an + 1
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
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
Infinity is not a number and cannot be treated as such. A sequence that tends
to infinity is divergent.
♠ 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
lim an = ∞.
n→∞
an ≥ aN .
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.
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.
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 ∞.
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)α
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 ),
A sequence (bn ) is big-O of (an ), written as bn = O(an ), if the sequence of ratios abnn is bounded.
6
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
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
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
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
♠ 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
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 .
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, ∞).
NB. The even roots always take non-negative values. The equation x2m = a has
√ √
two solutions, namely x+ = 2m a and x− = − 2m x.
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.
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).
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
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.
x2 + 1
x−2 ) x3 − 2x2 + x − 2
x3 − 2x2
0 + x − 2
x − 2
0
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
√ 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.
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
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.
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.
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?
Assume we want to compute a function f for an argument x0 but are only able
to compute it for a nearby number x.
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
where ε is a small, but positive (acceptable) error. Now we can reformulate our
basic question:
In the sketches below we illustrate this concept for a function where such control
is possible:
Example.
3. f (x) = x2 . We want
|f (x) − f (x0 )| < ε
This is equivalent to
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
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,
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 )| ≥ ε.
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
1
is not continuous at 0. Hint. Use that sin x1 = 1 for x = π .
2
+ 2kπ
56
10 Limits of functions
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:
∀ε > 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| < ε.
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
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
(b) The proof of part (b) is a bit more intricate. Firstly we observe that
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
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
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
Proof. We prove only part (b). Part (a) and (c) are analogous. The function
f g is continuous at x0 if
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:
lim f (x) = A
x→x−
0
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
lim f (x) = A
x→x+
0
The only change to left-sided limits is that 0 < x0 − x, i.e. x < x0 became
0 < x − x0 , i.e. x > x0 .
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
and
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
and
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
as required. 2
The arithmetic rules for one-sided limits are the same as for limits. The proofs
are analogous.
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→∞
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,
but
lim f (xn ) 6= A. Why?
n→∞
62
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:
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:
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.
so
1
√ √ < 1.
x+1+ x−1
64
Thus we have
√ √
x+1− x−1 2 2
= √ √ < .
x x x+1+ x−1 x
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,
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+
lim f (x) = −∞
x→0−
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.
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
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
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
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]
f (xk ) = k.
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.
Let’s now return to our aim to prove continuity of the elementary functions.
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 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.
(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).
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 )).
δ = min{f (d + ε0 ) − c, c − f (d − ε0 )}. 2
70
lim sin x = 0.
x→0+
We will use the following form of the squeezing principle for limits of functions:
♠ 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)
0 ≤ sin x ≤ x
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
lim sin x = lim sin(x0 + y) = lim sin x0 cos y + cos x0 sin y = sin x0 .
x→x0 y→0 y→0
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
y1 − y0 = f (x1 ) − f (x0 ).
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,
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.
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
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 ).
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
or
∆f = m ∆x + E(x).
df = m ∆x (5)
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.
df = m dx,
76
See the picture below for the geometric meaning of the differential.
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.
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.
|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.
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,
i.e., continuity of f at x0 .
79
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.
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
Next we compute the derivative of f (x) = sin x. We use the addition formula
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 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
sin ∆x ≈ ∆x
81
for small ∆x. Bear in mind that the angle x has to be measured in radians!
f 0 (x) = ax ln a.
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.
Multiplication yields
(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).
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
We have
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.
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
which is equivalent to
F (x) = f (x0 ) + f 0 (g(x0 ))g 0 (x0 )∆x + [α(∆x) + β(∆y)g 0 (x0 ) + β(∆y)α(∆x)]∆x.
lim α(∆x) = 0.
∆x→0
lim β(∆y(∆x)) = 0.
∆x→0
We know that
lim β(∆y) = 0.
∆y→0
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
∆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.
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.
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
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 .
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
Theorem 14. Suppose that the function f is continuous on [a, b] and differentiable
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
(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
as required.
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
Solution.
89
f 0 (x) = 4x3 ,
so f 0 (x) > 0 for x > 0 and f 0 (x) < 0 for x < 0. That is,
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
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 .
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 ∗
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.
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 .
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.
Solution
(a) f (x) = x2 − 5x + 6
f 0 (x) = 2x − 5
f 00 (x) = 2 > 0.
(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
(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
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
15 Application: Optimisation
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.
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)
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
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.
f 0 (x) = 1 + ln x ,
1
f 0 (x) = 1 + ln x = 0 when x = e−1 = .
e
(f) f (x) = x4 is differentiable throughout R. The only critical points are sta-
tionary points. We have
We have:
Example. (a)
98
(b)
(c)
99
(d)
(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.
Example. Find the relative maxima and minima for the following functions.
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 .
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.
(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
(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)
16 Integration
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
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
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.
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.
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
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.
∀ε > 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 .
exists.
Proof. We have two sequences of Darboux sums, namely An and Ān . Clearly,
∀ε > 0 ∃δ > 0 such that ∀x, x0 ∈ [a, b] with |x − x0 | < δ, |f (x) − f (x0 )| < ε.
b−a
If we choose n > δ
then
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.
Example. Show that the Dirichlet function does not have a definite Riemann
integral from 0 to 1.
lim An = 0.
n→∞
lim Ān = 1.
n→∞
Since the limits are different, the definite integral does not exist.
109
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.
2. Comparison principle.
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.
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
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
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.
that the relation 11 remains true even if c does not lie between a and b (or if a > b).
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.)
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
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.
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
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).
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
[F (x)]ba or F (x)|ba .
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.
19 Indefinite Integrals
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, ∞).
1
R
x
dx = ln |x| + C.
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
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.
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
R F (ax+b)
f (ax + b) dx = a
+ C,
eax dx = a1 eax + C
R
Example.
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.
dx
(ii) Calculate dx = du
du.
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
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
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
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
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.
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
−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
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
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).
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.
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
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.
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
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
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
Here we have used that for small ∆xk the expression (∆xk )2 is so small that it can
be neglected.
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
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
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.
(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
a 1
ln = ln a + ln
b b
= ln a − ln b.
ln xn = n ln x.
lim ln x = ∞,
x−→∞
and
lim ln x = −∞.
x−→0+
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).
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 :
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.
d x 1 1
e = d
= 1 = y = ex .
dx y
ln x y
134
ex+y = ex · ey ,
since
x +ln ey x ey )
ex+y = eln e = eln(e = ex ey .
exy = (ey )x .
exy = ex ln a = ax = (ey )x .
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.
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).
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
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.
If O and R are given, the two equations (13) become a system of two linear
equations and two unknowns o and r.
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
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.
Y = A(X) = AX.
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.
Y = AX
AX = B
Proposition 10. The linear mapping Y = AX is injective if and only if the homo-
geneous system AX = 0 has only the trivial solution.
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
It turns out that the following manipulations do not change the solutions and
that they are sufficient to solve the system:
2. scaling (both sides of) any equation by the same non-zero factor
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.
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
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.
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
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.
2x1 + x2 − x3 + x4 = 6
x1 + x3 + 3x4 = 4
3x1 − 2x2 + x3 = 2
x1 + x2 − x4 = −2
Solution.
2 1 −1 1 6
1 0 1 3 4
3 −2 1 0 2
1 1 0 −1 −2
144
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
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
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
0 · x + 0 · y + 0 · z = 0.
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.
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.
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.
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.
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.
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
x + 2y + 3z = −1
3x + y + 2z = 2
2x + 3y + z = 0
Solution
1 2 3 −1
3 1 2 2 .
2 3 1 0
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
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
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
b1 a12 a11 b1
b2 a22 a21 b2
x1 = and x2 = .
a11 a12 a11 a12
a21 a22 a21 a22
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
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
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.
ax + by = c
a − a1
−−→ 2
v = P 1 P 2 = b2 − b 1 .
c2 − c1
153
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
• 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
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
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.
t1 v1 + · · · + tk vk .
The set of all linear combinations of the vectors v1 , . . . , vk is called the span of
v1 , . . . , vk .
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
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 .
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
su1 + tv1 =x − a1
su2 + tv2 =y − a2 .
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 .
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.
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:
t1 v1 + · · · + tk vk = 0
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.
The vectors
2 4
v1 = and v 2 =
3 6
are linearly dependent because the system
2 4 t1 0
=
3 6 t2 0
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
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.
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
Axpart = b
and
Ax0 = 0.
Then xpart + x0 is also a solution because
Any solution x is like this, because the difference x − xpart is a solution of the
homogeneous system:
2x + 3y − z = 0
3x + 2y − z = 0.
2x + 3y − z = 2
3x + 2y − z = 3.
162
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.
We want to define (x, y) · (u, v). A first naive attempt suggests component-wise
multiplication
(x, y) ∗ (u, v) = (xu, yv).
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 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
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.
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.
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
The square of the imaginary unit is a negative real number! We will find out later
that any complex number has a square root.
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.
(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.
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).
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.
x4 − 4 = −3x2
i.e. x4 + 3x2 − 4 = 0.
(x2 + 4)(x2 − 1) = 0,
167
z = 1 + 2i or z = −1 − 2i.
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
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.
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.
(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
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 θ.
θ = 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).
The coordinates (r, θ) = (|z|, arg z) are called polar coordinates. They are very
well adapted to the multiplication of complex numbers.
|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
The second statement is more tricky. Recall the addition formulae for sin and
cos.
This implies that (up to a summand of 2kπ) the argument of the product is the sum
of the arguments of the factors. 2
1 |z 2 | 1
arg = − arg z, arg z̄ = arg = arg = − arg z.
z z z
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).
ei π = cos π + i sin π = −1
13
In school mathematics sometimes cis θ is used instead of ei θ .
171
Roots
z n = 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.
2π i
If we denote e n = ε then all roots can be expressed as
ε, ε2 , . . . , εn (= 1).
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.
|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
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
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
We have √
2 − 2i+ 4
z1,2 = = 1 − i ±1 = {− i, 2 − i}.
2
♠ Exercises 47.
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
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.
The content of this and the next lecture will be taught in the second year unit
Pmth212.
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
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.
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)
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
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
(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.
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
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
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).
(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
|x · y| ≤ kxkkyk,
Our theorem gives also a nice criterion for determining when two vectors are
orthogonal (i.e. perpendicular).
180
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
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
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
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.
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.
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
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
ê · u.
The projection of the vector u onto e is then the vector of length ê · u in the e i.e.
ê, direction.
As ê = ke
ek this can also be written as
e·u
proje u = e.
kek2
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.
u=i+j+k
in the direction of e = i + j.
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.
(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
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
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.
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
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.
u · (u × v)
cos θ =
kukku × vk
1 × (−2) + (−1) × 3 + 1 × 5
= p p
12 + (−1)2 + 12 (−2)2 + 32 + 52
= 0.
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.
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)
5. u · (u × v) = 0 and v · (u × v) = 0.
Proof.
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.
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
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
Proof.
(a)
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 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.
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
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,
|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
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.
(a) u × v
(b) u × (u + v)
(c) the area of the triangle with u and v as two of its sides.
u · (u × v) = 0 and v · (u × v) = 0.
(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
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|
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:
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:
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.
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
Corollary 3.
∀ K ∈ R ∃n ∈ N such that n > K.
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
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.
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.
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 . . .
0 ≤ x − xn < 10−n
with n
X
xn = sj 10−j .
j=0
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
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
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