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.

6.10. WEIERSTRASS APPROXIMATION 119Proof: By the binomial theorem,and so by the triangle inequalityro)—mnle ¥ (2) 7G) -0At 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. Thusvere SB (A) (EG) 20|x—(k/n“Eyal G) 1where 6 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 6 > 0 such that if |x—y| < 6, then|f (x) —f (y)| < €/2. This is the auspicious choice for 6. 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],xk (1 — xrxk ( —x)r*x1 —x)"* (6.6)X) = Pn(X)| S 7) Ek —2x)"* 42M 7) Cp — xyr) mois E (3 wos (0) Go4)€ n\ (k—nx)? n—-k|nx—k|>ndE 2M < n 2k n—k< ££, _ 1-< stay) (;) (k —nx)* x* (1 —x)Now by Lemma 6.10.1 there is an estimate for the last sum. Using this estimate yields forall x € [0,1],€e Mn eE M—pn(x)|<=+ =<+—s.If) = pal SS =aW624 2Therefore, whenever n is sufficiently large that st < 5 it follows that for all n this largeand x € [0, 1],@)—m@al<5+5—e 0Now 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 in C or even C” provided you had a normdefined on C”. 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.