4 Continuity
In this chapter we discuss continuous functions. Functions themselves should be familiar. For refer-
ence, 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: the above example has implied domain
dom f = R \ {2, 3, 3}. In examples, the domain is most often 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, and is a subset of V = codom f .
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: that is 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 4.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
4.17 Continuous Functions
To introduce continuity, 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 might we calculate or prove anything with this concept?
It moreover cannot reasonably be extended to other situations or higher dimensions where
drawing a graph is meaningless.
If x is close to a, then f (x) is close to f (a) This is better and admits generalization. The major is-
sue is the unclear meaning of close. Our formal definition of continuity addresses this using
sequences and limits.
Definition 4.2 (Sequential continuity). A real-valued function f : U V is continuous at a U if,
(x
n
) U, lim x
n
= a = lim f (x
n
) = f (a)
f is continuous (on U) if it is continuous at every point a U.
We say that f is discontinuous at a U if,
(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
Discontinuous at a: at least one sequence
with lim x
n
= a has lim f (x
n
) = f (a)
Examples 4.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 above definition.
61
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 + 2
x 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
)
2
converges to 1 from below, however the limit laws tells us that
lim k(x
n
) = lim
1 + 2
1
1
n
= 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 2.15), continuous functions may be combined
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 4.4. 1. Suppose f , and 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 f : x 7 x
1/n
is continuous on its domain.
3. Compositions of continuous functions are continuous: if g is continuous at a and f is continu-
ous at g(a), then f g is continuous at a.
4. Algebraic functions are continuous (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 by combining parts 1, 2 and 3.
Example 4.5. The following algebraic function is continuous on its domain
f : (7, ) R : x 7
s
3x
5/2
+ 7x
2
+ 4
(x 7)
1/3
62
Theorem 4.6 (Squeeze theorem). Suppose f (x) g(x) h(x) for all x = a, that f , h are continuous
at a, and that f (a) = g(a) = h(a). Then g is continuous at a.
Proof. This is simply the squeeze theorem (2.12) 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 4.7. The common trigonometric, exponential and logarithmic functions are continuous.
It is possible, though slow and ugly, to address some of this now. We won’t do this since it is
cleaner to define these functions using power series,
27
which makes their continuity (and differ-
entiability/integrability!) come for free.
Examples 4.8. 1. f (x) =
x
sin e
x
is continuous on its domain R \
ln(nπ) : n N
0
.
2. If g(x) = x sin
1
x
when x = 0, and g(0) = 0, then g is continuous
on R. When x = 0, this follows from Theorems 4.4 and 4.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 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) and suppose ϵ > 0 is given. 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. . .
27
For instance via 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
63
Definition 4.9 (ϵ-δ continuity). A real-valued function f : U V is continuous at a U if
28
ϵ > 0, δ > 0 such that (x U)
|
x a
|
< δ =
|
f (x) f (a)
|
< ϵ ()
We say that f is discontinuous at a U if,
ϵ > 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
Discontinuous at a
This fits with the intuitive interpretation of continuity: if x is close to a, then f (x) is close to f (a); ϵ
and δ are our measures of closeness. Many mathematicians consider the ϵ-δ version to be the definition
of continuity. Thankfully, it doesn’t matter which you prefer. . .
Theorem 4.10. The sequential and ϵ-δ definitions of continuity (4.2 & 4.9) are equivalent.
Examples (4.3, cont). Before seeing a proof, we repeat our earlier examples using the ϵ-δ definition.
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 63 with all
mention of sequences removed!
28
The bracketed x U is often omitted in () since the implication requires that x 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.
64
2. Let g(x) = 1 +
4
x
2
and a = 0. The first challenge is to keep away from zero so that
1
x
behaves.
To do this, we insist that δ
|
a
|
2
, so that
|
x a
|
< δ =
|
a
|
2
<
|
x
|
<
3
|
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
|
a + x
|
a
2
x
2
δ
4
1
|
a
|
x
2
+
1
a
2
|
x
|
δ
()
< 4
4
|
a
|
3
+
2
|
a
|
3
!
δ =
24
|
a
|
3
δ
Given ϵ > 0, it suffices to let δ = min(
1
2
|
a
|
,
1
24
|
a
|
3
ϵ). Then
|
x a
|
< δ =
|
g(x) g(a)
|
< ϵ.
3. For h(x) = 3x
1/4
there are two cases. Suppose ϵ > 0 is given.
If a = 0, let δ =
ϵ
3
4
, then
29
|
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
|
< δ,
|
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. We could establish the discontinuity statement (†) directly, but it is
typically easier to argue by contradiction.
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, x = max(
1
4
, 1
δ
2
) satisfies
|
x 1
|
δ
2
< δ and k(x)
k(
1
4
) = 1 +
2
2
= 2. Contradiction. Think this last bit through!
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.
29
Remember the hidden quantifier:
|
x a
|
< δ for all x dom f = [0, ), thus x 0 for the duration of this example.
65
Several other arguments are in the exercises. Finally, here is the promised proof of equivalence.
Proof of Theorem 4.10. (sequential ϵδ) We prove the contrapositive. Suppose a is an ϵ-δ disconti-
nuity (†) 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 plainly produces 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 4.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; both rely on the fact that any interval contains both rational and irrational
numbers (Corollary 1.23, 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!
66
Exercises 4.17. Key concepts: Sequential and ϵ-δ continuity definitions/equivalence, ϵ-δ examples
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. Rephrase Example 4.3.4’s ϵ-δ argument by directly justifying the discontinuity definition (†).
5. Prove that each function is discontinuous at x = 0; use both sequential and ϵ-δ formulations.
(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.
6. 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.
7. 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.
8. In Example 4.11.2, provide the details of the required contradiction.
9. (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.
10. (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 instance, f (1) = f ( 2) = f (7) = 1, and f (
1
2
) = f (
1
2
) = f (
3
2
) = ··· =
1
2
, etc.
(a) Prove that f is discontinuous at each rational number r.
(b) Prove that f is continuous at each irrational number i.
(Hint: given ϵ > 0, let q =
1
ϵ
, A =
r Q : f (r)
1
q
and let δ = min
rA
|
i r
|
. . . )
67
4.18 Properties of Continuous Functions
In this section we consider how continuous functions transform intervals.
Example 4.12. f (x) = x
2
maps [3, 2] onto [0, 9]. In particular:
f transforms an interval into another.
f transforms a closed bounded set into another.
Our goal 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
First recall a couple of definitions.
Definition 4.13. Suppose f : U V where U, V R.
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 2.46) 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 4.14 (Extreme Value Theorem). Suppose f : U V is continuous where U is closed and
bounded. Then f (U) is closed and bounded. In particular, f is bounded and attains its bounds:
s, i U such that f (s) = sup f (U) and f (i) = inf f (U)
Examples 4.15. 1. (Example 4.12) If f (x) = x
2
on U = [3, 2], then f (U) = [0, 9] is closed and
bounded. Moreover, sup f (U) = f (3) and inf f (U) = f (0) (i.e., s = 3 and i = 0).
2. Before seeing the proof, here are three examples where we weaken one of the hypotheses of the
extreme value theorem and see that the conclusion fails.
0
1
2
3
0 1 2
0
1
2
3
0 1 2
0
2
4
6
0 1 2
(a) f discontinuous (b) U not closed (c) U not bounded
(a) If U = [0, 2], f (x) = 3x when x < 1 and f (x) = 1 when x 1, then f (U) = [0, 3). In
particular, sup f (U) = 3 is not attained.
(b) If f (x) =
1
2x
and U = [0, 2), then f (U) = [
1
2
, ) is unbounded.
(c) If f (x) = x
2
and U = [0, ), then f (U) = [0, ) is unbounded.
68
The strategy of the proof is to show that every limit point of f (U) = range f lies in f (U). We break
things 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 M = sup f (U) or inf f (U) are certainly possible.
30
2. Since (x
n
) U is bounded, Bolzano–Weierstraß (Theorem 2.41) says it has a convergent sub-
sequence, lim
k
x
n
k
= x.
3. Since U is closed, we have x U. This means f (x) can be evaluated (it is finite).
4. Since f is continuous, 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 2.37). It follows that all limit points M are finite and lie in f (U):
otherwise said, f (U) is closed and bounded.
Choosing M = sup f (U) yields x = s U (similarly inf f (U) leads to i U).
Example 4.16. It is worth considering why we needed a subsequence in the proof. The reason is that
the bounds of f might be attained multiple times. For example, suppose
f : [0, 4π] R : x 7 sin x
This satisfies the hypotheses of the extreme value theorem: U = [0, 4π] is closed and bounded and f
is continuous. Indeed max f (U) = 1 is attained at both x =
π
2
and
5π
2
. The sequence defined by
x
n
=
(
π
2
+
1
n
if n is odd
5π
2
+
1
n
if n is even
has f (x
n
) = sin
π
2
+
1
n
n
1 = sup f (U)
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.
1
0
f (x)
x
x
1
f (x
1
)
x
2
π
2
π
3π
2
2π
5π
2
3π
7π
2
4π
1
30
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 1.20).
If M = , then for each n N, x
n
U such that f (x
n
) n.
69
The Intermediate Value Theorem and its Consequences
This result should be familiar from elementary calculus, even if its proof is not. It should also be
intuitive: like the Grand Old Duke of York, if you march up a hill, then at some point you must be
half-way up. . .
Theorem 4.17 (Intermediate Value Theorem (IVT)). Suppose f is continuous on [a, b] and that y
lies strictly between f (a) and f (b). Then ξ (a, b) such that f (ξ) = y.
Being an existence result, it should be no surprise that completeness is used in the proof.
Proof. WLOG assume f (a) < y < f (b). 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 f (ξ) = y and ξ = a, b.
First choose any (s
n
) S such that lim s
n
= ξ. Con-
tinuity forces lim f (s
n
) = f (ξ). Moreover
f (s
n
) < y = f (ξ) y
Since f (b) > 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 = f (x
n
) y
= f (ξ) = lim f (x
n
) y
again via the continuity of f and the convergence properties of bounded sequences. Since y > f (a),
we also conclude that ξ = a.
Putting it all together, f (ξ) = y and ξ (a, b) .
Note how the value of ξ in the proof is always the largest of potentially several choices.
Examples 4.18. In elementary calculus, the intermediate value theorem is typically applied to
demonstrate the existence of solutions to equations.
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
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 ( ξ) = y = 1. Otherwise said, ξ is a solution to the original
equation.
The function f is plainly continuous on R, a much larger interval than [a, b], but no matter.
70
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 satisfying ξ (0, 4).
As the graph suggests, there are other roots (η, ζ), the existence of
which may be shown by observing, say,
f (3) = 798 < 0 and f (5) = 150 > 0
100
100
200
2 2 4
ξ
η
ζ
With an eye on generalizing, here is an alternative approach. Define sequences (s
n
), (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 4.16.2 may be applied to prove a general result.
Corollary 4.19. 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 4.20 (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 most basic fixed-point theorem in analysis: if you continue
your studies you’ll meet several more. Many important consequences
flow from such results, including a common fractal construction and
the standard existence/uniqueness result for differential equations.
ξ
1
ξ
2
ξ
3
a b
a
b
71
For a final corollary, first note a straightforward characterization that helps us consider all types of
interval simultaneously: U R is an interval precisely when
a, b U and a < y < b = y U ()
Corollary 4.21 (Preservation of Intervals). Suppose U is an interval of positive length, and that
f : U V is continuous and surjective (V = f (U)).
1. V is an interval or a point.
2. If f is strictly increasing (decreasing), then:
(a) V is an interval of positive length, f is injective, and therefore bijective.
(b) The inverse function f
1
: V U is also continuous and strictly increasing (decreasing).
Example 4.22. 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 closed
and bounded, then V is also. For instance,
f
[2, 9]
= [9, 25]
Proof. 1. If V is not a point, then a, b U such that f (a) < f (b). If y lies between these, IVT says
ξ between a and b such that y = f (ξ). That is, y f (U). By (), V = f (U) is an interval.
2. (a) If f is strictly increasing, then a, b U, a < b = f (a) < f (b). Plainly f is injective and
V contains at least two points; by part 1 it is an interval of positive length.
(b) 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.
If a U, it remains to show that f
1
is continuous at b = f (a) . Assume first that a is not
an endpoint of U and let ϵ > 0 be given such that [a ϵ, a + ϵ] U,. Now define
δ := min
b f (a ϵ), f (a + ϵ) b
This is positive since f is strictly increasing. But now
|
y b
|
< δ = f (a ϵ) b < y b < f (a + ϵ) b
= f (a ϵ) < y < f (a + ϵ)
= a ϵ < f
1
(y) < a + ϵ
=
f
1
(y) f
1
(b)
=
f
1
(y) a
< ϵ
where (=) used the fact that f is strictly increasing.
a a + ϵa ϵ
b
f (a + ϵ)
b + δ
b δ
f (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 defining δ.
72
Example 4.23. 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, surjective and strictly increasing. It therefore has a continu-
ous inverse f
1
: [0, 4] [0, 2]. Compare this with the familiar statement
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 4.18. Key concepts: Extreme/Intermediate Value Theorems, Cont functions preserve intervals
1. (a) Give an example of a discontinuous function f : [0, 1] R which is not bounded.
(b) State a continuous function with domain ( 1, ) whose range is bounded but not closed.
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 4.23.
4. Let S R and suppose there exists a sequence (x
n
) in S converging to some x
0
S. Show that
there exists an unbounded continuous function on S.
5. Prove that x = cos x for some x (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 some x between a, b such that f (x) = 0.
7. Suppose 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 4.20).
(Hint: If neither a nor b are fixed points, consider g(x) = f (x) x)
(b) Prove Corollary 4.19 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 relates to the idea that finite unions of closed sets are closed, but infinite unions need not be)
73
4.19 Uniform Continuity
Suppose f : U V is continuous. By the ϵ-δ definition (4.9),
a U, ϵ > 0, δ(a, ϵ) > 0 such that (x U)
|
x a
|
< δ =
|
f (x) f (a)
|
< ϵ ()
We write δ(a, ϵ) to stress 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 4.24. We start with an example where our desire cannot be satisfied.
Consider f (x) = x
2
with domain U = [0, ). Since f is continu-
ous, given ϵ > 0 and a
1
U, there exists δ such that
|
x a
1
|
< δ =
|
f (x) f (a
1
)
|
=
x
2
a
2
1
< ϵ
On page 64 we saw that δ = min(1,
ϵ
1+2a
1
) was suitable, but this
depends on the location a
1
. Of course other expressions for δ will
also work. . .
Visualize what happens if we attempt to use the same constant δ
for different a
i
: imagine sliding the fixed-width δ-interval along
the x-axis while simultaneously sliding the ϵ-interval vertically.
As a
i
increases, the image of the δ-interval eventually becomes
too large for the ϵ-interval to contain: if δ is constant, then
0
0
a
2
1
a
1
a
2
2
a
2
a
2
3
a
3
length
f (a
i
δ, a
i
+ δ)
= (a
i
+ δ)
2
(a
i
δ)
2
= 4a
i
δ
increases unboundedly with a
i
. For fixed ϵ, as a increases, the increasing gradient of f means that we
need to choose a smaller δ.
By contrast, if f (x) = x
2
on a finite domain [0, b], then any δ that demonstrates continuity at x = b
will also do so everywhere else on [0, b]. We’ll check this explicitly in a moment.
To obtain a formal definition, we rewrite () with the extra assumption that δ may be chosen inde-
pendently of the location a; this amounts to moving the quantifier a U after δ.
Definition 4.25. A function f : U V R is uniformly continuous if
ϵ > 0, δ > 0 such that (x, y U)
|
x y
|
< δ =
|
f (x) f (y)
|
< ϵ (†)
We use y instead of a for symmetry. Observe how δ, being quantified before x, y, now depends only
on ϵ. As before, 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 single point.
For the sake of tidiness, we make one more observation before seeing some examples.
Lemma 4.26. If f is uniformly continuous on U, then it is continuous on U.
This is 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.
74
Examples 4.27. 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 will follow 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 4.24. Our approach works for this function because the gradient
(and therefore the 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. Taking x y =
δ
2
, we see that
|
x + y
|
= 2y +
δ
2
=
|
f (x) f (y)
|
=
δ
2
2y +
δ
2
= δ
y +
δ
4
> δy
Let y =
1
δ
for the contradiction
|
f (x) f (y)
|
> 1 = ϵ (large y are the problem!).
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.
75
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 4.28. 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δ = ϵ
for some ξ between x and y. The existence of ξ follows from the mean value theorem.
31
Examples 4.29. 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.
31
If x < y then ξ (x, y) such that f
(ξ) =
f (x) f (y)
x y
.
76
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 (Definition 2.46).
Theorem 4.30. 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 ().
32
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 on the domain are crucial: Examples 4.27 provide counter-examples if either is
weakened.
Example 4.31. f (x) =
x is uniformly continuous on [0, 1] since it is already continuous! This
cannot be concluded from Theorem 4.28, since the derivative f
(x) =
1
2
x
1/2
is unbounded on (0, 1).
We now develop a partial converse, for which we first need a lemma.
Lemma 4.32. 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 (4.27.2, just easier!). Let f (x) =
1
x
have U = dom f = (0, ) and consider the Cauchy
sequence defined by x
n
=
1
n
; note crucially that its limit 0 does not lie in U. Moreover,
lim f (x
n
) = lim n =
Plainly
f (x
n
)
is not Cauchy, whence f is not uniformly continuous.
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:
N such that m, n > N =
|
x
n
x
m
|
< δ =
|
f (x
n
) f (x
m
)
|
< ϵ
Otherwise said,
f (x
n
)
is Cauchy.
The Cauchy condition is critical: we cannot apply uniform continuity directly to a convergent se-
quence (
|
x
n
x
|
< δ . . .) if we do not already know that its limit (x) lies in U!
32
These arguments should feel familiar: compare this line to the proof of Theorem 4.10 and the rest to Theorem 4.14.
77
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 4.33. 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 4.34. 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 4.30 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
4.32,
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.
78
Examples 4.35. 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 (it diverges by oscillation). Consequently,
we cannot extend f to a continuous function on any in-
terval 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
4.33, f is uniformly continuous on any bounded interval.
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 conclude that f (x) is uniformly
continuous on R \ {0}. We cannot use the derivative argument on the whole domain R \ {0},
since f
(x) is unbounded when x is small (lim f
1
2πn
= lim(2πn) = ).
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
|
and
|
cos y
|
1 for all y.
Something stranger is going on. As you may verify (see
Exercise 3), the extended function g is everywhere differen-
tiable 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)
79
Exercises 4.19. Key concepts: Order of quantifiers! Bounded derivative Unif cont Cont extension
1. Decide whether each f is uniformly continuous. 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 f is uniformly continuous 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 4.35.3 that the function g(x) is differentiable at zero
33
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 4.33 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
)
33
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.
80