We’ll show the equivalent version: there is a sequence
\(p_n\) of polynomials so that
\(p_n\rightrightarrows f\) on
\([a,b]\text{.}\)
Without loss of generality, take
\(a=0,b=1\text{.}\)
Without loss of generality, take
\(f(0)=f(1)=0\text{.}\)
We can then extend \(f\) continuously to \(g:\mathbb{R}\to\mathbb{R}\) by
\begin{equation*}
g(x)=\begin{cases}f(x)&\text{ if }x\in[0,1]\\0&\text{ otherwise}\end{cases}\ \ \ .
\end{equation*}
Observe that \(g\) defined thus is uniformly continuous on \(\mathbb{R}\text{.}\)
For each \(n\in \mathbb{N}\text{,}\) set
\begin{equation*}
\displaystyle c_n=\left[\int_{[-1,1}(1-t^2)^n\ dt \right]^{-1}
\end{equation*}
and
\begin{equation*}
q_n(t)=c_n(1-t^2)^n\ \ \ .
\end{equation*}
(We pick the constant \(c_n\) so that \(\displaystyle\int_{[-1,1]}q_n(t)\ dt=1\text{.}\))
Lemma 8.2.2.
\(c_n\leq 2\sqrt{n}\text{.}\)
Now define, for each \(n\in\mathbb{N}\text{,}\)
\begin{equation*}
\displaystyle p_n(x)=\int_{[-1,1]}g(x+t)\ q_n(t)\ dt\ \ \ .
\end{equation*}
Lemma 8.2.3.
Proof.
The idea is to consider the change of variables
\(s=x+t\text{.}\) I’ll leave the details to you.
Now we’ll show that
\(p_n\rightrightarrows f\text{.}\)
Given \(\epsilon\gt 0\text{,}\) choose \(\delta\gt 0\) so that \(\lvert x-y\rvert\lt \delta\Rightarrow \lvert f(x)-f(y)\rvert\lt \frac{\epsilon}{2}\text{.}\) Let \(M=\sup\lvert g\rvert=\sup\lvert f\rvert\text{.}\) Compute:
\begin{align*}
\left\lvert p_n(x)-f(x)\right\rvert&=\left\lvert \int_{[-1,1]}g(x+t) q_n(t)\ dt - f(x)\int_{[-1,1]}q_n(t)\ dt\right\rvert\\
&=\left\lvert \int_{[-1,1]}(g(x+t)-f(x))\ q_n(t)\ dt\right\rvert\\
&\leq \int_{[-1,1]}\left\lvert g(x+t)-f(x)\right\rvert \ q_n(t)\ dt\\
&=\int_{[-1,-\delta]}\left\lvert g(x+t)-f(x)\right\rvert\ q_n(t)\ dt + \int_{[-\delta,\delta]}\left\lvert g(x+t)-f(x)\right\rvert\ q_n(t)\ dt+\int_{[\delta,1]}\left\lvert g(x+t)-f(x)\right\rvert\ q_n(t)\ dt\\
&\leq 2Mq_n(-\delta)(1-\delta)+\frac{\epsilon}{2}\int_{[-\delta,\delta]}q_n(t)\ dt+2Mq_n(\delta)(1-\delta)\\
&\leq 4M(1-\delta^2)^n c_n+\frac{\epsilon}{2}
\end{align*}
Now by
Lemma 8.2.2, it will suffice to show that for any
\(\delta\gt 0\text{,}\)
\begin{equation*}
(1-\delta^2)^n\sqrt{n}\to 0\ \ \ .
\end{equation*}
and this you can do.