6.10. WEIERSTRASS APPROXIMATION 119
Proof: By the binomial theorem,
f (x) = f (x)n
∑k=0
(nk
)xk (1− x)n−k =
n
∑k=0
(nk
)f (x)xk (1− x)n−k
and so by the triangle inequality
| f (x)− pn (x)| ≤n
∑k=0
(nk
)∣∣∣∣ f ( kn
)− f (x)
∣∣∣∣xk (1− x)n−k
At this point you break the sum into two pieces, those values of k such that k/n is close tox and those values for k such that k/n is not so close to x. Thus
| f (x)− pn (x)| ≤ ∑|x−(k/n)|<δ
(nk
)∣∣∣∣ f ( kn
)− f (x)
∣∣∣∣xk (1− x)n−k
+ ∑|x−(k/n)|≥δ
(nk
)∣∣∣∣ f ( kn
)− f (x)
∣∣∣∣xk (1− x)n−k (6.6)
where δ is a positive number chosen in an auspicious manner about to be described. Sincef is continuous on [0,1] , it follows from Theorems 4.8.2 and 6.7.2 that f is uniformlycontinuous. Therefore, letting ε > 0, there exists δ > 0 such that if |x− y| < δ , then| f (x)− f (y)| < ε/2. This is the auspicious choice for δ . Also, by Lemma 6.3.2 | f (x)|for x ∈ [0,1] is bounded by some number M. Thus 6.6 implies that for x ∈ [0,1] ,
| f (x)− pn (x)| ≤ ∑|x−(k/n)|<δ
(nk
)ε
2xk (1− x)n−k +2M ∑
|nx−k|≥nδ
(nk
)xk (1− x)n−k
≤ ε
2+2M ∑
|nx−k|≥nδ
(nk
)(k−nx)2
n2δ2 xk (1− x)n−k
≤ ε
2+
2M
n2δ2
n
∑k=0
(nk
)(k−nx)2 xk (1− x)n−k
Now by Lemma 6.10.1 there is an estimate for the last sum. Using this estimate yields forall x ∈ [0,1] ,
| f (x)− pn (x)| ≤ε
2+
2M
n2δ2
n4=
ε
2+
M
2nδ2 .
Therefore, whenever n is sufficiently large that M2nδ
2 < ε
2 ,it follows that for all n this largeand x ∈ [0,1] ,
| f (x)− pn (x)|<ε
2+
ε
2= ε.
Now this theorem has been done, it is easy to extend to continuous functions definedon [a,b]. This yields the celebrated Weierstrass approximation theorem. Also note that thiswould hold just as well if the functions had values inC or evenCn provided you had a normdefined on Cn. In fact, it would hold if the functions have values in any normed space, avector space which has a norm. These Bernstein polynomials are very remarkable.