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!


Let me collect all the comments into a single answer.

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.