Are compactly supported smooth functions dense in continuous functions? Let $\Omega\subset \Bbb R^N$ be open(or a domain if needed). Is it true that $C^{\infty}_c(\Omega)$ is dense in $C^0(\Omega)$?
Actually, I'm always confused about some sets(especially $C^{\infty}_c$) are dense in other sets. Can there be a easy explanation or insight?
 A: It is not true in general, indeed if $\Omega = \mathbb{R}^N$ then the constant function $1$ cannot be approximated by compactly supported functions. Indeed, for each such $\varphi$, we would have $$\|1 - \varphi\|_{\infty} \ge 1.$$
Expanding on Silvia's comment:


*

*By mollification it is possible to show that if $f \in C^0(\Omega)$ then $f_{\epsilon}$, the convolution of $f$ with the standard mollifier, converges uniformly to $f$ on compact subsets of $\Omega$.

*It is well know that $C^{\infty}_c$ is dense in $L^p$ for $1 \le p < \infty$: indeed by Lusin's Theorem one can show that $C_c \subset L^p$ is a dense subset and then by mollification you can show that $C^{\infty}_c$ is dense in $C_c$ and hence in $L^p$.

*$C^{\infty}_c$ is NOT dense in $L^{\infty}$ (the a.e. uniform limit of continuous functions must be continuous a.e.).

A: There is a version of the Stone-Weierstrass theorem which says says that any subalgebra of the continuous functions which vanish at infinity on a locally compact domain is dense if it separates points and is nowhere zero. The smooth functions of compact support do separate points and are nowhere zero, hence they are dense in this space. Of course functions that vanish at infinity are not equal to the algebra of all continuous functions if your domain is not compact
