[Math] Proving that the smooth, compactly supported functions are dense in $L^2$.

functional-analysislp-spacesmeasure-theory

I have two problems, one of which depends on the other.

(1) I want to prove, cleanly (without too much heavy-weight machinery) that, for some (see (2)) set $\Omega \subseteq \mathbb{R}^n$, the space $C^\infty_0(\Omega) := \{f\in C^\infty(\Omega)~|~\text{supp}(f) \text{ is compact in } \Omega \}$ is dense in $L^2(\Omega)$.

(2) My first question depends on the second in the following sense: what is the most general/"largest" collection of subsets $\Omega \subseteq \mathbb{R}^n$ for which $\overline{C^\infty_0(\Omega)}=L^2(\Omega)$?

My intuition for (1) is to approximate the smooth, compactly-supported functions with compactly-supported step functions. Then, since $L^2(\Omega)$ is the space of square-integrable functions, and the Lebesgue integral of a function is defined as the limit of the integrals of a sequence of step functions, for any $f \in L^2(\Omega)$ we can find such a sequence that approximates $f$ in the $L^2$-norm. Using that the compactly-supported step functions are at least $L^2$-dense in the square-integrable step functions, the claim should follow. Is my reasoning correct? Have I omitted any necessary details?

I have no real idea how to approach (2), though logically such a collection ought to include at least the collection of Lebesgue-measurable sets.

Thanks in advance! 🙂

Best Answer

My intuition for (1) is to approximate the smooth, compactly-supported functions with compactly-supported step functions.

This is backwards. You should approximate things with smooth compactly supported functions, not the other way around.

I think there is no way around using mollifiers; how else will you construct smooth functions? Here is my approach:

Let $\Omega$ be any open subset of $\mathbb R^n$. For $x\in\Omega$, let $d(x)$ be the distance from $x$ to $\partial\Omega$. Given $f\in L^2(\Omega)$, define $$f_n(x) = \begin{cases} f(x)\quad &\text{ if }\ d(x)>1/n \\ 0\quad &\text{ if }\ d(x)\le 1/n \end{cases}$$ Note that $(f_n-f)^2$ converges to $0$ pointwise, and is dominated by $f^2$. By the dominated convergence theorem, $\|f_n-f\|_{L^2}\to 0$.

Next, approximate $f_n$ by $f_n*\phi_\epsilon$, where the mollifier $\phi_\epsilon$ is supported in a ball of radius $\epsilon<1/n$. This will ensure that the convolution is both smooth and compactly supported in $\Omega$. The $L^2$ convergence of mollified functions is a standard fact.