Chapter 4
Chapter 4
Wissam Raji
Contents
1 Limits and Continuity in Metric Spaces 1
f :E⊂X→Y
if ∀ ε > 0 there exists δ > 0 such that if x ∈ E and dX (x, p) < δ, then
dY f (x), q < ε.
lim f (x) = ℓ
x→p
means that ∀ ε > 0 there exists δ > 0 such that if x ∈ E and |x − p| < δ, then
|f (x) − ℓ| < ε.
1
f (x)
f (x)
q+ϵ
q−ϵ
x
p−δpp+δ
Figure 1: The ϵ − δ definition of limits is visualized as such: for a given ϵ-band (red) around q,
there exists a δ-band (green) around p such that the graph of f (x) within the δ-band is entirely
contained within the ϵ-band.
lim f (x) = q
x→p
if and only if for every sequence {pn } ⊂ E with pn → p and pn ̸= p for all n, we have:
lim f (pn ) = q.
n→∞
In other words, a function approaches q at p if and only if every sequence approaching p makes
the function approach q.
Corollary 1.4. If f has a limit at p, then this limit is unique.
Definition 1.5. The function f : E ⊂ X → Y is said to be continuous at p ∈ E if ∀ ε > 0 there
exists δ > 0 such that
x ∈ E and dX (x, p) < δ =⇒ dY f (x), f (p) < ε.
E = (1, 2) ∪ {3}.
1 2 3
The line segment over (1, 2) has an open endpoint near x = 2, and an isolated point at x = 3. The
previous definition is true at p = 3, because we can choose δ > 0 such that
(3 − δ, 3 + δ) ∩ E = {3}.
Then,
|f (x) − f (3)| = |f (3) − f (3)| = 0 < ε.
Also, f is continuous at each point p ∈ (1, 2).
2
Remark 1.7. This example illustrates an important point: if p is an isolated point of the domain
E, then every function f : E → Y is automatically continuous at p. Indeed, since p is isolated, there
exists δ > 0 such that
Bδ (p) ∩ E = {p}.
Hence, whenever x ∈ E and d(x, p) < δ, we must have x = p, and therefore
dY (f (x), f (p)) = 0 < ε.
This shows that the ε–δ condition for continuity is automatically satisfied at isolated points.
This is a good reminder that continuity depends not only on the formula for f , but also on the
domain E, on which f is defined.
From the definitions of limit and continuity, if p ∈ E is a limit point, then
f is continuous at p ⇐⇒ lim f (x) = f (p).
x→p
3
Using the Sequential Criterion. Let {xn } ∈ A be any sequence such that xn → c, with xn ̸= c ∀n.
Then the inequality holds along the sequence:
Since,
lim inf g(xn ) = lim sup g(xn ) = L,
n→∞ n→∞
It follows that
limn→∞ g(xn ) = L.
Then, by the sequential criterion for limits, this implies:
lim g(x) = L.
x→c
then:
1. lim (f + g)(x) = A + B,
x→p
4
Theorem 1.13. Let f and g be continuous on a metric space X. Then f + g and f g are continuous
on X, and f /g is continuous on every point x ∈ X such that g(x) ̸= 0.
Theorem 1.14 (Composition of continuous functions). Let X, Y, and Z be metric spaces, let
f : E ⊂ X → Y , and g : f (E) → Z. Define
Proof. Let ε > 0. Since g is continuous at f (p), there exists η > 0 such that
y ∈ f (E) and dY (y, f (p)) < η =⇒ dZ g(y), g(f (p)) < ε.
Hence, h is continuous at p.
Nδ (p) ⊂ f −1 (V ).
Therefore, f −1 (V ) is open in X.
(⇐) Suppose now that f −1 (V ) is open in X for every open set V ⊂ Y . Fix p ∈ X and ε > 0.
Define
V = Nε f (p) := {y ∈ Y : dY (y, f (p)) < ε}.
Then V is open in Y , so f −1 (V ) is open in X and contains p. Hence, there exists δ > 0 such that
Nδ (p) ⊂ f −1 (V ).
Thus, f is continuous at p.
5
Corollary 1.16. A function f : X → Y is continuous if and only if f −1 (C) is closed in X for
every closed set C ⊂ Y .
Proof. Recall that a set E ⊂ Y is closed if and only if its complement E c is open. Moreover, inverse
images preserve complements:
f −1 (E c ) = (f −1 (E))c
Thus, f −1 (C) is closed in X if and only iff f −1 (C c ) is open in X. By Theorem 1.15, this is equivalent
to f being continuous.
where each Gα is open in Y . Since f is continuous, the preimage of each Gα is open in X, and we
have [
X= f −1 (Gα ).
α
f (f −1 (E)) ⊂ E
6
Note. For any set E, we always have
E ⊂ f −1 (f (E)).
Proof. By the previous theorem, the image, f⃗(X), is compact in Rk . By the Heine–Borel theorem,
every compact subset of Rk is closed and bounded. Therefore, f⃗(X) is closed and bounded, so in
particular it is bounded.
|f⃗(x)| ≤ M, ∀x ∈ E.
Theorem 2.6 (Extreme value theorem). Let f : X → R be continuous, where X is compact. Define
f (p) = M, f (q) = m.
Remark 2.7. The theorem states that a continuous function defined on a compact set attains both
its maximum and minimum values at points in the domain.
f (x) = x2 , f : [−1, 2] → R,
M = 4, m = 0,
f : R → R, f (x) = ex .
Then f is continuous, but it does not attain a maximum on R, since it is unbounded above. Its
infimum is
m=0
but this value is not attacined. Hence, the supremum and infimum are both not attained ∈ R.
7
Remark 2.10. The Extreme Value Theorem guarantees attainment of maximum and minimum
values only when the domain is compact. Without compactness, even very well-behaved continuous
functions may fail to attain their extreme values.
Proof of the extreme value theorem. Since f (X) is closed and X is compact, the image f (X) is
compact in R. Hence, f (X) is closed and bounded.
Therefore,
sup f (X), inf f (X) ∈ f (X).
It follows that there exist points p1 , p2 ∈ X such that
Proof. We proceed by contradiction. Suppose f (E) is not connected. Then there exists nonempty,
disjoint, separated sets A, B ⊂ Y such that
f (E) = A ∪ B, A, B ̸= ∅, A ∩ B = ∅, B ∩ A = ∅.
Define
G = E ∩ f −1 (A), H = E ∩ f −1 (B).
Then
E = G ∪ H, G, H ̸= ∅.
Moreover, since f is continuous and A, B are separated in F (E), their preimage f −1 (A) and
f −1 (B)are separated in X. Intersecting with E, it follows that G and H are separated in E. In
particular
G ∩ H = ∅, G ∩ H = ∅, G∩H =∅
Thus, E can be written as the union of two nonempty, disjoint, separated sets G and H, which
means that E is disconnected. This contradicts the assumption that E is connected.
Therefore, f (E) must be connected.
Note. This theorem states that a continuous real function assumes all intermediate values on an
interval.
Note. A similar result holds if f (a) > f (b).
8
Proof. The interval [a, b] is connected. So, by the previous theorem, image f ([a, b]) is connected in
R. By the characterization of connected sets in R, if E ∈ R is connected then for any x, y ∈ E with
x < z < y, we have z ∈ E.
When we apply this to:
f (x0 ) = c.
This classical proof highlights how continuity interacts with the completeness of R
Remark 3.2 (Continuity vs. Uniform Continuity). The conceptual difference between continuity
and uniform continuity is ”who chooses δ first.”
• In standard continuity, δ depends on both ϵ and the specific point p, written as δ = δ(ϵ, p).
As p moves around the domain, the required δ might shrink toward zero (e.g., when a graph
becomes steeper).
Note. Clearly, if f is uniformly continuous, then f is continuous. The converse is not necessarily
true, as the following examples shows.
9
Let ϵ = 1 and define 2 sequences approaching 0:
1 1
xn =
, yn = n∈N
n n+1
The horizontal distance between these points is:
1 1 1
|xn − yn | = − = .
n n+1 n(n + 1)
By choosing n large enough, |xn − yn | can be made smaller than any proposed δ.
However, the vertical distance is:
f (x)
ϵ
1
f (x) = x
x
δ1
δ2
Figure 2: For f (x) = 1/x, maintaining the same vertical error bound (ϵ) requires a much smaller
horizontal neighborhood (δ2 ≪ δ1 ) as x → 0. Thus, a single uniform δ cannot be chosen for the
entire interval.
Example 3.4. A noncompact domain does not automatically prevent uniform continuity.
For instance, consider:
f : R → R, f (x) = x,
Given ε > 0, choose δ = ε. Then for all x, y ∈ R
10
Since
| arctan x − arctan y| ≤ |x − y|, ∀x, y ∈ R
f is uniformly continuous on R as well.
Remark 3.5. Compactness guarantees uniform continuity, but uniform continuity may still hold
on noncompact domains, as seen in the above examples.
Theorem 3.6. Let f : X → Y be continuous, and suppose X is a compact metric space. Then f is
uniformly continuous on X.
Proof. Let ε > 0. Since f is continuous at each p ∈ X, there exists η(p) > 0 such that
ε
q ∈ X, dX (p, q) < η(p) =⇒ dY f (p), f (q) < . (*)
2
Define
η(p)
J(p) = q ∈ X : dX (p, q) < = Nη(p)/2 (p).
2
Each J(p) is open, and the family {J(p) : p ∈ X} forma an open cover of X. By compactness, there
exists a finite subcover
J(p1 ) ∪ · · · ∪ J(pn ) = X.
Set
1
δ := min η(p1 ), . . . , η(pn ) .
2
We claim that
dX (p, q) < δ =⇒ dY f (p), f (q) < ε. (**)
Indeed, let dX (p, q) < δ. Then p ∈ J(pm ), for some m, hence
1
dX (p, pm ) < η(pm ).
2
Moreover,
1
dX (q, pm ) ≤ dX (q, p) + dX (p, pm ) < δ + η(pm ) ≤ η(pm ).
2
By (*) we obtain
ε ε
dY f (p), f (q) ≤ dY f (p), f (pm ) + dY f (pm ), f (q) < + = ε.
2 2
This proves (**) and hence f is uniformly continuous on X.
11
Proof. Suppose for contradiction that f is uniformly continuous. Then for some ε > 0 there exists
δ > 0 such that
|t − x| < δ, t, x ∈ E =⇒ |f (t) − f (x)| < ε. (1)
Choose N1 , N2 > 0 such that
1 1
− < δ, N2 − N1 > ε.
N2 N1
and set
1 1
t = x0 + , x = x0 + .
N1 N2
Then
1 1
|x − t| = − < δ,
N2 N1
but
1 1
|f (x) − f (t)| = − = |N2 − N1 | > ε,
x0 + 1/N2 − x0 x0 + 1/N1 − x0
contradicting (1). Therefore, f is not uniformly continuous on E.
0 ≤ h(x) < 1, x ∈ R.
Moreover,
sup h(x) = 1,
x∈R
but since R is not compact, h does not attacn a maximum in R. Note also that
1
h(x) = 1 − → 1 as x → ∞
1 + x2
12
f (x)
x
x1 x2 x3
• If a < x ≤ b, we write
f (x+) = q
if f (tn ) → q for all sequences {tn } in (x, b) such that tn → x.
• If a ≤ x < b, we write
f (x−) = q
if f (tn ) → q for all sequences {tn } in (a, x) such that tn → x.
Clearly,
lim f (t) = α ⇐⇒ f (x+) = f (x−) = α.
t→x
Definition 3.13. Let f : (a, b) → R. If f (x+ ) and f (x− ) exist but f is discontinuous at x, then
we say that f has a discontinuity of the first kind, or a simple discontinuity, at x. Otherwise, the
discontinuity is said to be of the second kind.
13
This function, often called the ”popcorn function,” has a fascinating and counterintuitive property.
It is discontinuous at every rational number, but continuous at every irrational number. This
demonstrates that the set of discontinuities of a function can be dense in the domain without the
function being nowhere continuous.
1. f (x+ ) ̸= f (x− ), or
Remark 3.15. The continuity at irrational points can be understood intuitively as follows:
If x0 is irrational, then near x0 there may be many rational numbers, but only finitely many of
them can have a small denominator. Since the value of the function at a rational number pq is 1q ,
the only rationals that lie very close to x0 must typically have a large denominator, and hence their
function values are very small.
Thus, near an irrational point, the values of the function are forced to stay close to 0, which
explains why the function is continuous there.
Hence f is continuous at x = 0.
At x ̸= 0: f (x+ ) and f (x− ) do not exist, because any interval (x − δ, x + δ) contains both rational
and irrational numbers. One may choose sequences of irrational numbers tn → x and rational
numbers sn → x such that {f (tn )} and {f (sn )} do not converge to any common limit.
14
Example 3.19. Let (
sin x1 , x ̸= 0,
f (x) =
0, x = 0.
We showed earlier that limx→0 f (x) does not exist. Hence f has a discontinuity of the second kind
at x = 0 because f (0+ ) and f (0− ) do not exist.
Nevertheless, f is continuous at every point x ̸= 0, since it is the composition of the two continuous
functions
1
x 7→ , x 7→ sin x.
x
Theorem 4.2. Let f : (a, b) → R be monotonically increasing on (a, b). Then f (x+ ) and f (x− )
exist at every point x ∈ (a, b). More precisely,
Proof. Let
A = sup f (t).
a<t<x
Since f (t) ≤ f (x) for all t ∈ (a, x), f (x) is an upper bound of the set {f (t) : a < t < x}. Hence, by
the definition of the supremum,
A ≤ f (x).
We show that A = f (x− ). Let ε > 0. By definition of A, there exists y such that
A − ε < y ≤ A.
A − ε < f (x − δ) ≤ A. (1)
Since f is increasing,
f (x − δ) ≤ f (t) ≤ A, x − δ < t < x (2)
15
From (1) and (2) we obtain,
so
|f (t) − A| < ε, x − δ < t < x.
Thus f (x− ) = A.
We have proved
For the second part, fix x < y in (a, b). Apply the first part on (a, y) instead of (a, b) to get
Corollary 4.3. Monotone functions do not have discontinuities of the second kind, since f (x+ )
and f (x− ) always exist.
Theorem 4.4. Let f : (a, b) → R be monotonic. Then the set of points of (a, b) at which f is
discontinuous is at most countable.
and if f (x− ) = f (x+ ), then f would be continuous at x. Hence f (x− ) < f (x+ ) and therefore the
interval (f (x− ), f (x+ )) contains a rational number.
16
If x1 ̸= x2 , say x1 < x2 , then
f (x− + − +
1 ) < r(x1 ) < f (x1 ) ≤ f (x2 ) < r(x2 ) < f (x2 ),
x 7→ r(x)
f (x)
f (x0 +)
f (x0 ) Jump Gap
f (x0 −)
x
x0
Figure 4: For a monotonically increasing function, the left limit f (x0 −) and right limit f (x0 +)
always exist. The true function value f (x0 ) must lie between them, or coincide with one of them.
The size of the discontinuity is exactly f (x0 +) − f (x0 −).
Remark 4.5. The previous theorem gives a very useful qualitative picture of monotone functions:
Thus, although a monotone function need not be continuous, its discontinuities are highly
restricted.
means that for every ε > 0 there exists δ > 0 such that
x ∈ E, dX (x, p) < δ =⇒ dY f (x), q < ε.
17
For the case f : E ⊂ R → R, this becomes
lim f (x) = ℓ
x→p
• f (x) → a as x → ∞, a ∈ R, means:
∀ε > 0, ∃M ∈ R such that for all x ∈ E, x > M =⇒ |f (x) − a| < ε.
• f (x) → ∞ as x → ∞ means:
∀M ∈ R, ∃N ∈ R such that for all x ∈ E, x > N =⇒ f (x) > M.
With these notions of limit, the usual algebraic rules still hold.
Theorem 4.6. Let f, g : E ⊂ R → R. Suppose
f (t) → A, g(t) → B, t → x,
where A and B belong to
{−∞} ∪ R ∪ {+∞}.
Then, whenever the right-hand side is defined,
1. f (t) → A′ =⇒ A′ = A,
2. (f + g)(t) → A + B,
3. (f g)(t) → AB,
4. (f /g)(t) → A/B.
The right members in (2), (3), and (4) must be defined; for example, the forms
∞ A
∞ − ∞, 0 · ∞, ,
∞ 0
are not defined in this context.
Example 4.7. Let
x2 1
f (x) = 2
=
1+x 1 + 1/x2
1 1
Since x2
→ 0 as x → ∞, we have 1 + x2
→ 1 and thus,
x2
→1 (x → ∞).
1 + x2
18
Inverse mappings
Theorem 4.8. Suppose f is a continuous one-to-one mapping of a compact metric space X onto a
metric space Y . Then the inverse mapping
f −1 : Y → X, f −1 (f (x)) = x, x ∈ X,
is continuous.
Proof. Let V ⊂ X be open, and let g = f −1 . We want to show that g −1 (V ) is open in Y . But
g −1 (V ) = {y ∈ Y : g(y) ∈ V }.
Since f (V ) = g −1 (V ), it is enough to show that f (V ) is open.
V c is closed in X, Since X is compact, V c is compact. f is continuous, so f (V c ) is compact and
c
therefore closed. Finally, because f is one-to-one and onto, f (V c ) = f (V )
Hence f (V ) is open, so g is continuous.
Example 4.11. Use the continuity of the exponential function and the convergence
ln n
→0 (n → ∞)
n
to show that √
n
n → 1.
Let
√
n
ln n
yn = ln n= → 0.
n
Consider the continuous function f (x) = ex . Then, f (yn ) → f (0) = 1, i.e.,
√n
ln(n)
n=e n →1
19