TITLE: Motivation of Weierstrass-approximation Theorem?
QUESTION [10 upvotes]: Weierstrass Theorem (Classical):
If $f$ is a continuous real or complex function on $[a,b]$, there exists a sequence of polynomials $P_n$ such thay $\lim_{n\to \infty} P_n(x)=f(x)$.

The proof i know (using Berstein Polynomials) is easy but really artificial. I don't see any motivation and how and where ideas come in.
What are motivations for this proof?
And is weierstrass' original proof not constructive?

REPLY [3 votes]: Fix an interval $[a,b]$. A slightly famous problem asks to find the Riemann integrable $f$ over $[a,b]$ such that $$\int_a^b x^n f(x)dx=0$$ for each $n=0,1,2,\ldots$ implies that $f$ vanishes identically. The Weierstrass Approximation Theorem gives a positive answer: continuous functions are in such collection. The Weierstrass Approximation Theorem is also used to prove the Stone--Kakutani theorem, which in turn gives the famous Stone Weierstrass theorem, a generalization of Weierstrass' theorem.
As a personal comment, I don't think the proof using Berstein polynomials is "artificial" ---on the contrary, I think it quite sweet and interesting, and is certainly motivated from a probabilistic point of view. The proof indeed has a probabilistic flavour, and is relatively simple in comparison to other proofs, and more memorable.