Weierstrass
Weierstrass
1 Sequences of functions
Definition 1.1. Let {fn } be a sequence of functions on a set E. We say that {fn } converges
pointwise to a function f on E if the sequences fn (x) ! f (x) for every x 2 E. We write fn ! f
pointwise on E.
Definition 1.2. Let {fn } be a sequence of functions on a set E. We say that {fn } converges
uniformly to a function f on E if given ✏ > 0, there exists n0 2 N such that d(fn (x), f (x)) < ✏
for all x 2 E, n n0 . We write fn ! f uniformly on E.
Lemma 1.1. Let G be a collection of functions on a set E, and let f be a function on E with
the following property: given ✏ > 0, there exists g 2 G such that |g(x) f (x)| < ✏ for all x 2 E.
Then, f is the uniform limit of functions in G.
Proof. For all n 2 N, let gn 2 G be the function such that |gn (x) f (x)| < 1/n for all x 2 E.
Then, gn ! f uniformly on E. To prove this, let ✏ > 0. Using the Archimedean property of the
reals, pick n0 2 N such that n0 ✏ > 1. Thus, for all x 2 E and n n0 , we have
1 1
|gn (x) f (x)| < < ✏.
n n0
Theorem 1.2 (Cauchy criterion). Let {fn } be a sequence of real valued functions on a set E.
This sequence of functions converges uniformly on E if and only if given ✏ > 0, there exists
n0 2 N such that
|fn (x) fm (x)| < ✏
for all x 2 E, m, n n0 .
Proof. First, suppose that the sequence of real valued functions {fn } converges uniformly on
E, with fn ! f uniformly. Given ✏ > 0, we choose n0 2 N such that for all x 2 E and n n0 ,
✏
|fn (x) f (x)| < .
2
Now, for all x 2 E and m, n n0 , we have
1
Thus, {fn } is a Cauchy sequence.
Next, suppose that {fn } is a Cauchy sequence. Given ✏ > 0, choose n0 2 N such that for all
x 2 E and m, n n0 , we have
✏
|fn (x) fm (x)| < .
2
Now for each point x 2 E, the Cauchy criterion for convergence of a sequence of real numbers
guarantees that limn!1 fn (x) exists. Thus, we can define the function f on E such that
f (x) = limn!1 fn (x), hence fn ! f pointwise. Fix x0 2 E, and pick n00 2 N such that for all
m n00 , we have |fm (x0 ) f (x0 )| < ✏/2. Choose m = max(n0 , n00 ), whence for all n n0 , we
have
|fn (x0 ) f (x0 )| = |(fn (x0 ) fm (x0 )) + (fm (x0 ) f (x0 ))|
|fn (x0 ) fm (x0 )| + |fm (x0 ) f (x0 )|
✏ ✏
+
2 2
= ✏.
Note that x0 was arbitrary, with n0 chosen independently of x0 . Thus, {fn } converges uniformly
on E.
Theorem 1.3. Let {fn } be a sequence of real valued functions on a set E, and let f be a real
valued function on X such that fn ! f pointwise. For all n 2 N, set
Mn = sup |fn (x) f (x)|
x2E
Theorem 1.4. Let {fn } be a sequence of real valued bounded, functions on a set E, and let f
be a function on E such that fn ! f uniformly. Then, f is bounded on E.
Proof. Using the uniform convergence of {fn }, choose n0 2 N such that
|fn (x) f (x)| < 1
for all x 2 E and n n0 . Specifically, this holds for n = n0 so for all x 2 E, we have
fn (x) 1 < f (x) < fn (x) + 1.
However, fn is bounded so there exists M > 0 such that |fn (x)| < M for all x 2 E, hence
M 1 < f (x) < M + 1
or |f (x)| < M + 1 for all x 2 E.
2
Theorem 1.5 (Uniform limit theorem). Let {fn } be a sequence of continuous functions on
a metric space X, and let f be a function on X such that fn ! f uniformly. Then, f is
continuous on X.
Proof. Fix x0 2 X, and let ✏ > 0. Use the uniform convergence of {fn } to pick n0 2 N such
that for all x 2 X and n n0 ,
✏
|fn (x) f (x)| < .
3
Note that the above also holds specifically at x = x0 . Use the continuity of each fn to choose
> 0 such that for all x 2 X satisfying |x x0 | < , we have
✏
|fn (x0 ) fn (x)| < .
3
Set n = n0 , whence for all x 2 X satisfying |x x0 | < , we have
|f (x0 ) f (x)| = |(f (x0 ) fn (x0 )) + (fn (x0 ) fn (x)) + (fn (x) f (x))|
|f (x0 ) fn (x0 )| + |fn (x0 ) fn (x)| + |fn (x) f (x)|
✏ ✏ ✏
+ +
3 3 3
= ✏.
Theorem 1.6 (Dini’s theorem). Let {fn } be a sequence of continuous real valued functions on
a compact metric space K such that fn fn+1 for all n 2 N, and let f be a continuous function
on K such that fn ! f pointwise. Then, fn ! f uniformly on K.
Proof. Let ✏ > 0. For each n 2 N, set gn = fn f and note that the each gn is continuous,
with gn gn+1 and gn ! 0 pointwise on K. Since {gn } is a decreasing sequence, we must have
gn 0 for all n 2 N. It is sufficient to show that gn ! 0 uniformly on K, i.e. there exists n0 2 N
such that for all x 2 K and n n0 , we have gn (x) < ✏.
Define the sets
Gn = gn 1 [✏, 1) = {x 2 K : gn (x) ✏}.
Since each gn is continuous, the sets Gn which are the pre-images of closed sets in R are closed.
Furthermore, Gn is the intersection of the closed set Gn and the compact set K, hence each Gn
is compact. Note that if x 2 Gn+1 for some n 2 N, then gn+1 (x) ✏ =) gn (x) gn+1 (x) ✏
so x 2 Gn ; this means that Gn ◆ Gn+1 for all n 2 N. Thus, if any Gn0 happened to be empty,
then all subsequent Gn n0 = ; as well.
Suppose
T that all Gn are non-empty. Then the countable intersection of nested compact sets
G = n2N Gn must also be non-empty. Pick x0 2 G, and note that x0 2 Gn for all n 2 N,
which means gn (x0 ) ✏ for all n 2 N. This contradicts the fact that gn (x0 ) ! 0 pointwise.
Thus, there must be some Gn0 = ;, hence Gn n0 = ;. In other words, for all n n0 , there is
no x 2 K such that gn (x) ✏. This completes the proof.
Remark. Note that the continuity of f , the compactness of K, and the monotonicity of {fn }
are all essential.
(a) Consider fn : [0, 1] ! R, x 7! xn , and note that xn xn+1 on [0, 1]. We have fn ! f
pointwise on the compact interval [0, 1], where
(
0, if 0 x < 1,
f : [0, 1] ! R, x 7!
1, if x = 1.
3
Figure 1: The Bernstein polynomials of degree 7. The peaks at x = k/7 have been marked.
Note that fn ! 0 pointwise on the compact interval [0, 1], because given any x0 2 (0, 1],
we can choose sufficiently large n0 2 N such that n0 x0 > 1, hence fn (x0 ) = 0 for all
n n0 ; if x0 = 0, then fn (0) = 0 for all n 2 N anyway. However, the sequence {fn } is not
monotonic, and indeed this convergence is not uniform on [0, 1]. Note that fn (1/2n) = 1/2
for all n 2 N, hence sup |fn (x)| 1/2 6! 0.
Remark. Each polynomial Bnk on the interval [0, 1] peaks at x = k/n. See Figure 1.
4
Figure 2: The Bernstein polynomial expansion of order 20 (orange) of the curve f (x) =
ex cos(2⇡x) (red) on [0, 1]. Each term of the sum has been shown in blue. Note that only
the marked points at x = k/20 have been sampled from f .
Definition 2.2 (Bernstein expansions). Let f be a real valued function on [0, 1]. The Bernstein
polynomial expansion of f is defined as
Xn ✓ ◆ ✓ ◆
n k n k k
Bn (f, x) = x (1 x) f .
k n
k=0
5
Repeating the same procedure, we have
n ✓ ◆
X ✓ ◆
n 1 n 2 n k 1 n k k
(x + y) + (n 1)x(x + y) = kx y ,
k n
k=0
Xn ✓ ◆ ✓ ◆2
x n 1 n k n k
(x + y)n 1
+ 2
x (x + y) n 2
= x y k
.
n n k n
k=0
Finally, set y = 1 x upon which all x + y terms become 1 and the right hand sides become
the Bernstein expansions of 1, x, and x2 . This establishes the desired identities.
Theorem 2.2. Let f be a real valued continuous function on the closed interval [0, 1], and let
✏ > 0. There exists a polynomial p such that |p(x) f (x)| < 0 on x 2 [0, 1].
Proof. We claim that a Bernstein polynomial expansion Bn (f, x) of sufficiently high order sat-
isfies the given conditions. Let ✏ > 0. Now, the continuity of f on the compact interval
[0, 1] implies that it is uniformly continuous and bounded. Thus, there exists > 0 such that
whenever |x x0 | < for x, x0 2 [0, 1], we have
✏
|f (x) f (x0 )| < .
2
Fix x0 2 [0, 1]. Observe that M = supx2[0,1] |f (x)| is finite. Thus, in those cases where
|x x0 | , use |x x0 |/ 1 and the triangle inequality to write
✓ ◆
x x0 2
|f (x) f (x0 )| 2M 2M .
The triangle inequality, followed by our estimate of |f (x) f (x0 )|, gives
n ✓ ◆
X ✓ ◆
n k n k k
|Bn (f, x) f (x0 )| x (1 x) f f (x0 )
k n
k=0
n ✓ ◆ " ✓ ◆ #
X n k k/n x0 2 ✏
x (1 x)n k
2M +
k 2
k=0
2M ✏
= 2
Bn ((x x0 )2 , x) +
2
2M ⇥ ⇤ ✏
= Bn (x2 , x) 2x0 Bn (x, x) + x20
2
+
2
2M x x2 ✏
= 2 + x2 2xx0 + x20 + .
n n 2
6
The term in square brackets can be rearranged as
1
(x x0 ) 2 + (x x2 ).
n
Use (x 1/2)2 0 to conclude that x x2 1/4, and evaluate the expression at x = x0 to
write
M ✏
|Bn (f, x0 ) f (x0 )| 2
+ .
2n 2
Therefore, setting n0 > M/2✏ 2 , we see that
Figure 3: The first 250 Bernstein expansions of ex cos(2⇡x) on [0, 1]. Note that convergence is
fairly slow.
Corollary 2.2.1. Given any real valued continuous function f on [0, 1], there exists a sequence
of polynomials {pn } such that pn ! f uniformly on [0, 1].
Corollary 2.2.2. The same holds for any real valued continuous function on some closed in-
terval [a, b].
7
Proof. Consider the continuous bijection
For an arbitrary real valued continuous function f : [a, b] ! R, note that the composition
g = f ' is also continuous with domain [0, 1]. Given ✏ > 0, we find a polynomial p such that
for all x 2 X and m, n n0 , hence Theorem 1.2 says that fn ! f uniformly on X. Theorem 1.3
says that d(fn , f ) ! 0. Since each fn is bounded and continuous, Theorems 1.4 and 1.5
guarantee that f is also bounded and continuous. Thus, f 2 C(X), hence the Cauchy sequence
{fn } converges in C(X).
4 Algebras of functions
Definition 4.1. A family A of real valued functions on a set E is called an algebra if f +g 2 A,
f g 2 A, and cf 2 A for all f, g 2 A and c 2 R.
Definition 4.2. An algebra A is uniformly closed if given any sequence of functions {fn } in A
such that fn ! f uniformly, we have f 2 A.
8
Definition 4.3. The uniform closure B of an algebra A is the set of all functions which are
limits of uniformly convergent sequences of functions in A.
Proof. Let f, g 2 B. By construction, we can choose sequences {fn } and {gn } in A such that
fn ! f and gn ! g uniformly. Since each fn is bounded, we see that f is also bounded by
Theorem 1.4, and the same applies for g. In order to prove that B is an algebra, we show that
fn + gn ! f + g, fn gn ! f g, and cfn ! cf uniformly for all c 2 R.
|(fn (x) gn (x)) (f (x) + g(x))| < |fn (x) f (x)| + |gn (x) g(x)| < ✏.
|fn (x)gn (x) f (x)g(x)| = |fn (x)gn (x) fn (x)g(x) + fn (x)g(x) f (x)g(x)|
|fn (x)||gn (x) g(x)| + |fn (x) f (x)||g(x)|.
Thus, let n0 2 N be such that for all x 2 E and n n0 , we have |fn (x) f (x)| < 1, hence
|fn (x)| < |f (x)| + 1. Since f is bounded, this means that we can choose M1 > 0 such that
|fn (x)| < M1 for all x 2 E, n n0 . Similarly, pick M2 > 0 such that |g(x)| < M for all
x 2 E. Finally, pick n1 , n2 2 N such that for all x 2 E,
✏
|fn (x) f (x)| < , for all n n1 ,
2M2
✏
|gn (x) g(x)| < , for all n n2 .
2M1
It immediately follows that for all x 2 E and n max(n0 , n1 , n2 ), we have
✏ ✏
|fn (x)gn (x) f (x)g(x)| < M1 + M2 = ✏.
2M1 2M2
Remark. Without the requirement of boundedness, we see that x + 1/n ! x uniformly on
R, but (x + 1/n)2 = x2 + 2x/n + 1/n2 ! x2 only pointwise on R, not uniformly.
(c) Let ✏ > 0 and c 2 R. If c = 0, we trivially have 0 ! 0 uniformly for the constant zero
functions. Otherwise, pick n0 2 N such that for all x 2 E and n n0 ,
✏
|fn (x) f (x)| < .
|c|
9
To prove that B is uniformly closed, we must show that it contains all its uniform limits.
Let {hn }n2N be a sequence in B such that hn ! h uniformly for some function on E. Now, for
each hn 2 B, there exists a sequence {hni }i2N in A such that hni ! hn uniformly.
Let ✏ > 0, and pick n0 2 N such that for all x 2 E and n n0 , we have
✏
|hn (x) h(x)| < .
2
Next, for each such n n0 , pick in 2 N such that for all x 2 E and i in , we have
✏
|hnin (x) hn (x)| < .
2
Now, for all x 2 E and n n0 , observe that
Thus, the sequence {hnin }n2N in A converges uniformly to h, so h 2 B. This proves that B is
uniformly closed.
Theorem 4.2. Let A be an algebra of real valued, bounded functions on a set E and let B be
its uniform closure. If f, g 2 B, then the functions |f | 2 B, max(f, g) 2 B, min(f, g) 2 B.
Proof. Let ✏ > 0. Since f is bounded, there exists M > 0 such that |f (x)| < M for all x 2 E.
Using Theorem 2 and its corollaries, pick a polynomial p such that for all x 2 [ M, +M ],
Since ✏ > 0 was arbitrary and B is uniformly closed, we have shown that |f | 2 B.
To show that max(f, g) 2 B and min(f, g) 2 B, simply observe that
1 1
max(f, g) = (f + g) + |f g|,
2 2
1 1
min(f, g) = (f + g) |f g|.
2 2
Note that these denote the pointwise maximum and minimum.
Theorem 4.3. Let A be an algebra of real valued functions on E which separates points on E
and vanishes at no point of E. Let x1 , x2 2 E be distinct, and let c1 , c2 2 R. Then there exists
a function f 2 A such that f (x1 ) = c1 and f (x2 ) = c2 .
10
Proof. Since A vanishes at no point of E, choose f1 , f2 2 A such that f1 (x1 ) 6= 0 and f2 (x2 ) 6= 0.
Since A separates points on E, pick the function g 2 A such that g(x1 ) 6= g(x2 ). Now, define
the functions h1 , h2 on E as
Observe that h1 , h2 2 A (use (g g(x2 ))f1 = gf1 g(x2 )f1 2 A and the analogous relation),
with h1 (x1 ) = h2 (x2 ) = 1 and h1 (x2 ) = h2 (x1 ) = 0 (essentially, hi (xj ) = ij ). Finally, define
the function f on E as
f (x) = c1 h1 (x) + c2 h2 (x).
Clearly, f 2 A with f1 (x1 ) = x1 and f2 (x2 ) = c2 as desired.
Remark. This is essentially the process of Lagrange interpolation. In order to interpolate distinct
x1 , . . . , xn with c1 , . . . , cn , use the above theorem to choose the functions hij for distinct i, j such
that hij (xi ) = 1, hij (xj ) = 0 for each pair i, j. Thus, the function
Y
hi = hij
i6=j
Proof. Let B be the uniform closure of A. Since A consists of real valued, continuous functions
on a compact interval, they are all uniformly continuous and bounded, with their uniform
limits being continuous as well. Thus, B is an algebra of real valued, uniformly continuous and
bounded functions. To show that B is precisely C(K), we fix f 2 C(K) and show that f is the
uniform limit of functions from B. Since B is uniformly closed, this would imply f 2 B, thus
completing the proof.
Let ✏ > 0, and let s, t 2 K. Using Theorem 4.3, find functions gst 2 B such that gst (s) = f (s)
and gst (t) = f (t). Fix s, and note that for each t 2 K, the continuity of gst means that there
exists an open set Ust ✓ K such that
for all x 2 Ust . Now, the collection of open sets {Ust }t2K clearly covers the compact set K,
hence we can choose a finite sub-cover {Ust }t2T where T ⇢ K is finite. Define the function gs
on K as
gs = max gst .
t2T
11
Figure 4: The construction of gs . Here, we only required three points T = {t1 , t2 , t3 }.
We repeat this process again, this time to obtain an upper bound. For each s 2 K, the
continuity of gs means that there exists an open set Us ✓ K such that
for all x 2 Us . Now, the collection of open sets {Us }s2K covers the compact set K, hence we
choose a finite sub-cover {Us }s2S where S ⇢ K is finite. Define the function g on K as
g = min gs .
s2S
Again, Theorem 4.2 gives g 2 B, and given x 2 K, we can choose s 2 S such that x 2 Us ,
hence g(x) gs (x) < f (x) + ✏. Furthermore, every gs obeys gs (x) > f (x) ✏ everywhere;
since g is the minimum of finitely many functions, given x 2 K we find s 2 S such that
g(x) = gs (x) > f (x) ✏. This shows that for all x 2 K,
or |g(x) f (x)| < ✏. Thus, f is the uniform limit of functions in B, proving that the uniform
closure of A is the set C(K).
12
Figure 5: The construction of g. Again, we only required three points S = {s1 , s2 , s3 }.
Corollary 5.1.1. Let K be a compact subset of the Euclidean metric space Rn , and let P be the
algebra of polynomials in n variables on K. Then, given any real valued, continuous function f
on K, there exists a sequence of polynomials {pn } ⇢ P such that pn ! f uniformly on K.
Proof. We need only check that P is an algebra of real continuous functions which separates
points on K and vanishes at no point of K, after which the result follows directly from the
above theorem.
Note that every polynomial function p 2 P is of the form
X
p(x) = ci1 ,i2 ,...,in xi11 xi22 . . . xinn .
i1 ,i2 ,...,in
Each term in the finite sum is the product of projection maps (x1 , . . . , xn ) 7! xi , which are
continuous. Thus, the polynomial p is indeed real valued and continuous, with the coefficients
ci1 ...in 2 R. It is evident that given a scalar c 2 R, we have cp 2 P since the result is of the
same form. Given p, q 2 P, it is also evident that p + q 2 P; term by term multiplication shows
that pq 2 P as well. Thus, P is an algebra.
To show that P vanishes nowhere on K, note that the constant polynomial p(x1 , . . . , xn ) =
1 6= 0 on any K ✓ Rn . To show that P separates points on K, pick y, w 2 K where y 6= w.
Then yj 6= wj for at least one index j, so the polynomial p(x1 , . . . , xn ) = xj separates w and y.
Applying the Stone-Weierstrass Theorem completes the proof.
for real coefficients ai , bi . Then, given any real valued, continuous function f on [0, ⇡], there
exists a sequence of functions {fn } ⇢ F such that fn ! f uniformly on [0, ⇡].
Proof. Like before, we need only check that F satisfies the requirements of the Stone-Weierstrass
Theorem.
It is clear that F is closed under sums and scalar multiples. To show that it is closed under
products, we supply the following identities.
1
sin(nx) sin(mn) = [cos((n m)x) cos((n + m)x)] ,
2
13
1
sin(nx) cos(mn) = [sin((n + m)x) + sin((n m)x)] ,
2
1
cos(nx) cos(mn) = [cos((n + m)x) + cos((n m)x)] .
2
Thus, F is indeed an algebra. Now, F contains the constant function x 7! 1, hence F vanishes
nowhere on [0, ⇡]. Furthermore, given distinct x1 , x2 2 [0, ⇡], we must have cos(x1 ) 6= cos(x2 ),
because the map x 7! cos(x) is strictly decreasing on [0, ⇡], and hence is injective. Thus, F
separates points on [0, ⇡].
Remark. Note that F does not separate the points 0 and 2⇡, due to the periodicity of the cosine
and sine functions. In order to extend the domain to [0, ⇡↵], we may redefine F to consist of
functions of the form
N
X
f (x) = a0 + an cos(nx/↵) + bn sin(nx/↵).
n=1
Remark. Instead, consider the unit circle S 1 (which is compact under the usual Euclidean
topology on R2 ) as our domain. Let F̃ be the algebra of functions of the form
N
X
f˜(eix ) = a0 + an cos(nx) + bn sin(nx).
n=1
Here, we use the usual identification of S 1 with the unit circle in C described by the set of
points satisfying |z| = 1. The closure of this algebra is the set of all real continuous functions
on S 1 , each of which can be identified with a unique real continuous, ↵-periodic function on R.
Thus, given an arbitrary real valued, continuous function f on R with period ↵ and ✏ > 0, pick
g̃ 2 F̃ such that |g̃(z) f˜(z)| < ✏ on S 1 . Thus, for all x 2 R, we have
Theorem 5.2. Let A be an algebra on a compact metric space K which satisfies the require-
ments of the Stone-Weierstrass Theorem. Then, given f 2 C(K), there exists a monotonically
decreasing sequence of functions from A which converge uniformly to f on K.
Proof. For all n 2 N, define the functions fn = f + 2/3n and use the Stone-Weierstrass theorem
to select functions gn 2 A such that
1
|gn (x) fn (x)| <
3n
everywhere on K. As a result, each gn satisfies
1 1
f+ n
< gn < f + n 1
3 3
on K. This immediately gives gn > gn+1 for all n 2 N. Furthermore, for all x 2 K, we have
1
|gn (x) f (x)| < !0
3n 1
which establishes gn ! f uniformly on K by Theorem 1.3.
14