Possible Duplicate:
Weierstrass approximation does not hold on the entire Real Line
If a function $f: \mathbb{R}\rightarrow \mathbb{R}$ is continuous then $f$ can be uniformly approximated by smooth functions (see here). By the Weierstrass approximation theorem $f$ can be uniformly approximated by polynomials on each compact subinterval of $\mathbb{R}$.
What is example of continuous function $f: \mathbb{R}\rightarrow \mathbb{R}$ which cannot be uniformly approximated by polynomials on the whole $\mathbb{R}$?
Thanks