= Solution
Because $f$ is continuous on the compact interval $[0,1]$, it is uniformly continuous and bounded; write $|f|\leq M$. Given $\epsilon>0$, choose $\delta>0$ such that
$$
|x-y|\leq\delta
\quad\Longrightarrow\quad
|f(x)-f(y)|\leq\epsilon.
$$
Then
$$
\begin{aligned}
|B_n(p)-f(p)|
&\leq
\mathbb E\left|f(S_n/n)-f(p)\right|\\
&\leq
\epsilon
+2M\mathbb P\left(\left|S_n/n-p\right|>\delta\right)\\
&\leq
\epsilon+\frac{M}{2n\delta^2}.
\end{aligned}
$$
The bound is independent of $p$. Taking the supremum, then $n\to\infty$, gives a limit superior at most $\epsilon$. Since $\epsilon$ is arbitrary,
$$
\boxed{
\sup_{p\in[0,1]}|f(p)-B_n(p)|\longrightarrow0}.
$$
This is the <Bernstein polynomial> proof of the <Weierstrass approximation theorem>.
Back to article page