17 Continuous Functions
For the rest of the course, we discuss continuous functions. Functions themselves should be familiar.
For reference, we begin with a review of some basic concepts and conventions.
We are concerned with functions f : U V where both U, V are subsets of the real numbers R and
f is some rule assigning to each real number x U a real number f (x) V. For instance
f (x) =
x
2
(x 7)
(x 2)(x
2
9)
assigns to x = 1 the value f (1) =
1(6)
( 1)(8)
=
3
4
Domain dom f = U is the set of inputs to f . When f is defined by a formula, its implied domain is the
largest set on which the formula is defined: for the above example, dom f = R \ {2, 3, 3}. In
examples, the domain is typically a union of intervals of positive length.
Codomain codom f = V is the set of possible outputs. In real analysis, we often take V = R by default.
Range range f = f (U) = {f (x) : x U}; is the set of realized outputs. It is a subset of V.
Injectivity f is injective/one-to-one if distinct inputs produce distinct outputs. This is usually stated in
the contrapositive: f (x) = f (u) = x = u.
Surjectivity f is surjective/onto if every possible output is realized: otherwise said, f (U) = V.
Inverses f is bijective/invertible if it is both injective and surjective. Equivalently, f has an inverse
function f
1
: V U defined as follows:
Given y V, f surjective = x U such that f (x) = y.
Since f is injective, f (x) = f (u) = x = u, so x is unique. We define f
1
( y) = x.
Example 17.1. The function defined by f (x) =
1
x(x2)
has implied
dom f = R \ {0, 2} = (, 0) (0, 2) ( 2, )
range f = (, 1] (0, )
The function is neither injective (e.g., f (3) = f (1)) nor surjective
(e.g., 0 range f ).
We can remedy both issues by restricting the domain and codomain.
For instance, the same rule/formula but with
dom
ˆ
f = [1, 2) (2, )
codom
ˆ
f = (, 1] (0, )
defines a bijection with inverse function
ˆ
f
1
( y) =
(
1 + y
1
p
y + 1 if y > 0
1 y
1
p
y + 1 if y 1
Observe that dom
ˆ
f
1
= codom
ˆ
f and codom
ˆ
f
1
= dom
ˆ
f .
2
1
1
2
f (x)
1 1 2 3
x
2 1 0 1 2
1
2
3
ˆ
f
1
(y)
y
63
To introduce continuity, we consider two common na
¨
ıve notions.
The graph of f can be drawn without removing one’s pen from the page This is intuitive but un-
usable: drawn is poorly defined, so how could we calculate or prove anything with this concept?
Moreover, it cannot reasonably be extended to other situations (e.g., multivariable functions)
where drawing a graph is meaningless.
If x is close to a, then f (x) is close to f (a) This is better and can be generalized to other situations.
The major issue is the unclear meaning of close. Our formal definition of continuity addresses
this using sequences and limits.
Definition 17.2 (Sequential continuity). Let f : U V R be a function. We say that f is
continuous at u U if,
(x
n
) U, we have lim x
n
= a = lim f (x
n
) = f (a)
f is continuous (on U) if it is continuous at every point a U.
A discontinuity of f is a value a U at which f is discontinuous (not continuous),
(x
n
) U, such that lim x
n
= a and
f (x
n
)
does not converge to f (a)
x
1
f (x
1
)
x
2
f (x
2
)
(a, f (a))
···
.
.
.
lim f (x
n
)
a
Continuity at a: every sequence
with lim x
n
= a has lim f (x
n
) = f (a)
(a, f (a))
x
1
f (x
1
)
x
2
f (x
2
)
···
.
.
.
lim f (x
n
)
f (a)
a
Discontinuity at a: at least one sequence
with lim x
n
= a has lim f (x
n
) = f (a)
Examples 17.3. 1. f : R R : x 7 x
2
is continuous (at every a R). To see this, suppose (x
n
)
converges to a, then, by the limit laws,
lim f (x
n
) = lim x
2
n
= (lim x
n
)
2
= a
2
= f (a)
2. The function with g(x) = 1 +
4
x
2
is continuous. Choose any a dom g = R \ {0} and any
(x
n
) dom g with lim x
n
= a. Again, by the limit laws,
lim g(x
n
) = lim
1 +
4
x
2
n
= 1 +
4
(lim x
n
)
2
= 1 +
4
a
2
= f (a)
This example (with a = 1 and x
n
= 1 +
2
n
) is the first picture in the definition.
64
3. h : [0, ) R : x 7 3x
1/4
is continuous. Again, everything follows from the limit laws. If
x
n
a where x
n
0 and a 0, then
lim h(x
n
) = lim 3x
1/4
n
= 3(lim x
n
)
1/4
= 3a
1/4
= h(a)
4. The function defined by
k(x) =
(
1 + 2x
2
if x < 1
2 x if x 1
is discontinuous at a = 1. This seems obvious from the picture,
but we need to use the definition. The sequence with x
n
= 1
1
n
converges to 1 from below, whence
lim k(x
n
) = lim
1 + 2
1
2
n
+
1
n
2
= 3 = 1 = k(1)
0
2
k(x)
0 2
x
1
k(1)
3
x
n
Basic examples and combinations of continuous functions
By appealing to the limit laws for sequences (Theorem 9.2), we can combine continuous functions in
natural ways. For instance, if f , g are continuous at a, then
lim x
n
= a = lim f (x
n
) + g(x
n
) = lim f (x
n
) + lim g(x
n
) = f (a) + g(a)
whence f + g is continuous at a. Here is a general summary.
Theorem 17.4. 1. Suppose f , g are continuous and that k is constant. Then the following functions
are continuous (on their domains)
k f ,
|
f
|
, f + g, f g, f g,
f
g
, max( f , g), min( f , g)
2. If n N then the function f : x 7 x
1/n
is continuous on its domain.
3. Compositions of continuous functions are continuous. Specifically, if g is continuous at a and f
is continuous at g(a), then f g is continuous at a.
4. Algebraic functions are continuous (this includes all polynomials and rational functions).
Proof. Parts 1, 2 are the limit laws; for the maximum and minimum, see Exercise 2. For part 3:
lim x
n
= a
g cont
= lim g(x
n
) = g(a)
f cont
= lim f
g(x
n
)
= f
g(a)
Part 4 follows from parts 1, 2 and 3.
Example 17.5. Part 3 of the theorem says that the following algebraic function is continuous
f : (7, ) R : x 7→
s
3x
5/2
+ 7x
2
+ 4
(x 7)
1/3
65
Theorem 17.6 (Squeeze theorem). Suppose f (x) g(x) h(x) for all x = a, that f , h are continu-
ous at a, and that f (a) = g(a) = h(a). Then g is continuous at a.
Proof. This is simply the squeeze theorem (8.9) for sequences: if lim x
n
= a, then
f (x
n
) g(x
n
) h(x
n
) = lim g(x
n
) = g(a)
To provide more interesting examples, we state the following without proof.
Theorem 17.7. The common trigonometric, exponential and logarithmic functions are continuous.
It is possible, though slow and ugly to address some of this now, though it is not very profitable. It is
better to define these functions later using power series
32
when their continuity (and differentiabil-
ity/integrability!) come for free.
Examples 17.8. 1. f (x) =
x
sin e
x
is continuous on its domain R \ {ln(nπ) : n N
0
}.
2. The function defined by g(x) = x sin
1
x
if x = 0 and g(0) = 0 is
continuous on R. When x = 0, this follows from Theorems 17.4
and 17.7, while at a = 0 we rely on the squeeze theorem:
x = 0 = x x sin
1
x
x
g(x)
x
The ϵδ Definition of Continuity
The sequential definition of continuity uses limits twice. By stating each of these using the ϵ-definition
of limit, we can reformulate continuity without ever mentioning sequences.
To motivate this, consider f (x) = x
2
at a = 2. By continuity, if (x
n
) is a sequence with lim x
n
= 2,
then lim f (x
n
) = 4. We restate each of these using the definition of limit:
(a) (lim x
n
= 2) δ > 0, M such that n > M =
|
x
n
2
|
< δ
(b) (lim x
2
n
= 4) ϵ > 0, N such that n > N =
x
2
n
4
< ϵ
Here is a short argument that shows how (a) (b) (we’ll revisit this formally in a moment).
Assume (a), let ϵ > 0 be given, and define δ = min(1,
ϵ
5
). Since lim x
n
= 2, M such that
n > M =
x
2
n
4
=
|
x
n
2
||
x
n
+ 2
|
< δ
|
(x
n
2) + 4
|
(by (a))
δ
|
x
n
2
|
+ 4
(-inequality)
< δ(δ + 4) 5δ ϵ ((a) again)
Let N = M to conclude (b).
It turns out not to be very important that (x
n
) be a sequence. In fact we can dispense with it entirely. . .
32
For instance via the Maclaurin series e
x
=
n=0
x
n
n!
, sin x =
n=0
(1)
n
(2n+1)!
x
2n+1
and cos x =
n=0
(1)
n
(2n)!
x
2n
66
Definition 17.9 (ϵδ continuity). A function f : U V R is continuous at a if
33
ϵ > 0, δ > 0 such that (x U)
|
x a
|
< δ =
|
f (x) f (a)
|
< ϵ ()
A discontinuity of f is a value a U for which,
ϵ > 0 such that δ > 0, x U with
|
x a
|
< δ and
|
f (x) f (a)
|
ϵ (†)
f (a) + ϵ
f (a) ϵ
a δ a + δa
x
f (x)
To force f (x)
to live here. . .
. . . it is enough for x
to live here
Continuity at a
a + δa δ
f (a) + ϵ
f (a) ϵ
f (a)
a
x
f (x)
Regardless of δ, there is
always some x here. . .
. . . so that f (x)
does not live here
Discontinuity at a
This is the intuitive interpretation of continuity: if x is close to a, then f (x) is close to f (a); ϵ and δ
are merely measures of closeness. Most mathematicians consider the ϵδ version to be the definition
of continuity. Thankfully, it doesn’t matter which you prefer. . .
Theorem 17.10. The sequential and ϵδ definitions of continuity (17.2 & 17.9) are equivalent.
Examples (17.3, cont). Before seeing the proof, we repeat our earlier examples using the ϵδ defini-
tion. As with ϵN arguments for limits, it is often useful to do some scratch work first.
1. Suppose f (x) = x
2
and a R. Our goal is to control the size of
x
2
a
2
whenever
|
x a
|
is
small. To keep things simple, assume
|
x a
|
< 1, then,
x
2
a
2
=
|
x a
||
x + a
|
=
|
x a
|
(x a) + 2a
|
x a
|
|
x a
|
+ 2
|
a
|
=
|
x a
|
(1 + 2
|
a
|
)
Now let ϵ > 0 be given and define δ = min(1,
ϵ
1+2
|
a
|
). Then
|
x a
|
< δ =
|
f (x) f (a)
|
=
x
2
a
2
< δ(1 + 2
|
a
|
) ϵ
Thus f is continuous at a. This is simply a general version of the argument on page 66 with all
mention of sequences removed!
33
The bracketed statement x U is often omitted in (), since the implication requires x to be universally quantified. It
is important that x U = dom f rather than merely x R! By contrast, the expression x U in (†) is always written.
67
2. Let g(x) = 1 +
4
x
2
and a = 0. The first challenge is to control
1
x
by staying away from zero: to
do this, we start by insisting that δ
|
a
|
2
. But now,
|
x a
|
< δ =
|
x
|
>
|
a
|
2
=
1
|
x
|
<
2
|
a
|
()
Now consider the required difference; if
|
x a
|
< δ, then
|
g(x) g(a)
|
=
1 +
4
x
2
1
4
a
2
=
4
a
2
x
2
a
2
x
2
=
4
|
a + x
|
a
2
x
2
|
x a
|
4
1
|
a
|
x
2
+
1
a
2
|
x
|
|
x a
|
()
< 4
4
|
a
|
3
+
2
|
a
|
3
!
|
x a
|
=
24
|
a
|
3
δ
Given ϵ > 0, it suffices to let δ = min(
1
2
|
a
|
,
1
24
|
a
|
3
ϵ). Then
|
x a
|
< δ =
|
f (x) f (a)
|
< ϵ.
3. For h(x) = 3x
1/4
, there are two cases. Suppose ϵ > 0 is given.
If a = 0, let δ =
ϵ
3
4
, then
34
|
x a
|
< δ = 0 x < δ =
|
h(x) h(a)
|
= 3x
1/4
< 3δ
1/4
= ϵ
If a > 0, let δ =
1
3
a
3/4
ϵ. Then, if
|
x a
|
< δ, we have
|
h(x) h(a)
|
= 3
x
1/4
a
1/4
=
3
|
x a
|
x
3
4
+ a
1
4
x
2
4
+ a
2
4
x
1
4
+ a
3
4
3
|
x a
|
a
3/4
<
3δ
a
3/4
= ϵ
4. Suppose k is continuous at 1 and let ϵ = 1. Then δ > 0 for which
|
x 1
|
< δ =
|
k(x) k(1)
|
=
|
k(x) 1
|
< 1
= 0 < k(x) < 2
However, if we choose x = max(
1
2
, 1
δ
2
), then
|
x 1
|
δ
2
< δ
and k(x) k(
1
2
) = 1 +
2
2
= 2. Contradiction.
0
1
2
3
0 1 2x
k(x)
2δ
2ϵ
The basic rules for combining continuous functions may also be proved using ϵδ arguments. E.g.,
ϵδ proof of the squeeze theorem. Given ϵ > 0, we know there exist δ
1
, δ
2
> 0 for which
|
x a
|
< δ
1
=
|
f (x) f (a)
|
< ϵ and
|
x a
|
< δ
2
=
|
h(x) h(a)
|
< ϵ
Let δ = min(δ
1
, δ
2
), then
|
x a
|
< δ =
|
g(x) g(a)
|
max
|
f (x) f (a)
|
,
|
h(x) h(a)
|
< ϵ
whence g is continuous at 0.
34
Remember the hidden quantifier:
|
x a
|
< δ for all x dom f = [0, ), thus x 0 for the duration of this example.
68
Several other arguments are in the exercises. Finally, here is the promise proof of equivalence.
Proof of Theorem 17.10. (sequential ϵδ) We prove the contrapositive. Suppose a is an ϵδ discon-
tinuity (†) and let δ =
1
n
. Then there exists x
n
U such that
|
x
n
a
|
<
1
n
and
|
f (x
n
) f (a)
|
ϵ
Repeating for all n N results in a sequence (x
n
) for which lim x
n
= a and lim f (x
n
) = f (a):
otherwise said, a is a sequential discontinuity.
(ϵδ sequential) Assume (), let (x
n
) U and suppose lim x
n
= a; we must prove that
lim f (x
n
) = f (a). Let ϵ > 0 be given so that a suitable δ satisfying () exists. Since lim x
n
= a,
N such that n > N =
|
x
n
a
|
< δ (since x
n
a and δ > 0 is given)
=
|
f (x
n
) f (a)
|
< ϵ (by ())
We conclude that lim f (x
n
) = f (a), as required.
Examples 17.11. We finish with a couple of esoteric examples on the same theme.
1. Let f : R R be the indicator function for the rational numbers:
f (x) =
(
1 x Q
0 x / Q
Suppose f is continuous at a and let ϵ = 1. Then δ such that
|
x a
|
< δ =
|
f (x) f (a)
|
< 1 ()
There are two cases; these rely on the fact that any interval contains both rational and irrational
numbers (Corollary 4.12, etc.).
(a) If a Q, then f (a) = 1. There exists an irrational number x (a δ, a + δ), whence
|
f (x) f (a)
|
=
|
0 1
|
= 1 < 1.
(b) If a / Q, then f (a) = 0. There exists a rational number x (a δ, a + δ), whence
|
f (x) f (a)
|
=
|
1 0
|
= 1 < 1.
Either way, we have contradicted (). We conclude that f is nowhere continuous.
2. Let g : R R be defined by
g : R R : x 7
(
x x Q
0 x / Q
Since 0
|
g(x)
|
|
x
|
, the squeeze theorem tells us that g is continuous at x = 0.
Now suppose g is continuous at a = 0 and let ϵ =
|
a
|
. Then δ such that
|
x a
|
< δ =
|
f (x) f (a)
|
<
|
a
|
The same two cases as in the previous example provide contradictions. We conclude that g is
continuous at precisely one point!
69
Exercises 17. 1. Consider the function with f (x) =
1
x
2
+2x3
.
(a) The implied domain of f has the form dom f = (, a) (b, ). Find a and b.
(b) What is the range of f ?
(c) Show that f : (b, ) range f is bijective and compute its inverse function.
(d) Find the inverse function when we instead restrict the domain to (, a).
(e) Briefly explain why f is continuous on its domain.
2. Let f and g be continuous functions at a.
(a) Show that max( f , g) =
1
2
( f + g) +
1
2
|
f g
|
and deduce that max( f , g) is continuous at a.
(b) How might you show continuity of min( f , g)?
3. Use ϵδ arguments to prove the following.
(a) f (x) = x
2
3x is continuous at x = 1
(b) g(x) = x
3
is continuous at x = a.
(c) h : [ 0, ) R : x 7
x is continuous.
(d) j(x) = 3x
1
is continuous on R \ {0}.
4. Prove that x = 0 is a discontinuity of each function: use both definitions of continuity.
(a) f (x) = 1 for x < 0 and f (x) = 0 for x 0.
(b) g(x) = sin(1/x) for x = 0 and g(0) = 0.
5. Suppose f and g are continuous at a. Prove the following using ϵδ arguments.
(a) f g is continuous at a.
(b) If h is continuous at f (a), then h f is continuous at a.
6. Suppose f : U V R is a function whose domain U contains an isolated point a: i.e. r > 0
such that (a r, a + r) U = {a}. Prove that f is continuous at a.
7. In Example 17.11.2, provide the details of the required contradiction.
8. (a) Suppose f : R R is a continuous function for which f (x) = 0 whenever x Q. Prove
that f (x) = 0 for all x R.
(b) Suppose f , g : R R are continuous functions such that f (x) = g(x) for all rational x.
Prove that f = g.
9. (Hard) Consider f : R R where
f (x) =
(
1
q
whenever x =
p
q
Q with q > 0 and gcd(p, q) = 1
0 if x ∈ Q
For example, f (1) = f (2) = f (7) = 1, and f (
1
2
) = f (
1
2
) = f (
3
2
) = ··· =
1
2
, etc. Prove that f
is continuous at each irrational number, and discontinuous at each rational number.
70
18 Properties of Continuous Functions
In this section consider how continuous functions transform intervals.
Example 18.1. f (x) = x
2
maps [3, 2] onto [0, 9]. In particular:
f transforms one interval into another.
f transforms one closed bounded set into another.
The purpose of this section is to see that these are general properties
exhibited by any continuous function.
2
4
6
8
f (x)
3 2 1 0 1 2
x
Before stating our first result, recall a couple of definitions.
Definition 18.2. Let U, V R and f : U V.
1. (a) U is bounded if M such that x U,
|
x
|
M.
(b) f is bounded if its range is a bounded set: M such that x U,
|
f (x)
|
M.
2. (Definition 11.13) U is closed if every convergent sequence in U has its limit in U:
(x
n
) U, lim x
n
= s ( R) = s U
Theorem 18.3 (Extreme Value Theorem). Suppose f : U V is continuous where U is closed and
bounded. Then f is bounded and attains its bounds:
s, i U such that f (s) = sup
f (U)
and f (i) = inf
f (U)
In fact f (U) is also closed and bounded.
In Example 18.1, if U = [3, 2], then s = 3 and i = 0.
Examples 18.4. Before seeing the proof, here are three examples where we weaken one of the hy-
potheses and see that the result fails.
0
1
2
3
0 1 2
0
1
2
3
0 1 2
0
2
4
6
0 1 2
1. f discontinuous 2. U not closed 3. U not bounded
1. sup( range f ) = 3 is not attained by f (x) =
(
3x if 0 x < 1
1 if 1 x 2
2. If f (x) =
1
2x
and U = [0, 2), then range f = [
1
2
, ) is unbounded.
3. If f (x) = x
2
and U = [0, ), then range f = [0, ) is unbounded.
71
The goal of the proof is to show that every limit point of f (U) = range f lies in f (U). The proof is
broken into simple steps: observe where each hypothesis is used.
Proof. 1. Suppose M is a limit point of f (U): that is, M = lim
f (x
n
)
for some sequence (x
n
) U.
A priori M need not be finite, but it is possible
35
that M = sup
f (U)
or inf
f (U)
.
2. Since (x
n
) U is bounded, Bolzano–Weierstraß (Theorem 11.8) says it has a convergent subse-
quence, lim
k
x
n
k
= x.
3. Since U is closed, we have x U. This means f (x) makes sense (it is a real number!).
4. Since f is continuous, we have lim f (x
n
k
) = f (x).
5. Finally, M = f (x) since all subsequences of a convergent (or divergent to ±) sequence tend
to the same limit (Lemma 11.3). It follows that all limit points M are finite and lie in f (U):
otherwise said, f (U) is closed and bounded.
In particular, choosing M = sup
f (U)
yields x = s U as in the Theorem.
Example 18.5. It is worth thinking about why we needed to use a subsequence in the proof. The
reason is that it is possible for the bounds of f to be attained multiple times. For example, consider
f : [0, 4π] R : x 7→ sin x
This satisfies the hypotheses of the extreme value theorem: [0, 4π] is closed and bounded and f is
continuous. Indeed max(range f ) = 1 is attained at both x =
π
2
and
5π
2
. The sequence defined by
x
n
=
(
π
2
+
1
n
if n odd
5π
2
+
1
n
if n even
has f (x
n
) = sin
π
2
+
1
n
n
1 = sup(range f )
and therefore satisfies step 1 of the proof. However, (x
n
) itself is divergent by oscillation. Bolzano–
Weierstraß is used to force the existence of a convergent subsequence; in this case the subsequence of
odd terms (x
n
k
) = (x
2k1
) satisfies the remaining steps of the proof.
35
If M = sup
f (U)
, then a suitable (x
n
) might be constructed as follows:
If M R, then for each n N, x
n
U such that M
1
n
< f (x
n
) M (Lemma 4.8).
If M = , then for each n N, x
n
U such that f (x
n
) n.
72
The Intermediate Value Theorem and its Consequences
This result should be familiar from elementary calculus, even if its proof is not! It is also intuitive: if
you climb a hill, then at some point you must be half-way up the hill. . .
Theorem 18.6 (Intermediate Value Theorem (IVT)). Let f be continuous on the interval [a, b] and
let y lie strictly between f (a) and f (b). Then ξ (a, b) such that f (ξ) = y.
Proof. WLOG assume f (a) < y < f (b). Now let S = {x [a, b] : f (x) < y} and define ξ := sup S.
Since S is non-empty (a S) and bounded above
(by b), we see that ξ exists and is finite. It remains
to prove that a < ξ < b and f (ξ) = y.
First choose any (s
n
) S such that
36
lim s
n
= ξ.
Continuity forces lim f (s
n
) = f (ξ). Moreover
f (s
n
) y = f (ξ) y
This also shows that ξ < b.
y
a b
f (a)
f (b)
s
n
x
n
ξ
S
We now play a similar game from the other side: define x
n
:= min(ξ +
1
n
, b), then lim x
n
= ξ and
x
n
> ξ = sup S = x
n
S, whence
f (x
n
) y = f (ξ) = lim f (x
n
) y
This also shows that ξ > a. Putting it all together, we conclude that f (ξ) = y and ξ (a, b).
Note how the value of ξ in the proof is always the largest of potentially several choices.
Examples 18.7. The intermediate value theorem was typically used in elementary calculus to show
the existence of solutions to equations. Here are a couple of examples of this process.
1. We show that the equation x
7
+ 3x = 1 + 4 cos(πx) has a solution.
The trick is to express the equation in the form f (x) = y where f is continuous, then choose
suitable a, b to fit the theorem. In this case,
f (x) = x
7
+ 3x 4 cos(πx) and y = 1
are suitable choices. Now observe that
f (0) = 4 < y and f (1) = 1 + 3 + 4 = 8 > y (i.e., a = 0 and b = 1)
whence ξ (0, 1) such that f (ξ) = 01. Otherwise said, ξ is a solution to the original equation.
The function f is in fact continuous on R, a much larger interval that [a, b], but no matter!
36
Similarly to step 1 of the proof of the Extreme Value Theorem.
73
2. The existence of a root ξ of the (continuous) polynomial
f (x) = x
5
5x
4
+ 150
follows from the intermediate value theorem by observing that
f (0) = 150 > 0 and f (4) = 256 + 150 = 106 < 0
We conclude that such a root exists and that ξ ( 0, 4).
As the graph suggests, there are other roots (η, ζ), the existence of
which may be shown by also evaluating, say,
f (3) = 798 < 0 and f (5) = 150 > 0
100
100
200
2 2 4
ξ
η
ζ
With an eye on generalizing, consider a slightly different approach. Define two sequences (s
n
)
and (t
n
) via
s
n
:=
f (n)
n
5
= 1
5
n
+
150
n
5
t
n
:=
f (n)
n
5
= 1
5
n
+
150
n
5
Since lim s
n
= 1 and lim t
n
= 1, we see that
a such that s
a
<
1
2
= f (a) = a
5
s
a
<
1
2
a
5
< 0
b such that t
b
>
1
2
= f (b) = b
5
t
b
>
1
2
b
5
> 0
Applying the intermediate value theorem on [a, b] shows the existence of a root.
The second approach in Example 18.5.2 may be applied to prove the general result.
Corollary 18.8. A polynomial function of odd degree has at least one real root.
The proof is an exercise. An even simpler exercise shows the existence of a fixed point for a particular
type of continuous function.
Corollary 18.9 (Fixed Point Theorem). Suppose a and b are finite and that f : [a, b] [a, b] is
continuous. Then f has a fixed point:
ξ [a, b] such that f (ξ) = ξ
As the picture shows, a function could have several fixed points.
This is the first of several fixed-point theorems you’ll meet if your
studies of analysis continue. Many important consequences flow from
these, including a common fractal construction and the standard exis-
tence/uniqueness result for differential equations.
ξ
1
ξ
2
ξ
3
a b
a
b
74
For our final corollary, we first note a straightforward characterization: a set I R is an interval if
a, b I and a < y < b = y I ()
Corollary 18.10 (Preservation of Intervals). Suppose f : U V is continuous where U = dom f is
an interval (of positive length) and V = range f .
1. V is an interval or a point.
2. If f is strictly increasing (decreasing), then:
(a) V is an interval (it has positive length).
(b) f is injective (and thus bijective).
(c) The inverse function f
1
: V U is also continuous and strictly increasing (decreasing).
Example 18.11. In part 1, note that the interval V need not be of the
same type as U. For instance, if f (x) = 10x x
2
, then f maps the open
interval U = ( 2, 9) to the half-open interval V = (9, 25].
The extreme value theorem, however, guarantees that if U is a closed
bounded interval, then V is also, for instance,
f
[2, 9]
= [9, 25]
0
5
10
15
20
25
0 2 4 6 8
U
V
Proof. 1. If V is not a point, then a, b U such that f (a) < f (b). Let y
f (a), f (b)
; IVT says
ξ between a and b such that y = f (ξ). That is, y range f . By (), V = range f is an interval.
2. (a,b) If f is strictly increasing, then a, b U, a < b = f (a) < f (b). It follows that f is
injective and that V contains at least 2 points; by part 1 it has positive length.
(c) Let y
1
< y
2
where both lie in V, and define x
i
= f
1
( y
i
) for i = 1, 2. Since f is increasing,
x
2
x
1
= y
2
= f (x
2
) f (x
1
) = y
1
is a contradiction. Thus x
1
< x
2
and f
1
is also strictly increasing.
It remains to show that f
1
is continuous at b = f
1
(a). Assume first that a is not an
endpoint of U. Given ϵ > 0 for which [a ϵ, a + ϵ ] U, let
δ := min
b f (a ϵ), f (a + ϵ) b
and observe that
|
y b
|
< δ = f (a ϵ) b < y b < f (a + ϵ) b = f (a ϵ) < y < f (a + ϵ)
= a ϵ < y < a + ϵ ( f strictly increasing)
=
f
1
( y) a
< ϵ
If a is an endpoint of U, instead use [a ϵ, a] U or [a, a + ϵ] U and only the corre-
sponding half of the expression δ.
75
Example 18.12. The function f : [0, 2] [0, 4] defined by
f (x) =
(
3
x if 0 x 1
x
2
if 1 < x 2
is continuous and strictly increasing. It therefore has a continuous in-
verse function f
1
: [0, 4] [0, 2] .
Compare this with the result from elementary calculus: f
> 0 = f
injective. We cannot apply this here since f is not differentiable!
0
1
2
3
4
f (x)
0 1 2
x
Exercises 18. 1. Give an example of a discontinuous function f : [0, 1] R which is not bounded.
2. Let a < b be given. Give examples of continuous functions g, h : (a, b) R such that:
(a) g is not bounded.
(b) h is bounded but does not attain its bounds.
3. Compute the inverse of the function f in Example 18.12.
4. Let S R and suppose there exists a sequence (x
n
) in S that converges to a number x
0
S.
Show that there exists an unbounded continuous function on S.
5. Prove that x = cos x for some x in (0,
π
2
).
6. Suppose that f is a real-valued continuous function on R and that f (a) f (b) < 0 for some
a, b R. Prove that there exists x between a, b such that f (x) = 0.
7. Suppose that f is continuous on [0, 2] and that f (0) = f (2). Prove that there exist x, y [0, 2]
such that
|
y x
|
= 1 and f (x) = f (y).
(Hint: consider g(x) = f (x + 1) f (x) on [0, 1])
8. (a) Prove the fixed point theorem (Corollary 18.9).
(Hint: If neither a nor b are fixed points, consider g(x) = f (x) x)
(b) Prove Corollary 18.8 for a general odd-degree monic polynomial f (x) = x
2m+1
+
2m
k=0
α
k
x
k
.
9. Consider f : R R where f (x) = x sin
1
x
if x = 0 and f (0) = 0.
(a) Explain why f is continuous on any interval U.
(b) Suppose a < 0 < b and that f (a), f ( b) have opposite signs. If y = 0, show that the
intermediate value theorem is satisfied by infinitely many distinct values ξ.
10. (a) Suppose f : U R is continuous and that U =
n
S
k=1
I
k
is the union of a finite sequence (I
k
)
of closed bounded intervals. Prove that f is bounded and attains its bounds.
(b) Let U =
S
n=1
I
n
, where I
n
= [
1
2n
,
1
2n1
] for each n N. Give an example of a continuous
function f : U R which is either unbounded or does not attain its bounds. Explain.
(This is related to the idea that finite unions of closed sets remain closed, but infinite unions need not)
76
19 Uniform Continuity
Suppose f : U V is continuous. By the ϵ-δ definition (17.9),
a U, ϵ > 0, δ(a, ϵ) > 0 such that (x U)
|
x a
|
< δ =
|
f (x) f (a)
|
< ϵ ()
We write δ(a, ϵ) to stress the fact that δ can depend both on the location a and the distance ϵ. The goal
of this section is to understand if/when it is possible to choose δ independently of the location a.
Example 19.1. We start by considering how this desire might be impossible to satisfy.
Consider f (x) = x
2
with domain U = [0, ). Given ϵ > 0
and a
1
U, we can certainly find some
37
δ such that
|
x a
1
|
< δ =
|
f (x) f (a
1
)
|
=
x
2
a
2
1
< ϵ
Visualize what happens if we try to use the same δ for dif-
ferent a
i
: imagine sliding the fixed-width δ-interval along
the x-axis while simultaneously sliding the ϵ-interval verti-
cally. As a
i
increases, the image of the δ-interval eventually
becomes too large for the ϵ-interval to contain:
length
f (a
i
δ, a
i
+ δ)
= (a
i
+ δ)
2
(a
i
δ)
2
= 4a
i
δ
increases unboundedly with a
i
.
0
0
a
2
1
a
1
a
2
2
a
2
a
2
3
a
3
For fixed ϵ, as a increases, the increasing gradient of f means that we need to choose a smaller δ.
By contrast, if we consider the same formula f (x) = x
2
but on a restricted finite domain [0, b], then
any δ that suffices to demonstrate continuity at x = b will also do so everywhere else on [0, b]. We’ll
check this explicitly in a moment.
To formalize things, consider rewriting (), where we additionally assume that δ may be chosen
independently of the location a; this amounts simply to moving the quantifier a U after δ.
Definition 19.2. A function f : U V R is uniformly continuous if
ϵ > 0, δ > 0 such that (x, y U)
|
x y
|
< δ =
|
f (x) f (y)
|
< ϵ (†)
For reasons of symmetry we use y instead of a. Note how δ now depends only on ϵ since it is
quantified before x and y; as previously, the quantifiers for x, y are usually hidden. Note also how
uniform continuity is only relevant on the entire domain U; it makes no sense to speak of uniform
continuity at a point a.
For the sake of tidiness, we make one more observation before seeing some examples.
Lemma 19.3. If f is uniformly continuous on U, then it is continuous on U.
This should be trivial: () is the ϵ-δ continuity of f at y U, for all y simultaneously! The special
feature of the definition is that the same δ works for all y.
37
For instance δ = min(1,
ϵ
1+2a
1
), as we saw on page 67.
77
Examples 19.4. 1. We re-analyze f (x) = x
2
in view of the definition. Recall first that
|
f (x) f (y)
|
=
x
2
y
2
=
|
x y
||
x + y
|
where
|
x y
|
is easily controlled by δ. We consider the behavior of
|
x + y
|
in two cases.
Bounded domain If U = dom f [T, T] for some T > 0, we show that f is uniformly
continuous. This follows because
|
x + y
|
2T is also easily controlled.
Let ϵ > 0 be given and define δ =
ϵ
2T
, then
|
x y
|
< δ =
|
f (x) f (y)
|
< δ · 2T = ϵ
Compare with Example 19.1. Our approach works for this function because the gradient
(and therefore potential discrepancy between x
2
y
2
and x y) is greatest at the endpoints
of the interval. The same approach may not work for other functions!
Unbounded domain We show that f is not uniformly continuous when dom f = [0, ).
For contradiction, assume f is uniformly continuous: let ϵ = 1 and suppose δ > 0 satisfies
the definition. Supposing x y =
δ
2
, we see that
|
x + y
|
= 2y +
δ
2
=
|
f (x) f (y)
|
=
δ
2
2y +
δ
2
= δ
y +
δ
4
> δx
Letting y =
1
δ
(x =
1
δ
+
δ
2
) yields the contradiction
|
f (x) f (y)
|
> 1 = ϵ.
2. Let g(x) =
1
x
; we again consider two domains.
Uniform continuity on [a, b) whenever 0 < a < b .
Let ϵ > 0 be given and let δ = a
2
ϵ. Then,
|
x y
|
< δ =
|
g(x) g(y)
|
=
y x
xy
<
δ
xy
δ
a
2
= ϵ
where the last inequality follows because x, y a.
Non-uniform continuity on ( 0, b) whenever 0 < b .
As before, let ϵ = 1 and suppose δ > 0 is given. Let
x = min
δ, 1,
b
2
and y =
x
2
Certainly x, y (0, b) and
|
x y
|
=
x
2
δ
2
< δ. However,
|
f (x) f (y)
|
=
1
x
1 = ϵ
g(x)
x
a b
2δ
2ϵ
Think about how ϵ and δ must relate as one slides the intervals in the picture up/down and
left/right. In this case, large values of x, y are not the problem, it’s the vertical asymptote at
zero that causes trouble.
78
General Conditions for Uniform Continuity
For the remainder of this section, we develop a few general ideas related to uniform continuity. The
first is a little out of order since it depends on differentiation and the mean value theorem.
Theorem 19.5. Suppose f is continuous on an interval U (finite or infinite) and differentiable except
perhaps at its endpoints. If f
is bounded, then f is uniformly continuous on U.
Proof. Suppose
|
f
(x)
|
M. Let ϵ > 0 and δ =
ϵ
M
. Then
|
x y
|
< δ =
|
f (x) f (y)
|
=
f
( ξ)
|
x y
|
< Mδ = ϵ
where the existence of ξ between x, y follows from the Mean Value Theorem.
38
Examples 19.6. 1. Compare the arguments in the previous exercise. For instance, if dom f [T, T],
f (x) = x
2
= f
(x) = 2x =
f
(x)
2T
The derivative is bounded, whence f is uniformly continuous on [T, T].
2. Any polynomial is uniformly continuous on any bounded interval.
3. The function f (x) = sin x is uniformly continuous on R since f
(x) = cos x is bounded (by 1).
4. Consider f (x) =
1
x
5
x
2
on ( 1, ). We have
f
(x) =
1
x
2
+
10
x
3
=
f
(x)
11
We conclude that f is uniformly continuous on (1, ).
The approach is often useful when you are asked to show using the definition that a function is
uniformly continuous; provided f
is bounded by M, you may always choose δ =
ϵ
M
to obtain
an argument. For instance, with our function:
Given ϵ > 0, let δ =
ϵ
11
. If x, y (1, ) and
|
x y
|
< δ, then
|
f (x) f (y)
|
=
1
x
1
y
+
5
y
2
5
x
2
=
|
x y
|
5(x + y)
x
2
y
2
1
xy
=
|
x y
|
5
xy
2
+
5
x
2
y
1
xy
< 11
|
x y
|
(-inequality, since x, y > 1)
< 11δ = ϵ
As we’ll see very shortly, the above result isn’t a biconditional: non-differentiable functions and
functions with unbounded derivatives can be uniformly continuous.
38
If x < y then ξ (x, y) such that f
(ξ) =
f (x) f (y)
x y
.
79
Our remaining conditions are variations on a theme: uniform continuity on a bounded interval U is
roughly the same thing as continuity on its closure U (recall Definition 11.13).
Theorem 19.7. A continuous function on a closed bounded domain is uniformly continuous.
Proof. Assume f is continuous, but not uniformly so, on a closed bounded domain U. Then
ϵ > 0 such that δ > 0, x, y U with
|
x y
|
< δ and
|
f (x) f (y)
|
ϵ ( )
Let δ =
1
n
for each n N to obtain sequences (x
n
), (y
n
) U satisfying ().
39
Since (x
n
) U is bounded, Bolzano–Weierstraß says there exists a convergent subsequence (x
n
k
)
which, since U is closed, converges to some x
0
U.
Since
|
x
n
k
y
n
k
|
<
1
n
k
1
k
, we see that lim
k
y
n
k
= x
0
. Finally, the continuity of f contradicts ():
ϵ lim
|
f (x
n
k
) f (y
n
k
)
|
=
|
f (x
0
) f (x
0
)
|
= 0
Both hypotheses are crucial: Examples 19.4 provide counter-examples if either is weakened.
Example 19.8. f (x) =
x is uniformly continuous on [0, 1]. This cannot be concluded from Theorem
19.5, since its derivative f
(x) =
1
2
x
1/2
is unbounded on ( 0, 1).
Our next goal is to develop a partial converse, for which we first need a lemma.
Lemma 19.9. If f is uniformly continuous on U and (x
n
) U is Cauchy, then
f (x
n
)
is also Cauchy.
To apply the result, consider a convergent (Cauchy) sequence in U whose limit is not itself in U.
Example 19.10. Let f (x) =
1
x
be defined on U = (0, ) and consider the sequence defined by x
n
=
1
n
.
This is plainly Cauchy since it converges; note crucially that its limit 0 does not lie in U. Moreover,
lim f (x
n
) = lim n =
f (x
n
)
is not Cauchy, whence f is not uniformly continuous. This is a far simpler argument than
that presented previously!
Proof. Let ϵ > 0 be given. Since f is uniformly continuous,
δ > 0 such that x, y U,
|
x y
|
< δ =
|
f (x) f (y)
|
< ϵ
Now use this δ in the definition of (x
n
) being Cauchy:
40
N such that m, n > N =
|
x
n
x
m
|
< δ =
|
f (x
n
) f (x
m
)
|
< ϵ
Otherwise said,
f (x
n
)
is Cauchy.
39
These arguments should feel familiar: compare this line to the proof of Theorem 17.10 and the rest to Theorem 18.3.
40
The Cauchy condition is important here: we cannot apply the uniform continuity condition directly to a convergent
sequence (
|
x
n
x
|
< δ . . .) if we do not already know that its limit (here x) lies in U!
80
We apply the Lemma to show that a continuous function on a bounded interval is uniformly continu-
ous if and only if has a continuous extension.
Theorem 19.11. Suppose f is continuous on a bounded interval (a, b). Define g : [a, b] R via
g(x) :=
(
f (x) if x (a, b)
lim f (x
n
) whenever (x
n
) (a, b) and lim x
n
= a or b
Then f is uniformly continuous if and only if g is well-defined; in such a case g is automatically
continuous.
Examples 19.12. 1. f (x) = x
2
3x + 4 is uniformly continuous on
( 2, 4) since it has a continuous extension
g : [2, 4] R : x 7→ x
2
3x + 4
It should be obvious what is happening from the picture: to cre-
ate the extension g, we simply fill in the holes at the endpoints of
the graph.
2. The function f (x) =
1
5x
is continuous, but not uniformly, on the
interval ( 0, 5). This follows since
lim f
5
1
n
= lim n =
means we cannot define g(5) unambiguously. Again the picture
is helpful; while we can fill in the hole at the left endpoint (a =
0) , the vertical asymptote at b = 5 means that there is no hole to
fill in and thereby extend the function.
4
8
12
2 0 2 4
0
1
2
3
4
0 1 2 3 4 5
Proof. () Suppose g is well-defined; we leave the claim that it is continuous as an exercise, but by
Theorem 19.7 it is uniformly so. Since f = g on a subset (a, b) dom g, the same choice of δ
will work for f as it does for g: f is therefore uniformly continuous.
() Suppose f is uniformly continuous on (a, b). Let (x
n
), (y
n
) (a, b) be sequences converging to
a. To show that g(a) is unambiguously defined, we must prove that
f (x
n
)
and
f (y
n
)
are
convergent, and to the same limit.
Define a sequence
( u
n
) = (x
1
, y
1
, x
2
, y
2
, x
3
, y
3
, . . .)
Plainly lim u
n
= a since (x
n
) and (y
n
) have the same limit. But then (u
n
) is Cauchy; by Lemma
19.9,
f (u
n
)
is also Cauchy and thus convergent. Since
f (x
n
)
and
f (y
n
)
are subsequences
of a convergent sequence, they also converge to the same (finite!) limit.
The case for g(b) is similar.
81
Examples 19.13. We finish with three related examples of continuous functions f : R \ {0} R;
these will appear repeatedly as you continue to study analysis.
1. f (x) = sin
1
x
is continuous but not uniformly so. To see
this, note that x
n
=
1
(n+
1
2
)π
defines a Cauchy sequence
(lim x
n
= 0), and yet
f (x
n
) = sin
n +
1
2
π = (1)
n
is not Cauchy since it diverges by oscillation.
Consequently, there is no way to extend f to a continuous
function on any interval containing x = 0.
1
1
x
2
π
1
π
2
π
1
π
2. f (x) = x sin
1
x
is uniformly continuous. One way to see
this is to extend the function to the origin by defining
g(x) =
(
x sin
1
x
if x = 0
0 if x = 0
By the squeeze theorem, lim x
n
= 0 = lim f (x
n
) = 0,
so g is well-defined and continuous on R. By Theorem
19.11, f is uniformly continuous on any bounded inter-
val. Moreover, the derivative
1
x
2
π
2
π
2
π
f
(x) = sin
1
x
1
x
cos
1
x
is bounded whenever x is large; together with Exercise 6 we could use this to conclude uni-
form continuity of f (x). Note however that f
(x) is unbounded when x small (lim f
1
2πn
=
lim(2πn) = ) so we can’t use Theorem 19.5 to conclude that f is uniformly continuous on
its entire domain.
3. f (x) = x
2
sin
1
x
is also uniformly continuous: again extend
by g(0) = 0. This time however, we could argue that the
derivative is bounded
f
(x)
=
2x sin
1
x
cos
1
x
3
since
|
sin y
|
|
y
|
for all y.
In fact something stranger is going on. As you may ver-
ify (see Exercise 3), the extended function g is everywhere
differentiable with g
(0) = 0, and yet the derivative g
(x)
itself is discontinuous at x = 0!
1
1
f (x)
x
2
π
2
π
f
(x)
82
Exercises 19. 1. Decide whether each function is uniformly continuous on the given interval.
Explain your answers.
(a) f (x) = x
3
on [2, 4] (b) f (x) = x
3
on (2, 4)
(c) f (x) = x
3
on ( 0, 4] (d) f (x) = x
3
on ( 1, 4]
(e) f (x) = e
x
on (, 100) (f) f (x) = e
x
on R
2. Prove that each function is uniformly continuous on the indicated domain by verifying the ϵ-δ
property.
(a) f (x) = 3x + 11 on R (b) f (x) = x
2
on [0, 3]
(c) f (x) =
1
x
2
on [
1
2
, ) (d) f (x) =
x+2
x+1
on [0, 1]
3. Verify the claim in Example 19.13.3 that the function g(x) is differentiable at zero
41
but that the
derivative g
(x) is discontinuous there.
4. (a) If f is uniformly continuous on a bounded set U, prove that f is bounded on U.
(Hint: for contradiction, assume (x
n
) U for which
|
f (x
n
)
|
. . .)
(b) Use (a) to give another proof that
1
x
2
is not uniformly continuous on ( 0, 1).
(c) Give an example to show that a uniformly continuous function on an unbounded set U
could be unbounded.
5. Suppose g is defined on U and a U. Give very brief (one line!) arguments for the following.
(a) Prove that g is continuous at a provided
ϵ > 0, δ > 0 such that 0 <
|
x a
|
< δ =
|
g(x) g(a)
|
< ϵ
(b) Prove that g is continuous at a provided
(x
n
) U \{a}, lim x
n
= a = lim g(x
n
) = g(a)
(c) Verify that the function g defined in Theorem 19.11 is indeed continuous whenever it is
well-defined.
6. (a) Suppose f is uniformly continuous on intervals U
1
, U
2
for which U
1
U
2
is non-empty.
Prove that f is uniformly continuous on U
1
U
2
.
(Hint: if x, y do not lie in the same interval U
i
, choose some a U
1
U
2
between x and y)
(b) Prove that f (x) =
x is uniformly continuous on [0, ).
(c) More generally, prove that any root function f (x) = x
1/n
(n N) is uniformly continuous
on its domain (R if n is odd and [0, ) if n is even).
(d) (Hard) Given f (x) = x
1/n
, show that δ = ϵ
n
demonstrates uniform continuity when n is
even and δ =
ϵ
2
n
when n is odd.
(Hint: use the binomial theorem to prove that 0 y < x + δ = y
1/n
< x
1/n
+ δ
1/n
)
41
Use the definition g
(0) = lim
x0
g(x)g(0)
x0
. Limits of functions are covered formally in the next section (course!), but you
should be familiar with the idea from elementary calculus.
83