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.
