Approximating a function as close as we wish by interpolating polynomials

45 Views Asked by At

So yesterday in lecture one of my professors gave a proof that if $f:[a,b]\to\mathbb{R}$ with $f(0)=0,$ then for all $\epsilon>0$ there exists a polynomial $p$ such that $p(0)=0$ and $\|f-p\|_{[a,b]}<\epsilon.$ The proof was rather complicated, and I think I've found a simpler one. Also, it doesn't require $f(0)=0.$ Could anyone verify if its correct? thank you.

$\textbf{Proof:}$

By Stone-Weierstrass chose polynomials $p_n$ such that $p_n\to f$ uniformly. Then we consider $p_n+(f(0)-p_n(0)).$ Let $\epsilon\geq0$ and choose $N$ large so that for all $n\geq N$ we have $\|p_n-f\|_{[a,b]}<\epsilon/2.$ It follows that $$\|f-(p_n+(f(0)-p_n(0)))\|_{[a,b]}\leq\|f-p_n\|_{[a,b]}+\|f(0)-p_n(0)\|_{[a,b]}$$ $$<\epsilon/2+\epsilon/2=\epsilon.$$ Thus $p_n+(f(0)-p_n(0))\to f$ uniformly, and $$[p_n+(f(0)-p_n(0))](0)=f(0).$$ This completes the proof. $\blacksquare$

To add, we could generalized if we replaced $(f(0)-p_n(0))$ by $$\sum_{i=1}^n(f(x_i)-p_n(x_i))\ell_i,$$ where $x_1,...,x_n$ are a set of nodes, and $\ell_i$ are Lagrange Basis Polynomials.