TITLE: Any counter-example to Weierstrass-Stone Thm on non compact spaces
QUESTION [8 upvotes]: I would like to show, out of curiosity really, that Weierstrass-Stone Thm fails when the underline space is not compact. Specifically, I think that $C_b(R), $ the space of bounded continuous functions on $R $ should suffice.
To this purpose, I recall from my grad student days that $\ell^\infty $ is not separable and from it, it is not too complicated to show that, for instance, $D=\{f:[1, \infty) \mapsto C\} $ where $f $ continuous and bounded is also not separable.
At this point, the only difference with the statement of the Weierstrass-Stone Thm is that my D is not separable in $C_B(R) $ instead of dense. But, my thinking is that if I can find an algebra of functions that separates points in $C_b(R), $ then I should be in business..
Unfortunately, I cannot see how to close the argument or find an example that clearly shows that W-S. Theorem fails on non compacts. 
Any help would be appreciated.
Maurice

REPLY [7 votes]: Take $C(0,1)$ (bounded continuous functions on $(0,1)$ with the $\sup$ norm).
Let $x(t) = \sin \frac{1}{t}$, we see that $x \in C(0,1)$. Let $p$ be a polynomial. Clearly $p$ is continuous on $[0,1]$, hence $p_0 = \lim_{t \downarrow 0} p(t)$ exists. A small amount of work shows that $\|x-p\| \ge 1$.
The set of polynomials on $(0,1)$ separates points and is a subalgebra of $C(0,1)$, but clearly is not dense in $C(0,1)$.
In some sense, the problem is that a continuous function can have pretty wild behaviour if the underlying space is not compact.