proof of Weierstrass approximation theorem

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

polynomial

approximations

. Define the polynomials

P

0

,

P

1

,

P

2

,

…

recursively as

P

0

⁢

(

x

)

=

0

P

n

+

1

⁢

(

x

)

=

1

2

⁢

(

P

n

⁢

(

x

)

2

+

x

)

It is an

obvious

consequence of this

definition

that, if

0

≤

x

≤

1

then

0

≤

P

n

⁢

(

x

)

≤

1

for all

n

. It is equally obvious that each

P

n

is a monotonically increasing function on the interval

[

0

,

1

]

. By subtracting the recursion from itself, cancelling, and factoring, we obtain the relation

P

n

+

2

⁢

(

x

)

-

P

n

+

1

⁢

(

x

)

=

1

2

⁢

(

P

n

+

1

⁢

(

x

)

+

P

n

⁢

(

x

)

)

⁢

(

P

n

+

1

⁢

(

x

)

-

P

n

⁢

(

x

)

)

From this relation, we conclude that

P

n

+

1

⁢

(

x

)

≥

P

n

⁢

(

x

)

for all

n

and all

x

in

[

0

,

1

]

. This implies that

lim

n

→

∞

⁡

P

n

⁢

(

x

)

exists for all

x

in

[

0

,

1

]

. Taking the limit of both sides of the recursion that defines

P

n

and simplifying, one sees that

lim

n

→

∞

⁡

P

n

⁢

(

x

)

=

1

-

1

-

x

. The relation also implies that

P

n

+

1

⁢

(

x

)

-

P

n

⁢

(

x

)

is also a monotonically increasing function of

x

in the interval

[

0

,

1

]

for all

n

. Therefore,

P

n

+

1

⁢

(

x

)

-

P

n

⁢

(

x

)

≤

P

n

+

1

⁢

(

1

)

-

P

n

⁢

(

1

)

Summing

over

n

and cancelling, one sees that

P

m

⁢

(

x

)

-

P

n

⁢

(

x

)

≤

P

m

⁢

(

1

)

-

P

n

⁢

(

1

)

whenever

m

>

n

. Taking the limit as

m

approaches

infinity

, one concludes that

1

-

1

-

x

-

P

n

⁢

(

x

)

≤

1

-

P

n

⁢

(

1

)

Since the

P

n

’s

converge

, for any

ϵ

>

0

, there exists an

n

such that

1

-

P

n

⁢

(

1

)

<

ϵ

. For this value of

n

,

|

f

⁢

(

x

)

-

P

n

⁢

(

x

)

|

<

ϵ

, so the

Weierstrass approximation theorem

holds in this case.

The case

f

⁢

(

x

)

=

|

x

-

c

|

Next consider the special case

f

⁢

(

x

)

=

|

x

-

c

|

, where

0

≤

c

≤

1

. 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

inequalities

and applying the

triangle inequality

, 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

=

0

N

a

m

⁢

|

x

-

c

m

|

for suitable constants

a

0

,

…

,

a

N

,

b

,

c

0

,

…

,

c

N

. By the result just proven, there exist polynomials

P

0

,

…

,

P

N

such that

|

a

m

|

⁢

x

-

c

m

⁢

|

-

P

m

|

<

ϵ

/

N

By the triangle inequality,

|

ϕ

⁢

(

x

)

-

b

-

∑

m

=

0

N

P

m

|

<

ϵ

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

continuous

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

compact

,

f

is

uniformly continuous

. 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

bounded

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

Generated on Fri Feb 9 21:26:48 2018 by

LaTeXML