Theorem.

The set of polynomials is dense in , i.e. for any continuous and any , there exists a polynomial such that for all .

Remark.

Proving this theorem with just the tools of analysis is possible, but quite cumbersome. Borrowing some ideas from probability makes the proof much simpler and provides better motivations for the seemingly arbitrary tools used.

Proof.

Let be some arbitrary continuous function. We start by observing that because is continuous function on a compact domain, it must be uniformly continuous (Continuous on compact domain implies uniformly continuous). Recall that is uniformly continuous if for all , there exists a universal such that for any two points in of distance less than , their images are of distance less than , i.e.

Uniform continuity is one of the main engines of the proof.

The first tool we borrow from probability is the binomial random variable. Let where is some arbitrary real number in . Recall that , , , and that Chebyshev’s Inequality states that

Chebyshev’s Inequality is the second tool we borrow from probability and is the other main engine of the proof.

Let us define the following polynomial (a.k.a. the Bernstein polynomial):

Clearly this is in fact a polynomial with respect to . We will show that for all , there exists large enough such that for all , .

We proceed by examining :

where we used the fact that (since probabilities are normalized). Then,

and by applications of the Triangle Inequality,

In order to use our two inequalities (one from uniform continuity and the other from Chebyshev), we split the sum into two. We do this by splitting the indices into two sets based on some parameter that we will set later:

and

Then, by the triangle inequality,

We will bound both terms above by .

For the first term, we leverage uniform continuity. We know that given , there exists such that for any and any (which means ), . We will set our parameter to the obtained here. Then,

where we used the fact that .

For the second term, we will leverage Chebyshev’s Inequality. We first observe that since is continuous on a compact domain, it will have a compact image. This means its image will be bounded, i.e. there exists such that for all , . Thus,

We then observe that . This is because is exactly the set of elements in the sample space such that . If , then . So, by Chebyshev,

Observe that as . So, for large enough , is true such that

We have successfully bounded both terms we had set out to bound. Thus, we have obtained our desired bound:

References: Koralov, L.; Sinai, Y. (2007). ""Probabilistic proof of the Weierstrass theorem"". Theory of probability and random processes (2nd ed.). Springer. p. 29.