Chapter 4 Problem 5
If f is a real continuous function defined on a closed set E ⊂ R1 , prove that
there exists continuous real functions g on R1 such that g(x) = f (x) for all
x ∈ E. (Such functions g are called continuous extensions of f from E to R1 .)
Show that the result becomes false if the word “closed” is omitted. Extend the
result to vector-valued functions. Hint: Let the graph of g be a straight line on
each of the segments which constitute the complement of E (compare Exercise
29, Chapter 2). The result remains true if R1 is replaced by any metric space,
but the proof is not so simple.
Case 1 for E ⊂ R1 . Suppose that E does not contain −∞ nor ∞ . Then
E contains a smallest segment [as , bs ] and a largest segment [aL , bL ], where
as , bs , aL , and bL are real numbers. (If E consists of only one such segment then
as = aL and bs = bL .) Then E can be represented as
E = [as , bs ] ∪ [as1 , bs1 ] ∪ . . . ∪ [aL , bL ].
We then define g(x) as follows.
g(x) =
f (as ),
f
(x),
f (as1 )−f (bs )
(x − bs ) + f (bs ),
as1 −bs
f (x),
f (as )−f (bs1 )
2
as2 −bs1
..
.
f (x),
f (bL ),
if x < as ;
if as ≤ x ≤ bs ;
if bs < x < as1 ;
if as1 ≤ x ≤ bs1 ;
(x − bs1 ) + f (bs1 ), if bs1 < x < as2 ;
if aL ≤ x ≤ bL ;
if x > bL .
In other word, g(x) = f (x) for any x contained within any of the closed intervals
of E; on an open interval, the graph of g(x) is a straight line connecting the
endpoints of two successively closed intervals of E; and the graph of g(x) is a
horizontal line for values of x less than any points of E or greater than any
points of E.
Case 2 for E ⊂ R1 . Suppose E contains (−∞, p] or [q, ∞), where p < as and
q > bL . In this case, we need only modify the definition of g(x) given above. If
E contains (−∞, p], then instead of using g(x) = f (as ) when x < as , we use
(
g(x) =
f (x),
f (as )−f (p)
(x
as −p
if x ≤ p;
− p) + f (p), if p < x < as .
1
Similarly, if E contains [q, ∞), then instead of using g(x) = f (bL ) when x > bL ,
we use
(
g(x) =
f (q)−f (bL )
(x
q−bL
f (x),
− q) + f (bL ), if bL < x < q.
if x ≥ q.
Clearly, g(x) is continuous at every interior point of E as well as at every point
of E c , the complement of E (as every point of E c is an interior point). We only
have to show that g(x) is also continuous at points y where y = E ∩ E c .
Subcase 2a. Suppose there exists a closed set A and an open set B, where
A ⊂ E, B ⊂ E c and y = A ∩ B. Let A = [a, y] and B = (y, z), where a is
the left endpoint of A and z is the right endpoint of B. We need to show
that g is continuous at y. Choose > 0. Since g(x) is continuous on A then
limx→y− g(x) = g(y). That means there exists δ1 such that if y − x < δ1 then
(y)
|g(y) − g(x)| < . Now, for x ∈ B, g(x) = f (z)−f
(x − y) + f (y) . Let δ2
z−y
z−y
be any number such that δ2 < · f (z)−f (y) . Now, let δ = min{δ1 , δ2 }. Then
|g(x) − g(y)| < whenever |x − y| < δ.
Subcase 2b. In this case, as above, there exists a closed set A and an open
set B, where A ⊂ E, B ⊂ E c and y = A ∩ B. But B = (z, y) and A = [y, b].
Choose > 0. Since g(x) is continuous on A then limx→y+ g(x) = g(y). That
means there exists δ1 such that if x − y < δ1 then |g(y) − g(x)| < . Now,
(z)
for x ∈ B, g(x) = f (y)−f
(y − x) + f (z) . Let δ2 be any number such that
y−z
y−z
δ2 < · f (y)−f (z) . Now, let δ = min{δ1 , δ2 }. Then |g(x) − g(y)| < whenever
|x − y| < δ.
Hence, we have shown that for any y, where y = E ∩ E c , g(y) is continuous.
Therefore g(x) is continuous on all of R1 .
If E is not closed, then there is a limit point p of E such that p ∈
/ E. For
1
example, suppose E is [0, 1) and f (x) = 1−x
on E. Then limx→1− f (x) = ∞.
There is no way to define g(x) such that g(x) = f (x) on [0, 1) and yet have g(x)
defined on (−∞, 0) ∪ [1, ∞) so that g(x) is continuous on R1 . Specifically, there
is no way to define g(1) so that g(x) is continuous at x = 1.
We can extend this result to vector-valued functions. Suppose that
f1 is a real continuous function on closed set E1 ⊂ R1
f2 is a real continuous function on closed set E2 ⊂ R1
..
.
fn is a real continuous function on closed set En ⊂ R1 .
2
Then, we define f as
f = (f1 , f2 , . . . , fn ) ,
where f is a real continuous function defined on
E1 × E2 × · · · × En ,
which is a subset of Rn . Since each of the functions fi , where i = 1, 2, ....n can
be extended to a real continuous function gi (as shown above) on R1 , then
g = (g1 , g2 , . . . , gn )
is a real continuous function defined on Rn .
3
© Copyright 2026 Paperzz