Sec 7
Sec 7
Looking back at the ten functions that we used at the beginning of Section 6 to motivate the
definition of the limit, we see that
• some of them — f2 , f3 , f6 , f7 , f8 , f9 and f10 — did not approach a limit near the
particular a’s under consideration,
• while the third — f1 — has the function defined at a, and the function value equally
the limit that the function is approaching near a.
This last is definitely “very nice” behavior near a; we capture precisely what’s going on with
the central definition of this section, that of continuity of a function at a point.
Definition of f being continuous at a A function f is continuous at a if
The sense of the definition is that near a, small changes in the input to f lead to only
small changes in the output, or (quite informally), “near a, the graph of f can be drawn with
taking pen off paper”.
Unpacking the ε-δ definition of the limit, the continuity of a function f (that is defined at
and near a) at a can be expressed as follows:
• for all ε > 0
• there is δ > 0
145
7.1 A collection of continuous functions
Here we build up a a large collection of functions that are continuous at all points of their
domains. We have done most of the work for this already, when we discussed limits.
Linear function Let g : R → R be the linear function g(x) = x. Since we have already
established that limx→a g(x) = a = g(a) for all a, we immediately get that g is continuous
at all points in its domain.
Sums, products and quotients of continuous functions Suppose that f and g are both
continuous at a. Then
• as long as g(a) 6= 0, 1/g is continuous at a (proof: that 1/g is defined at and near
a follows from Claim 6.2, and for the limit part of the continuity definition, we
have from the reciprocal part of sum/product/reciprocal theorem for limits that
146
This gives us already a large collection of continuous functions. The list becomes even
larger when we include the trigonometric functions:
Working assumption The functions sin and cos are continuous at all reals.92
This is a reasonable assumption; if we move only slightly along the unit circle from a point
(x, y) = (cos θ, sin θ), the coordinates of our position only move slightly, strongly suggesting
that sin and cos are both continuous.
Armed with this working assumption, we can for example immediately say (appealing to
our previous observations) that
Proof: Unlike previous proofs involving continuity, this one will be quite subtle. Already
we have to work a little to verify that (f ◦ g) is defined at and near a. That it is defined
at a is obvious. To see that it is defined near a, note that f is continuous at g(a), so there
is some ∆0 > 0 such that f is defined at all points in the interval (g(a) − ∆0 , g(a) + ∆0 ).
We want to show that there is a ∆ > 0 such that for all x ∈ (a − ∆, a + ∆), we have
g(x) ∈ (g(a) − ∆0 , g(a) + ∆0 ) (so that then for all x ∈ (a − ∆, a + ∆), we have that (f ◦ g)(x) is
defined). But this follows from the continuity of g at a: apply the ε-δ definition of continuity,
with ∆0 as the input tolerance ε, and take the output δ to be ∆.
92
This is a “working assumption” rather than a theorem; we haven’t yet formally defined the trigonometric
functions, and without a precise and formal definition of the functions, there is no point in even attempting a
proof of continuity.
147
Next we move on to showing that (f ◦ g)(x) → f (g(a)) as x → a. Given ε > 0, we want
to say that if x is sufficiently close to a then |f (g(x)) − f (g(a))| < ε.
Here’s the informal idea: by choosing x close enough to a, we can make g(x) close to g(a)
(since g is continuous at a). But then, since g(x) is close to g(a), we must have f (g(x)) close
to f (g(a)) (since f is continuous at g(a)).
Formally: given ε > 0 there is δ 0 > 0 such that |X −g(a)| < δ 0 implies |f (X)−f (g(a))| < ε
(this is applying the definition of the continuity of f at g(a), with input ε).
Now use that δ 0 as the input for the definition of g being continuous at a, i.e., for
g(x) → g(a) as x → a: we get that there is some δ > 0 such that |x − a| < δ implies
|g(x) − g(a)| < δ 0 , which, by definition of δ 0 , implies |f (g(x)) − f (g(a))| < ε.93
From this theorem, we can conclude that any function that is built from known contin-
uous functions (such as polynomial and rational functions, or sin and cos) using addition,
subtraction, multiplication, division and composition, is continuous at every point in its
domain. So, for example, all of
• sin(1/x)
• x sin(1/x)
• f (x) = [x]94 is defined for all reals, but is discontinuous at infinitely many places,
specifically at the infinitely many integers. Indeed, for any integer t there are values of
x arbitrarily close to t for which f (x) = t (any x slightly larger than t), and values of x
arbitrarily close to t for which f (x) = t − 1 (any x slightly smaller than t), so it’s an
easy exercise that limx→t f (x) doesn’t exist;
• f (x) = [1/x] is defined for all reals other than 0. Arbitrarily close to 0, it is discontinuous
at infinitely many points (so there is a “clustering” of discontinuities close to 0). Indeed,
f is easily seen to be discontinuous at 1 (across which it jumps from 2 to 1), at 1/2
(across which it jumps from 3 to 2), and more generally at ±1/k for every integer k.
93
There were only two things we could have used in this proof: the continuity of f at g(a) and the continuity
of g at a. The only question was, which one to use first? Using the continuity of g at a first would have lead
us nowhere.
94
“[x]” is the floor, or integer part, of x — the largest integer that is less than or equal to x. So for example
[2.1] = [2.9] = [2] = 2 and [−0.5] = [−.001] = [−1] = −1.
148
There are even easy examples of functions that has R as its domain, and is discontinuous
everywhere. One such is the Dirichlet function f10 defined earlier:
1 if x is rational
f10 (x) =
0 if x is irrational.
Indeed, fix a ∈ R. We claim that limx→a f10 (x) does not exist. Let L be given. It must be
the case that at least one of |0 − L|, |1 − L| is greater than, say, 1/10. Suppose |1 − L| > 1/10.
Take ε = 1/10. Given any δ > 0, in the interval (a − δ, a + δ) there must be95 some irrational
x (other than a, which may or may not be irrational; but we don’t consider a when checking
for a limit existing or not). We have f10 (x) = 1, so |f10 (x) − L| > 1/10 = ε. If on the other
hand |0 − L| > 1/10, again take ε = 1/10. Given any δ > 0, in the interval (a − δ, a + δ)
there must be96 some rational x (other than a, which may or may not be rational). We
have f10 (x) = 0, so |f10 (x) − L| > 1/10 = ε. In either case we have the necessary witness to
limx→a f10 (x) 6= L, and since L was arbitrary, the limit does not exist.
A rather more interesting example is the Stars over Babylon function.97 We define it here
just on the open interval (0, 1):
1/q if x is rational, x = p/q, p, q ∈ N, p, q have no common factors
f (x) =
0 if x is irrational.
It takes the value 1/2 at 1/2; at 1/3 and 2/3 it takes the value 1/3; at 1/4 and 3/4 it takes
the value 1/4 (but not at 2/4; that was already covered by 1/2); at 1/5, 2/5, 3/5 and 4/3 it
95
Musn’t there be?
96
Again, musn’t there be?
97
So named by John Conway, for it’s unusual graph; it is also called Thomae’s function, or the popcorn
function.
149
takes the value 1/5; at 1/6 and 5/6 it takes the value 1/6 (but not at 2/6, 3/6 or 4/6; these
were already covered by 1/3, 1/2 and 2/3); et cetera.
We claim that for all a ∈ (0, 1), f approaches a limit near a, and specifically f approaches
the limit 0. Indeed, given a ∈ (0, 1), and given ε > 0, we want to find a δ > 0 such that
0 < |x − a| < δ implies |f (x)| < ε.
Now there are only finitely many x ∈ (0, 1) with f (x) ≥ ε, namely
where 1/n is the largest natural number with 1/n ≥ ε. There are certainly no more than n2
of these numbers; call them x1 , x2 , . . . , xm , written in increasing order. As long as none of
these numbers satisfy 0 < |x − a| < δ, then for x satisfying this bound we have |f (x)| < ε.
So, let δ be any positive number that is smaller than
• the distance from a to the closest of the xi to a (other than a itself, which may or may
not be one of the xi ; but we don’t care, because we don’t consider a when checking for
a limit existing or not).
If 0 < |x − a| < δ, then, because of the first two clauses above, we have that x ∈ (0, 1), so
in the domain of f ; and, because of the third clause, the only number in (a − δ, a + δ) that
could be among the xi ’s is a itself; so, combining, if 0 < |x − a| < δ then x is not among the
xi ’s, so |f (x)| < ε.
This completes the proof that limx→a f (x) = 0. An interesting consequence brings us
back to the topic at hand, continuity: since f (x) = 0 exactly when x is irrational,
Claim 7.2. Suppose f is continuous at a, and that f (a) 6= 0. Then there is some interval
around a on which f is non-zero. Specifically, there is a δ > 0 such that
• if f (a) > 0, then for all x ∈ (a − δ, a + δ), f (x) > f (a)/2, and
150
We won’t give a proof of this, as it is an immediate corollary of Claim 6.2, taking
M = f (a).
This moves us nicely along to our next main point, which is thinking about what can be
said about a function that is known to be continuous not just at a point, but on an entire
interval. We start with open intervals.
So, for example, the function f (x) = 1/(x − 1)(x − 2) is continuous on the intervals (−∞, 1),
(1, 2) and (2, ∞).
For functions defined on closed intervals, we have to be more careful, because we cannot
talk about continuity at the end-points of the interval. Instead we introduce notions of
one-sided continuity, using our previous notions of one-sided limits:
• Say that f : [a, b] → R is continuous on [a, b] if it is continuous at all c ∈ (a, b), is right
continuous at a and is left continuous at b;
• the function that is defined by f (x) = x/|x| away from 0 and is defined to be 1 at 0 is
continuous on the intervals (−∞, 0) and [0, ∞); the function, and
151
An important fact about right and left continuity is that the process of checking continuity
at a is equivalent to the process of checking right and left continuity; this is an immediate
corollary of Theorem 6.6:
Claim 7.3. f is continuous at a if and only if it is both right continuous and left continuous
at a.
A quick corollary of this gives us another way to form new continuous functions from old:
splicing. Suppose that f and g are defined on (a, b), and c ∈ (a, b) has f (c) = g(c). Define a
new function h : (a, b) → R by98
f (x) if x ≤ c
h(x) =
g(x) if x ≥ c
Corollary 7.4. (of Claim 7.3) If f and g are both continuous at c, then h is continuous at
c (and so if f, g are both continuous on (a, b), so is h).
152
If we agreed to just do our mathematics in Q, we could still define functions, and still
define the notion of a function approaching a limit, and still define the notion of a function
being continuous — all of those definitions relied only on arithmetic operations (addition,
subtraction, multiplication, division, comparing magnitudes) that make perfect sense in Q.
All the theorems we have proven about functions, limits and continuity would still be true.
Unfortunately, the “obvious” fact would not be true! The function f : Q → Q given by
f (x) = x2 − 2 is a continuous function, in the Q-world, has f (0) = −2 < 0 and f (2) = 2 > 0,
but in the Q-world there is no x ∈ (0, 2) with x2 = 2 (as we have proven earlier), and so there
is no x ∈ (0, 2) with f (x) = 0: f goes from negative to positive without ever equalling 0.
So, if our “obvious” fact is true, it is as much a fact about real numbers as it is a fact about
continuity, and it’s proof will necessarily involve an appeal to the one axiom we introduced
after P1-P12, namely the completeness axiom.
The “obvious” fact is indeed true in the R-world, and goes under a special name:
Theorem 7.5. (Intermediate Value Theorem, or IVT) Suppose that f : [a, b] → R is a
continuous function defined on a closed interval. If f (a) < 0 and f (b) > 0 then there is some
c ∈ (a, b) (so a < c < b) with f (c) = 0.
We’ll defer the proof for a while, and first make some remarks. The first remark to make
is on the necessity of the hypothesis.99
• Is IVT still true if f is not continuous on all of [a, b]? No. Consider
−1 if x < 0
f (x) =
1 if x ≥ 0.
Viewed as, for example, a function on the closed interval [−2, 2], f is continuous at all
points on the interval [−2, 2] except at 0. Also, f (−2) < 0 while f (2) > 0. But there is
no x ∈ (−2, 2) with f (x) = 0.
• What if f is continuous on all of (a, b), just not at a and/or b? Still No. Consider
−1 if x = 0
f (x) =
1/x if x > 0.
Viewed as, for example, a function on the closed interval [0, 1], f is continuous at all
points on the interval (0, 1). It’s also left continuous at 1. The only place where (right)
continuity fails is at 0. Also, f (0) < 0 while f (1) > 0. But there is no x ∈ (0, 1) with
f (x) = 0.
99
Most important theorem come with hypotheses — conditions that must be satisfied in order for the
theorem to be valid (for the IVT, the hypothesis is that f is continuous on the whole closed interval [a, b]).
Most of the theorems we will see have been refined over time to the point where the hypotheses being assumed
are the bare minimum necessary to make the theorem true. As such, it should be possible to come up with
counterexamples to the conclusions of these theorems, whenever the hypothesis are even slightly weakened.
You should get into the habit of questioning the hypotheses of every big theorem we see, specifically asking
yourself “is this still true if I weaken any of the hypotheses?”. Usually, it will not be true anymore.
153
A second remark is that the IVT quickly gives us the existence of a unique square root of
any positive number:
Claim 7.6. For each a ≥ 0 there is a unique number a0 ≥ 0 such that (a0 )2 = a. We refer to
√
this number as the square root of a, and write it either as a or as a1/2 .
Proof: If a = 0 then we take a0 = 0. This is the unique possibility, since as we have earlier
proven, if a0 6= 0 then (a0 )2 > 0, so (a0 )2 6= 0.
Suppose a > 0. Consider the function fa : [0, a + 1] → R given by fa (x) = x2 − a. This
is a continuous function at all points on the interval, as we have previously proven. Also
fa (0) = −a < 0 and fa (a+1) = (a+1)2 −a = a2 +a+1 > 0. So by IVT, there is a0 ∈ (0, a+1)
with fa (a0 ) = 0, that is, with (a0 )2 = a.
To prove that this a0 is the unique possibility for the positive square root of a, note that
if 0 ≤ a00 < a0 then 0 ≤ (a00 )2 < (a0 )2 (this was something we proved earlier), so (a00 )2 6= a,
while if 0 ≤ a0 < a00 then 0 ≤ (a0 )2 < (a00 )2 , so again (a00 )2 6= a. Hence a0 is indeed unique.
We can go further, with essentially no extra difficulty:
Claim 7.7. Fix n ≥ 2 a natural number. For each a ≥ 0 there is a unique number a0 ≥ 0
√
such that (a0 )n = a. We refer to this number as the nth root of a, and write it either as n a
or as a1/n .
154
Claim 7.8. For all n ≥ 2, n ∈ N, the function fn is continuous on [0, ∞).
Proof: As a warm=up, we deal with n = 2. Fix a > 0. Given ε > 0 we want to find δ > 0
such that |x − a| < δ implies |x1/2 − a1/2 | < ε.
As usual, we try to manipulate |x1/2 − a1/2 | to make an |x − a| pop out. The good
manipulation here is to multiply above and below by |x1/2 + a1/2 |, and use the difference-of-
two-squares factorization, X 2 − Y 2 = (X − Y )(X + Y ), to get
|x1/2 + a1/2 |
|x1/2 − a1/2 | = |x1/2 − a1/2 |
|x1/2 + a1/2 |
|x1/2 − a1/2 ||x1/2 + a1/2 |
=
|x1/2 + a1/2 |
|(x1/2 − a1/2 )(x1/2 + a1/2 |
=
|x1/2 + a1/2 |
|x − a|
=
|x + a1/2 |
1/2
|x − a|
= ,
x + a1/2
1/2
In the case a > 0, repeating the same argument as in the case n = 2 leads to
|x − a| |x − a|
|x1/n − a1/n | = ≤ 1/n n−1 ,
(x1/n )n−1 + (x1/n )n−2 (a1/n ) 1/n 1/n
+ · · · + (x )(a ) n−2 1/n
+ (a ) n−1 (a )
and so continuity of fn at a > 0 follows as before, this time taking any δ > 0 at least as small
as the minimum of a and (a1/n )n−1 ε. Again, right continuity at 0 is left as an exercise.
We know that a1/2 cannot make sense (i.e., cannot be defined) for a < 0: if there was a
real number a1/2 for negative a, we would have (a1/2 )2 ≥ 0 (since squares of reals are always
155
positive), but also (a1/2 )2 = a < 0, a contradiction. By the same argument, we don’t expect
a1/n to make sense for negative a for any even natural number n.
But for odd n, we do expect that a1/n should make sense for negative a, and that is indeed
the case.
Claim 7.9. Fix n ≥ 3 an odd natural number. For each a ∈ R there is a unique number
a0 ∈ R such that (a0 )n = a. We refer to this number as the nth root of a, and write it either
√
as n a or as a1/n .
Extending the function fn defined above to all real numbers, we have that fn : R → R
given by x 7→ x1/n is continuous for all reals.
We will not prove this, but rather leave it as an exercise. The main point is that if
we define, for odd integer n and for any real a, the (continuous) function fa : R → R via
fa (x) = xn − a, then we can find a0 < a00 for which fa (a0 ) < 0 < fa (a00 ). Once we have found
a0 , a00 (which is a little tricky), the proof is very similar to the proofs we’ve already seen.
But in fact we will prove something more general than the existence of a0 , a00 . From the
section on graphing function, we have a sense that if P (x) is an odd-degree polynomial of
degree n, for which the coefficient of xn is positive, then for all sufficiently negative numbers
x we have P (x) < 0, while for all sufficiently positive x we have P (x) > 0. Since P is
continuous, that would say (applying the IVT on any interval [a0 , a00 ] where a0 is negative
and satisfies P (a0 ) < 0, and a00 is positive and satisfies P (a00 ) > 0) that there is some a ∈ R
with P (a) = 0 (and in particular applying this to P (x) = xn − a yields an nth root of a for
every real a).
Claim 7.10. Let P (x) = xn + a1 xn−1 + · · · + an−1 x + an be a polynomial, with n odd. There
are numbers x1 and x2 such that P (x) < 0 for all x ≤ x1 , and P (x2 ) > 0 for all x ≥ x2 . As
a consequence (via IVT) there is a real number c such that P (c) = 0.
Proof: The idea is that for large x the term xn “dominates” the rest of the polynomial — if
x is sufficiently negative, then xn is very negative, so much so that it remains negative after
a1 xn−1 + · · · + an−1 x + an is added to it; while if x is sufficiently positive, then xn is very
positive, so much so that it remains positive after a1 xn−1 + · · · + an−1 x + an (which may itself
be negative) is added to it.
To formalize this, we use the triangle inequality to bound |a1 xn−1 + · · · + an−1 x + an |.
Setting M = |a1 | + |a2 | + · · · + |an | + 1 (the +1 at the end to make sure that M > 1), and
considering only those x for which |x| > 1 (so that 1 < |x| < |x|2 < |x|3 < · · · ), we have
156
It follows that for any x satisfying |x| > 1,
Now take x2 = 2M (note |x2 | > 1). For x ≥ x2 (so in particular x > 0) we have
(note that in the first equality above, we use |x|n−1 = xn−1 , valid since n − 1 is even).
If the coefficient of xn in P is not 1, but some positive real a0 > 0, then an almost identically
proof works to demonstrate the same conclusion (P (x) is negative for all sufficiently negative
x, and positive for all sufficiently positive x, and so P (c) = 0 for some c); and if the coefficient
of xn in P is instead some negative real a0 < 0 then, applying the theorem just proven to the
polynomial −P , we find that P (x) is positive for all sufficiently negative x, and negative for
all sufficiently positive x, and so again by the IVT P (c) = 0 for some c. In other words:
Note that no such claim can be proved for even n; for example, the polynomial P (x) = x2 + 1
never takes the value 0. We will return to even degree polynomials when we discuss the
Extreme Value Theorem.
We now turn to the proof of IVT. As we have already observed, necessarily the proof will
involve the completeness axiom. The informal idea of the proof is: “the first point along the
interval [a, b] where f stops being negative, must be a point at which f is zero”. We will
formalize this by considering the set of numbers x such that f is negative on the entire closed
interval from a to x. This set is non-empty (a is in it), and is bounded above (b is an upper
bound), so by completeness (P13), the set has a least upper bound. We’ll argue that that
least upper bound is strictly between a and b, and that that function evaluates to 0 at that
point.
Proof (of Intermediate Value Theorem): Let A ⊆ [a, b] be
We have a ∈ A (since f (a) < 0), so A is not empty. We have that b is an upper bound for a
(since f (b) > 0), so by the completeness axiom (P13), A has a least upper bound, call it c.
Recall that this means that
157
• c is the least such number (if c0 is any other upper bound then c0 ≥ c).
We will argue that a < c < b, and that f (c) = 0. That c > a follows from left continuity of f
at a, and f (a) < 0 (the proof that if f is continuous and negative at a, then there’s some
δ > 0 such that f is negative on all of (a − δ, a + δ), can easily be modified to show that if f
is right continuous and negative at a, then there’s some δ > 0 such that f is negative on all
of [a, a + δ), so certainly a + δ/2 ∈ A). Similarly, that c < b follows from right continuity
of f at b, and f (b) > 0 (there’s δ > 0 such that f is positive on all of (b − δ, b], so certainly
b − δ/2 is an upper bound for A).
Next we argue that f (c) = 0, by showing that assuming f (c) > 0 leads to a contradiction,
and similarly assuming f (c) < 0 leads to a contradiction.
Suppose f (c) > 0. There’s δ > 0 such that f is positive on (c − δ, c + δ), so c − δ/2 is an
upper bound for A — no number in [c − δ/2, c] can be in A, because f is positive at all these
numbers — contradicting that c is the least upper bound for A.
Suppose f (c) < 0. There’s δ > 0 such that f is negative on (c − δ, c + δ). In fact, f is
negative on all of [a, c + δ) — if f was positive at any c0 < c, c0 would be an upper bound on
A, contradicting that c is the least upper bound for A — and so c + δ/2 ∈ A, contradicting
that c is even an upper bound for A.
There are a few obvious variants of the Intermediate Value Theorem that are worth
bearing in mind, any require virtually no work to prove once we have the version we have
already proven.
• If f is continuous on [a, b], and if f (a) > 0, f (b) < 0, then there is some c ∈ (a, b) with
f (c) = 0. (To prove this, apply the IVT as we have proven it to the function −f ; the c
thus produced has (−f )(c) = 0 so f (c) = 0.)
• If f is continuous on [a, b], with f (a) 6= f (b), and if t is any number that lies between
f (a) and f (b), then there is c ∈ (a, b) with f (c) = t. (To prove this in the case where
f (a) < f (b), apply the IVT as we have proven it to the function x 7→ f (x) − t, and
to prove it in the case where f (a) > f (b), apply the IVT as we have proven it to the
function x 7→ t − f (x).)
158
subset of the domain. For example, we may wish to consider the function x 7→ 1/x not at
being defined on all reals except 0, but rather being defined on all positive reals, or on the
open interval (0, 1). One way to do that is to artificially define the function only on the
particular set of reals that we are interested in; but this is a little restrictive, as we may want
to think about the same function defined on many different subsets of its natural domain.
The approach taken in this definitions, while it may seem a little wordy at first, allows us
this flexibility, and will be very useful in other situations too.
Definition of a function being bounded from above f is bounded from above on a sub-
set S of Domain(f ) if there is some number M such that f (x) ≤ M for all x ∈ S; M is
an upper bound for the function on S.
It’s an easy exercise that f is bounded on S if and only if there is a single number M such
that |f (x)| < M for all x ∈ S.
Basically anything can happen vis a vis upper and lower bounds, depending on the specific
choice of f and S. For example:
• f (x) = 1/x is bounded on [1, 2], and achieves both maximum and minimum;
• f (x) = 1/x is bounded on (1, 2), but achieves neither maximum nor minimum;
• f (x) = 1/x is bounded on [1, 2), does not achieve its maximum, but does achieve its
minimum;
• f (x) = 1/x is not bounded from above on (0, 2), is bounded from below, and does not
achieve its minimum;
• f (x) = 1/x is not bounded from above or from below on its natural domain.
The second important theorem of continuity (IVT was the first) says that a continuous
function on a closed interval is certain to be as well-behaved as possible with regards bounding.
159
Theorem 7.11. (Extreme Value Theorem, or EVT for short) Suppose f : [a, b] → R is
continuous. Then
We will see many applications of the EVT throughout this semester and next, but for the
moment we just give one example. Recall that earlier we used the IVT to prove that if P is
an odd degree polynomial then there must be c with P (c) = 0, and we observed that no such
general statement could be made about even degree polynomials. Using the EVT, we can say
something about the behavior of even degree polynomials.
Proof: Here’s the idea: we have p(0) = an . We’ll try to find numbers x1 < 0 < x2 such that
We then apply the EVT on the interval [x1 , x2 ] to conclude that there is a number x? ∈ [x1 , x2 ]
such that P (x? ) ≤ P (x) for all x ∈ [x1 , x2 ]. Now since 0 ∈ [x1 , x2 ], we have P (x? ) ≤ P (0) = an ,
and so also P (x? ) ≤ P (x) for all x ∈ (−∞, x1 ] and [x2 , ∞) (using (?)). So, P (x? ) ≤ P (x) for
all x ∈ (−∞, ∞).
To find x1 , x2 , we use a very similar strategy to the one used in the proof of Claim 7.10,
to show that if M = |a1 | + · · · + |an | + 1 then there are numbers x1 , x2 with x1 < 0 < x2
such that P (x) ≥ 2n−1 M n for all x ≤ x1 and for all x ≥ x2 (the details of this step are left as
an exercise).
Because M is positive and at least 1, and because n is at least 2, we have
160
carefully, though, to avoid the upper bounds growing unbounded larger, and the lower bounds
unbounded smaller. The approach will be similar to our approach to the IVT: this time, we
find the longest closed interval starting at a on which f is bounded, and try to show that the
interval goes all the way to b, by arguing that it it falls short of b, getting only as far as some
c < b, one application of “local boundedness” allows us to stretch the interval a little further,
contradicting that the interval stopped at c.
Proof (of Extreme Value Theorem): We start with the first statement, that a function f
that is continuous on [a, b] is bounded on [a, b]. We begin by showing that f is bounded from
above. Let
A = {x : a ≤ x ≤ b and f is bounded above on [a, x]}.
We have that a ∈ A and that b is an upper bound for A, so sup A := α exists.
We cannot have α < b. For suppose this was the case. Since f is continuous at α, it is
bounded on (α − δ, α + δ) for some δ > 0. Now we consider two cases.
Case 1, α ∈ A Here f is bounded on [a, α] (by M1 , say) and also on [α − δ/2, α + δ/2]
(by M2 , say), so it is bounded on [a, α + δ/2] (by max{M1 , M2 }), so α + δ/2 ∈ A,
contradicting that α is the least upper bound of A.
We conclude that α = b, so it seems like we are done; but, we wanted f bounded on [a, b],
and sup A = b doesn’t instantly say this, because the supremum of a set doesn’t have to be
in the set.102 So we have to work a little more.
Since f is right continuous at b, f is bounded on (b − δ, b] for some δ > 0. If b 6∈ A, then,
since b = sup A, we must have x0 ∈ A for some x0 ∈ (b − δ, b) (otherwise b − δ would work as
an upper bound for A). So f is bounded on [a, x0 ] and also on [x0 , b], so it is bounded on
[a, b], so b ∈ A, a contradiction. So in fact b ∈ A, and f is bounded from above on [a, b].
and since f bounded on [a, x0 ] for some x0 ∈ (b − δ, b) (our fact again — b 6∈ A), have f
bdd on [a, b].
A similar proof, using the equivalent form of the Completeness axiom introduced earlier
(a non-empty set with a lower bound has a greatest lower bound) can be used to show that f
is also bounded from below on [a, b]; or, we can just apply what we have just proven about
upper bounds to the (continuous) function −f defined on [a, b] — −f has some upper bound
M on [a, b], so −M is a lower bound for f on [a, b].
102
A easy example: sup(0, 1) = 1 which is not in (0, 1). An example more relevant to this proof: consider
g(x) = 1/(1 − x) on [0, 1), and g(1) = 0 at 1. If A = {x : g bounded on [0, x]}, then sup A = 1 but 1 6 inA.
The problem here of course is that g is not continuous at 1
161
We now move on to the second part of the EVT: if f : [a, b] → R is continuous, it achieves
both its maximum and its minimum; there are y, z ∈ [a, b] such that f (z) ≤ f (x) ≤ f (y) for
all x ∈ [a, b]. We just show that f achieves its maximum; the trick of applying this result to
−f will again work to show that f also achieves its minimum.
Consider A = {f (x) : x ∈ [a, b]} (notice that now we are looking at a “vertical” set; a set
of points along the y-axis of the graph of f ). A is non-empty (f (a) ∈ A), and has an upper
bound (by previous part of the EVT, that we have already proven). So sup A = α exists. We
have f (x) ≤ α for all x ∈ [a, b], so to complete the proof we just need to find a y such that
f (y) = α.
Suppose there is no such y. Then the function g : [a, b] → R given by
1
g(x) =
α − f (x)
is continuous function (the denominator is never 0). So, again by the previous part of the
EVT, g is bounded above on [a, b], say by some M > 0. So on [a, b] we have 1/(α−f (x)) ≤ M ,
or α − f (x) ≥ 1/M , or f (x) ≤ α − 1/M . But this contradicts that α = sup A.
We conclude103 that there must be a y with f (y) = α, completing the proof of the
theorem.
103
Somewhat miraculously — the function g was quite a rabbit-out-of-a-hat in this proof.
162