I was told (quite often) that $C_0^\infty$ is dense in $L^p$ for all $p\in[1,\infty)$.
And I did realise there are some related results posted here. But I would like a standard proof. I have found p.7 in enter link description here
as a proof for the claim ($\mathcal{S}(\mathbb{R})$ is dense in $L^p$). However I would like the proof of a result goes before that, which is the one I asked for.
Hope anyone could provide a proof.
Thanks
Step 1: $C_0$ is dense in $L^p$. This follows from Lusin's theorem.
Step 2: $C^\infty_0$ is dense in $C_0$. This is the usual argument of convolution with a mollifier.
Step 3: If $f_n$ converges to $f$ in $C_0$ then $f_n$ converges to $f$ in $L^p$. So the $L^p$-closure of $C^\infty_0$ contains $C_0$, and the $L^p$-closure of $C_0$ is $L^p$. Thus $\overline{\overline{C^\infty_0}}=L^p$, where we take the closure in $L^p$. But $\overline{\overline{C^\infty_0}}=\overline{C^\infty_0}$, so the result follows.
I think, with some care, one can shorten this proof and instead show directly that one can can convolve an $L^p$ function with a mollifier to get a $C^\infty_0$ approximation of the $L^p$ function. But I think this proof is somewhat more technical.