# Why is $L^1(\mathbb{R}^n) \cap L^2(\mathbb{R}^n)$ dense in $L^2(\mathbb{R}^n)$?

In Lieb and Loss's Analysis, I saw that they mentioned $L^1(\mathbb{R}^n) \cap L^2(\mathbb{R}^n)$ dense in $L^2(\mathbb{R}^n)$ (dense wrt the $L^2$ norm, I think). But I didn't find its proof in the book. So I wonder why it is?

Does this conclusion hold for $L^1(\Omega, \mathcal{F}, \mu) \cap L^2(\Omega, \mathcal{F}, \mu)$ for any measure space $(\Omega, \mathcal{F}, \mu)$?

Are there similar statements if replace $L^1$ with $L^p$, and $L^2$ with $L^q$ for $p \leq q \in (0, \infty ]$ or $\in [1, \infty]$?

Thanks and regards!

-
Hint: Consider simple functions. –  Martin Dec 27 '12 at 18:21
The intersection contains all continuous functions with compact support, or all integrable simple functions, or... –  Mariano Suárez-Alvarez Dec 27 '12 at 18:21
The set of smooth functions with compact support is dense in either. –  copper.hat Dec 27 '12 at 18:30
@Tim, that might be a good signal that you need to review Lebesgue spaces! –  Mariano Suárez-Alvarez Dec 27 '12 at 18:35
The general version is also true, unless $q=\infty$. As an exercise, you may want to prove that $L^p(\mathbb R)\cap L^\infty (\mathbb R)$ is not dense in $L^\infty (\mathbb R)$ for any finite $p$. (Hint: consider the function $f$ that is identically $1$ and show that $\|f-g\|_{L^\infty}\le 1/2$ implies that $g$ is not integrable). –  user53153 Dec 27 '12 at 19:12

Since the space of integrable simple functions is dense in $L^p(\Omega, \mathcal{F}, \mu)$ for all $p\in[1,+\infty)$, and in addition, all simple functions are in $L^\infty(\Omega, \mathcal{F}, \mu)$, we have that $\bigcap_{1\leq p\leq\infty}L^p(\Omega, \mathcal{F}, \mu)$ is dense in $L^q(\Omega, \mathcal{F}, \mu)$ for all $q\in[1,+\infty)$.

If $q=\infty$ the answer depends on whether or not $\mu$ is finite.

• If $\mu$ is finite, then $L^\infty(\Omega, \mathcal{F}, \mu)\subseteq L^p(\Omega, \mathcal{F}, \mu)$ for each $p$, so obviously we can put $q=\infty$ above.
• If $\mu$ is infinite (like the Lebesgue measure), then any nonzero constant function is in $L^\infty$, but very far from any integrable function (since no integrable function can be bounded away from zero on a set of infinite measure).

Worth mentioning, if inessential for this exercise, is that if $\Omega,\mu$ are sufficiently well-behaved ($\Omega$ is locally compact Hausdorff, $\mu$ is inner and outer regular, locally finite), then compactly supported continuous functions are dense in each $L^p(\mu)$ with $p<\infty$. This applies in particular to Haar measures on locally compact Hausdorff groups, such as the Lebesgue measure.

-
Thanks! @tomasz: I think $L^\infty(\Omega, \mathcal{F}, \mu)\supseteq L^p(\Omega, \mathcal{F}, \mu), \forall p \in (0, \infty)$? My reason is $L^\infty$ is defined as the set of measurable functions that are bounded up to a set of measure zero, and if $f \notin L^\infty$, then there exists a subset of measure nonzero on which $|f|$ is $\infty$, so $f \notin L^p, \forall p \in (0, \infty)$. So I wonder why "If $\mu$ is finite, then $L^\infty(\Omega, \mathcal{F}, \mu)\subseteq L^p(\Omega, \mathcal{F}, \mu)$ for each $p$"? If we both are right, then If $\mu$ is finite, $L^\infty = L^p$? –  Tim Dec 28 '12 at 0:19
I posted my last comment as a new question here math.stackexchange.com/q/266213/1281 –  Tim Dec 28 '12 at 0:47
@Tim: No. For example, $\log(x)$ is in $L^p([0,1],\mathcal B,\lambda)$ for all $p<\infty$, but not in $L^\infty$. –  tomasz Dec 28 '12 at 2:52