proof of Weierstrass approximation theorem


To simplify the notation, assume that the function is defined on the interval [0,1]. This involves no loss of generality because if f is defined on some other interval, one can make a linear change of variable which maps the domain of f to [0,1].

The case f(x)=1-1-x

Let us start by demonstrating a few special cases of the theorem, starting with the case f(x)=1-1-x. In this case, we can use the ancient Babylonian method of computing square roots to construct polynomialPlanetmathPlanetmath approximations. Define the polynomials P0,P1,P2, recursively as

P0(x)=0
Pn+1(x)=12(Pn(x)2+x)

It is an obvious consequence of this definition that, if 0x1 then 0Pn(x)1 for all n. It is equally obvious that each Pn is a monotonically increasing function on the interval [0,1]. By subtracting the recursion from itself, cancelling, and factoring, we obtain the relation

Pn+2(x)-Pn+1(x)=12(Pn+1(x)+Pn(x))(Pn+1(x)-Pn(x))

From this relation, we conclude that Pn+1(x)Pn(x) for all n and all x in [0,1]. This implies that limnPn(x) exists for all x in [0,1]. Taking the limit of both sides of the recursion that defines Pn and simplifying, one sees that limnPn(x)=1-1-x. The relation also implies that Pn+1(x)-Pn(x) is also a monotonically increasing function of x in the interval [0,1] for all n. Therefore,

Pn+1(x)-Pn(x)Pn+1(1)-Pn(1)

Summing over n and cancelling, one sees that

Pm(x)-Pn(x)Pm(1)-Pn(1)

whenever m>n. Taking the limit as m approaches infinity, one concludes that

1-1-x-Pn(x)1-Pn(1)

Since the Pn’s converge, for any ϵ>0, there exists an n such that 1-Pn(1)<ϵ. For this value of n, |f(x)-Pn(x)|<ϵ, so the Weierstrass approximation theoremMathworldPlanetmath holds in this case.

The case f(x)=|x-c|

Next consider the special case f(x)=|x-c|, where 0c1. A little algebra shows that

(x-c)2+ϵ2/4-|x-c|ϵ/2

By the case of the approximation theorem already proven, there exists a polynomial P such that

|(x-c)2+ϵ2/4-P(x)|<ϵ/2

when x[0,1]. Combining the last two inequalitiesMathworldPlanetmath and applying the triangle inequalityMathworldMathworldPlanetmathPlanetmath, one sees that |f(x)-P(x)|<ϵ, so the Weierstrass approximation theorem holds in the case f(x)=|x-c|.

The case of piecewise linear functions

A corollary of the result just proven is the Weierstrass appriximation theorem for piecewise linear functions. Any piecewise linear function ϕ can be expressed as

ϕ(x)=b+m=0Nam|x-cm|

for suitable constants a0,,aN,b,c0,,cN. By the result just proven, there exist polynomials P0,,PN such that

|am|x-cm|-Pm|<ϵ/N

By the triangle inequality,

|ϕ(x)-b-m=0NPm|<ϵ

The general proof

Having succeeded in proving all these special cases, we now have the courage to attack the general theorem. In light of the case just proven, it suffices to show that if f is continuousMathworldPlanetmath on [0,1] then for all ϵ>0 there exists a piecewise-linear function ϕ such that for all x in [0,1], |f(x)-ϕ(x)|<ϵ/2. For, if such a function exists, then there also exists a polynomial P such that |ϕ(x)-P(x)|<ϵ/2, but then |f(x)-P(x)|<ϵ.

Since the interval [0,1] is compactPlanetmathPlanetmath, f is uniformly continuousPlanetmathPlanetmath. Hence, for all ϵ>0 there exists an integer N such that |f(x)-f(y)|<ϵ/2 whenever |x-y|1/N.

Define ϕ by the following two conditions: If m is an integer between 0 and N, ϕ(m/N)=f(m/N). On any interval [m/N,(m+1)/N], ϕ is linear.

For every point x in the interval [0,1], there exists an integer m such that x lies in the subinterval [m/N,(m+1)/M. Since a linear function is boundedPlanetmathPlanetmathPlanetmath by its values at the endpoints, ϕ(x) lies between ϕ(m/N)=f(m/N) and ϕ((m+1)/N)=f((m+1)/N). Since |f(m/N)-f((m+1)/N)|ϵ/2, it follows that |f(m/N)-ϕ(x)|ϵ/2. Because |x-m/N|1/N, it is also true that |f(m/N)-f(x)|ϵ/2. Hence, by the triangle inequality, |f(x)-ϕ(x)|<ϵ.

Title proof of Weierstrass approximation theorem
Canonical name ProofOfWeierstrassApproximationTheorem
Date of creation 2013-03-22 14:34:58
Last modified on 2013-03-22 14:34:58
Owner rspuzio (6075)
Last modified by rspuzio (6075)
Numerical id 9
Author rspuzio (6075)
Entry type Proof
Classification msc 41A10