# List of proofs of Weierstrass Approximation Theorem

I am looking for different proofs of the theorem :

If $$f$$ is a continuous real-valued function on $$[a,b]$$ and if any $$\epsilon>0$$ is given, then there exists a polynomial $$p$$ on $$[a,b]$$ such that

$$|f(x)-P(x)|< \epsilon$$ for all $$x \in [a,b]$$.

Step 1: Let $$Z_n$$ be a sequence of random variables and $$c$$ a constant such that for each $$\epsilon > 0$$ it holds that $$\mathbb{P}[|Z_n −c| > \epsilon] \rightarrow 0, \ \ \text{as } n \rightarrow 0.$$ Show that for any bounded continuous function $$g,$$ $$\mathbb{E}[g(Z_n)] \rightarrow g(c) \ \ \text{as } n \rightarrow 0.$$
A hint for Step $$1$$ is to use the fact that $$g$$ is bounded and the definition of continuity.
Step 2: Let $$f(x)$$ be a continuous function in $$[0,1]$$. Consider the $$\textit{Bernstein Polynomials,}$$ defined by $$B_n(x) = \sum_{k=0}^n f \left( \frac{k}n \right) \dbinom{n}k x^k (1-x)^{n-k}.$$ Show that $$B_n \rightarrow f$$ uniformly.
A hint for Step $$2$$ is to use the weak law of large numbers.