136 CHAPTER 5. FUNCTIONS ON NORMED LINEAR SPACES

Hence ∥∥∥∥∥(

f −m

∑i=1

(23

)i−1

gi

)−(

23

)m

gm+1

∥∥∥∥∥M

≤(

23

)m+1

.

It follows there exists a sequence, {gi} such that each has its values in [−1/3,1/3] and forevery m 5.2 holds. Then let g(x)≡ ∑

∞i=1( 2

3

)i−1gi (x) . It follows

|g(x)| ≤

∣∣∣∣∣ ∞

∑i=1

(23

)i−1

gi (x)

∣∣∣∣∣≤ m

∑i=1

(23

)i−1 13≤ 1

and∣∣∣( 2

3

)i−1gi (x)

∣∣∣ ≤ ( 23

)i−1 13 so the Weierstrass M test applies and shows convergence

is uniform. Therefore g must be continuous by Theorem 3.9.3. The estimate 5.2 impliesf = g on M. The last claim follows because we can take each gi odd. ■

The following is the Tietze extension theorem.

Theorem 5.8.5 Let M be a closed nonempty subset of a metric space X and letf : M→ [a,b] be continuous at every point of M. Then there exists a function g continuouson all of X which coincides with f on M such that g(X)⊆ [a,b] . If [a,b] is centered on 0,and if X is a normed linear space and f is odd, then we can obtain that g is also odd.

Proof: Let f1 (x) = 1+ 2b−a ( f (x)−b) . Then f1 satisfies the conditions of Lemma

5.8.4 and so there exists g1 : X → [−1,1] such that g is continuous on X and equals f1 onM. Let g(x) = (g1 (x)−1)

( b−a2

)+ b. This works. The last claim follows from the same

arguments which gave Lemma 5.8.4 or the change of variables just given. ■

Corollary 5.8.6 Let M be a closed nonempty subset of a metric space X and let f : M→[a,b] be continuous at every point of M. Also let ∥ f −g∥ ≤ ε. Then there exists continuousf̂ extending f with f̂ (X) ⊆ [a,b] and ĝ extending g such that ĝ(X) ⊆ [a− ε,b+ ε]. Also∥∥ f̂ − ĝ

∥∥≤ ε.

Proof: Let f̂ be the extension of f from the above theorem. Now let F be the extensionof f −g with ∥F∥ ≤ ε . Then let ĝ = f̂ −F. Then for x ∈M, ĝ(x) = f (x)− ( f (x)−g(x)) =g(x). Thus it extends g and clearly ĝ(X)⊆ [a− ε,b+ ε]. ■

With the Tietze extension theorem, here is a better version of the Weierstrass approxi-mation theorem.

Theorem 5.8.7 Let K be a closed and bounded subset of Rp and let f : K→ R becontinuous. Then there exists a sequence of polynomials {pm} such that

limm→∞

(sup{| f (x)− pm (x)| : x ∈ K}) = 0.

In other words, the sequence of polynomials converges uniformly to f on K.

Proof: By the Tietze extension theorem, there exists an extension of f to a continuousfunction g defined on all Rp such that g = f on K. Now since K is bounded, there existintervals, [ak,bk] such that K ⊆∏

pk=1 [ak,bk] = R. Then by the Weierstrass approximation

theorem, Theorem 5.7.1 there exists a sequence of polynomials {pm} converging uniformlyto g on R. Therefore, this sequence of polynomials converges uniformly to g = f on K aswell. This proves the theorem. ■

By considering the real and imaginary parts of a function which has values in C onecan generalize the above theorem.

136 CHAPTER 5. FUNCTIONS ON NORMED LINEAR SPACES(-£6)"*)-G)| 0"It follows there exists a sequence, {g;} such that each has its values in [—1/3, 1/3] and forevery m 5.2 holds. Then let g(x) = V7, (2)! gi (x). It follows3E(2) w@/<h(2) $21i=lHenceIg (#)| <i-1 iI ; ,and \(3)' 8 (x)| < (4) 4 so the Weierstrass M test applies and shows convergenceis uniform. Therefore g must be continuous by Theorem 3.9.3. The estimate 5.2 impliesf =g0nM. The last claim follows because we can take each g; odd.The following is the Tietze extension theorem.Theorem 5.8.5 Let M be a closed nonempty subset of a metric space X and letf : M > [a,b] be continuous at every point of M. Then there exists a function g continuouson all of X which coincides with f on M such that g(X) C [a,b]. If [a,b] is centered on 0,and if X is anormed linear space and f is odd, then we can obtain that g is also odd.Proof: Let f\ (x) = 1+;% (f(x)—b). Then f; satisfies the conditions of Lemma5.8.4 and so there exists g; : X — [—1,1] such that g is continuous on X and equals f; onM. Let g(x) = (gi (x) — 1) (454) +5. This works. The last claim follows from the samearguments which gave Lemma 5.8.4 or the change of variables just given.Corollary 5.8.6 Let M be a closed nonempty subset of a metric space X and let f :M >(a, b] be continuous at every point of M. Also let || f — g|| < €. Then there exists continuousf extending f with f (X) C [a,b] and extending g such that @(X) C |a—e,b+e]. Alsof-8l|<e.Proof: Let f be the extension of f from the above theorem. Now let F be the extensionof f —g with ||F'|| <€. Then let = f — F. Then for x € M, 8 (x) = f (x)— (f(x) —g(x)) =g(x). Thus it extends g and clearly @(X) C [a—¢,b+¢].With the Tietze extension theorem, here is a better version of the Weierstrass approxi-mation theorem.Theorem 5.8.7 Let K be a closed and bounded subset of R? and let f : K + R becontinuous. Then there exists a sequence of polynomials {pm} such thatJim (sup {[f («) ~ Pm (@)|:@ € K}) =0.In other words, the sequence of polynomials converges uniformly to f on K.Proof: By the Tietze extension theorem, there exists an extension of f to a continuousfunction g defined on all R? such that g = f on K. Now since K is bounded, there existintervals, [ax,b,] such that K C []}_, [ax,b,] = R. Then by the Weierstrass approximationtheorem, Theorem 5.7.1 there exists a sequence of polynomials {p,,} converging uniformlyto g on R. Therefore, this sequence of polynomials converges uniformly to g = f on K aswell. This proves the theorem.By considering the real and imaginary parts of a function which has values in C onecan generalize the above theorem.