# Real Analysis Question related to weierstrass approximation theorem

Let $$f(x)= \begin{cases} \sin(1/x) & x \ne 0 \\ 0 & x = 0 \end{cases}$$ Prove that for any $\epsilon>0$ there exists a polynomial $p(x)$ such that $$\int_0^1 |f(x) - p(x)| \, dx \lt \epsilon.$$

• What is epsilon, what is p(x), what have you done so far, what's your effort and/or insights...?? Dec 8, 2013 at 6:51
• Oh, and write mathematics in this site with using LaTeX, otherwise it's easy to misunderstand what you write. Dec 8, 2013 at 6:51
• trigometric polynomial?
– Haha
Dec 8, 2013 at 7:04
• Are you familiar with Weierstrass approximation theorem? Dec 8, 2013 at 7:16
• @lola: Your function is not continuous at $0$. Dec 8, 2013 at 7:45

Hint: Everything happens on $[0,1]$ and the function $f$ is continuous except at $0$ hence one can consider the functions $f_n:[0,1]\to\mathbb R$ defined by $f_n(x)=f(x)$ if $x\geqslant1/n$ and $f_n(x)=f(1/n)$ if $x\leqslant1/n$. These are continuous hence Weierstrass gives some polynomials $p_n$ such that $\|f_n-p_n\|_\infty\leqslant1/n$.
Can you estimate $\int\limits_0^1|f-p_n|$? You might want to decompose the integral into $\int\limits_0^{1/n}+\int\limits_{1/n}^1$ and to bound each part separately...