# Can we approximate a $C_0(\mathbb R)$-function by $C_c^\infty(\mathbb R)$-functions?

Let $$C_0(\mathbb R)$$ denote the closure of $$C_c(\mathbb R)$$ with respect to the supremum norm.

Are we able to show that the closure of $$C_c^\infty(\mathbb R)$$ with respect to the supremum norm is $$C_0(\mathbb R)$$?

• Functions in $C_c(\mathbb R)$ can be approximated uniformly by smooth functions via mollification.
– gerw
Nov 23, 2018 at 11:50
• This is related Nov 23, 2018 at 11:55

Let $$f \in C_0(\mathbb R)$$ and $$\epsilon >0$$. There exists $$M>0$$ such that $$|f(x)| <\epsilon$$ for $$|x|>M$$. There exists a polynomial $$p$$ such that $$|f(x)-p(x)| <\epsilon$$ for $$|x| \leq M+1$$. There exists a function $$g \in C_c(\mathbb R)$$ such that $$0\leq g(x)\leq 1$$ for all $$x$$ , $$g(x)=1$$ if $$|x| \leq M$$ and $$g(x)=0$$ if $$|x| >M+\epsilon$$. Let $$h=pg$$. Then $$h \in C_c(\mathbb R)$$, $$|f(x)-p(x)g(x)|=|f(x)-p(x)|<\epsilon$$ for $$|x| \leq M$$. For $$|x| >M+\epsilon$$ we have $$|f(x)-p(x)g(x)|=|f(x)| <\epsilon$$. Finally, for $$M\leq |x| \leq M+\epsilon$$ we have $$|f(x)-p(x)g(x)|\leq \epsilon+ |p(x)-p(x)g(x)| \leq \epsilon+ |p(x)|$$ (because $$0\leq 1-g(x) \leq 1$$) and $$|p(x)|<\epsilon +|f(x)| <2\epsilon$$. Remark: I just realized that I could have replaced $$(M,M+\epsilon)$$ by $$(M,M+1)$$ but that is only a minor point).