# Stone Weierstrass on noncompact subset

I would like to ask whether we can create a function $f:\mathbb{R}\rightarrow\mathbb{R}$ which is continuous on $\mathbb{R}$ but $f$ is not the pointwise limit of any sequence of polynomial function $\{p_n(x)\}_{n\in\mathbb{N}}$.

Thank you for all helping.

-

By Stone-Weierstass applied to $f$ restricted to interval $[-n,n]$ there is a polynomial $p_n$ such that $\sup_{x\in [-n,n]} |f(x)-p_n(x)|< \frac{1}{n}$. The sequence $(p_n)$ converges pointwise to $f$.

On the other hand, there is no sequence of polynomials converging uniformly to $f(x)=\sin x$, since polynomials are unbounded or constant.

-
Thank you for your nice solution. –  blindman Oct 18 '12 at 10:54
If $\epsilon:\Bbb R\to (0,\infty)$ is an arbitrary continuous and positive function, then for each continuous $f:\Bbb R\to \Bbb C$ there is an entire function $h:\Bbb C\to \Bbb C$ such that$$|h(x)-f(x)|<\epsilon(x)$$ for all $x\in \Bbb R$.
That $h$ is entire means that it can be written as a power series $h(z)=\sum_{n=0}^\infty a_n z^n$ which converges uniformly on compact subsets of $\Bbb C$. The function $\epsilon(x)$ may of course be constant, but it can also $\to 0$ as fast as desired as $|x|\to\infty$. So this result is stronger than uniform approximation on a noncompact set!