----
> [!theorem] Theorem. ([[when are smooth functions with compact support dense in Lp?]])
> Let $\Omega$ be a [[bounded set|bounded]] open subset of $\mathbb{R}^{n}$. Then:
>- For $1 \leq p < \infty$, the [[vector space|space]] $C^{\infty}_{c}(\Omega)$ of [[continuously differentiable|smooth]] [[compact|compactly]] [[support|supported]] functions is [[dense]] in $L^{p}(\Omega)$
>- $C_{c}^{\infty}(\Omega)$ is *not* [[dense]] in $L^{\infty}(\Omega)$.
^theorem
> [!proof]- Proof. ([[smooth]])
> We will show that for all $f \in L^{p}(\Omega)$ there exists a sequence smooth functions $\Omega \to \mathbb{R}$ [[converge|converging]] to $f$, and that in fact these functions can be taken to have [[compact]] [[support]].
>
> Shave off the [[boundary]] of $\Omega$ by [[distance from point to set|defining]] $\Omega_{k}:= \left\{ x \in \Omega: \text{dist}(x, \text{Bd }\Omega) > \frac{1}{k} \right\}, \ \ f_{k}:=f \chi_{\Omega_{k}}.$
> Note that $\text{supp }f_{k}=\overline{\{ x \in X: f_{k}(x) \neq 0 \}}$ is [[closed set|closed]] by construction, and is [[bounded set|bounded]],[^1] hence is [[compact]] by [[Heine-Borel theorem|Heine-Borel]].
>
>
> ![[Pasted image 20251025123411.png|300]]
>
>
> The strategy is to:
> 1. Show that each $f_{k}$ can be approximated by elements of $C^{\infty}_{c}(\Omega)$;
> 2. Show $(f_{k})\to f$.
>
> The result then follows from [[norm|the two-epsilon trick for normed spaces]].
>
> **1.** Let $\varrho_{\varepsilon} \in C^{\infty}_{c}(\mathbb{R}^{n})$ be a [[bump function]] supported on $B_{\varepsilon}(0)$ and satisfying $\int _{\mathbb{R}^{n}} \varrho=1$. Extending each $f_{k}$ by zero to a function $\hat{f}_{k}:\mathbb{R}^{n} \to \mathbb{R}$. Then $h_{\varepsilon, k}=\varrho_{\varepsilon} * \hat{f}_{k}:\mathbb{R}^{n} \to \mathbb{R}$ is [[continuously differentiable|smooth]] because $\varrho$ is smooth (cf. Lemma 1.5.5.). Moreover, $\text{supp } \varrho_{\varepsilon} * \hat{f}_{k} \subset \underbrace{ \text{supp }\varrho_{\varepsilon} }_{ B_{\varepsilon}(0) } + \text{supp }\hat{f}_{k} \subset \left\{ x: \text{dist}(x, \text{Bd }\Omega) \geq \frac{1}{k}-\varepsilon \right\}.$
> For $0<\varepsilon <1/k$, this set lives in $\Omega$. $\Omega$ is bounded, hence so is $\text{supp }h_{\varepsilon, k}$; [[Heine-Borel theorem|Heine-Borel]] then lets us restrict to $h_{\varepsilon, k} \in C^{\infty}_{c}(\Omega)$. Now Theorem 1.5.7 applies to yield, for each $k$, a [[sequence]] $(h_{m}) \to f_{k}$ of elements in $C_{c}^{\infty}(\Omega)$.
>
>
> **2.** We have $\|f-f_{k}\|_{p}= \int _{\Omega} |f - f \chi_{\Omega_{k}}|^{p}=\int _{\Omega} |f|^{p} \chi_{\Omega_{k}^{c}} .$
> Since $\Omega_{k} \uparrow \Omega$, $1_{\Omega_{k}^{c}} \downarrow 0$ [[pointwise converge|pointwise]]. Now the [[Dominated Convergence Theorem]] with majorant $|f|^{p}<inf$ gives $\lim_{k \to \infty} \|f-f_{k}\|_{p}=0$, as required.
>
>
>
> The result now follows from the lemma below:
> ![[CleanShot 2025-10-25 at
[email protected]]]
>
>
> [[limit of good kernels approximates the convolution identity, given continuity]]
----
####
[^1]: To see boundedness: by definition of $f_{k}$, $\{ x \in \Omega: f_{k}(x) \neq 0 \} \subset \Omega_{k}$. Taking [[closure|closures]], we get $\text{supp }f_{k} \subset \overline{\Omega_k}$ . Now, if $x \in \overline{\Omega_{k}}$ then by [[the sequence lemma]] there exists a [[sequence]] $(x_{j}) \subset \Omega_{k}$ with $(x_{j}) \to x$. Since $\text{dist}(x_{j}, \text{Bd }\Omega)> \frac{1}{k}$ for all $j \in \mathbb{N}$, $\text{dist}(x, \text{Bd }\Omega) \geq \frac{1}{k}$. Thus $B_{r}(x) \cap \text{Bd }\Omega=\emptyset$, where $r=\frac{1}{k+59}$, [[closure is interior together with boundary|that is]], $B_{r}(x) \cap (\overline{\Omega}-\Omega)=\emptyset$. This means either $B_{r}(x) \subset \Omega$, or $B_{r}(x) \cap \overline{\Omega} = \emptyset$. Of course, since $\overline{\Omega_{k}} \subset \overline{\Omega}$, $x \in \overline{\Omega}$. So $B_r(x) \subset \Omega$, meaning $x \in \Omega$. We conclude that $\text{supp }f_{k} \subset {\Omega}$; since the latter is bounded, so too is the former. (That took way too much talking, I definitely missed an easier justification.)
> [!proof]- Proof. ([[when are smooth functions with compact support dense in Lp?]])
> ~
----
####
-----
#### References
> [!backlink]
> ```dataview
> TABLE rows.file.link as "Further Reading"
> FROM [[]]
> FLATTEN file.tags as Tag
> WHERE Tag = "#definition" OR Tag = "#theorem" OR Tag = "#MOC" OR Tag = "#proposition" OR Tag = "#axiom"
> GROUP BY Tag
> ```
> [!frontlink]
> ```dataview
> TABLE rows.file.link as "Further Reading"
> FROM outgoing([[]])
> FLATTEN file.tags as Tag
> WHERE Tag = "#definition" OR Tag = "#theorem" OR Tag = "#MOC" OR Tag = "#proposition" OR Tag = "#axiom"
> GROUP BY Tag
> ```