# 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?

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.$$
• 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.).