I've been stuck on the following problem for a some time but have it started somewhat and not sure whether it is correct or how to proceed.
Let $f$ be a continuous function on $[a,b]$. Prove that there exists a sequence of polynomials $(p_n)$ that converges uniformly to $f$ on $[a,b]$
I know that since $f$ is a continuous function on $[a,b]$, then applying the Weierstrass Approximation Theorem there exists a sequence $(p_n)$ of polynomials such that $p_n \to f$ uniformly on $[a,b]$.
Then,
Considering a sequence of polynomials $p_n$ which converges uniformly to $f$.
If we let $q_n(x)=p_n(x)+f(a)-p_n(a)$.
Then $q_n(a)=f(a)$, $q_n$ must be a polynomial and
$$ |q_n(x)-f(x)| \leq |p_n(x)-f(x)|+|f(a)-p_n(a)|$$
which proves that $q_n$ converges uniformly to $f$.
So is this enough to prove that there exists a sequence of polynomials $(p_n)$ that converges uniformly to $f$ on $[a,b]$?
Best Answer
Let $\epsilon>0.$ Once we pick our polynomials $p_n$, to prove uniform convergence we must show there is an $N$ such that $|f(x)-p_n(x)|<\epsilon$ for all $n>N$ and all $x\in[0,1].$
Consider an arbitrary integer $n$. By the Weierstrass approximation theorem (as you stated it in the comments), we can choose a polynomial $p_n$ that satisfies $|p_n(x)-f(x)| < 1/n$ for all $x\in[0,1].$ Choose $p_n$ this way for all $n.$
Now, pick an integer $N >1/\epsilon.$ Then for any $n>N,$ we have $|p_n(x)-f(x)|< \frac{1}{n}<1/N < \epsilon$ for all $x\in [0,1].$