# If $\mu$ has a density with respect to the Lebesgue measure, is $C_c(\mathbb R)$ dense in $L^p(\mu)$?

Let $$\mu$$ be a probability measure on $$(\mathbb R,\mathcal B(\mathbb R))$$.

Is $$C_c^\infty(\mathbb R)$$ dense in $$L^p(\mu)$$ for all $$p\ge1$$?

Let $$\lambda$$ denote the Lebesgue measure on $$(\mathbb R,\mathcal B(\mathbb R))$$. We know that $$C_c(\mathbb R)$$ is dense in $$L^p(\lambda)$$ for all $$p\ge1$$. Since, $$C_c^\infty(\mathbb R)$$ is dense in $$C_c(\mathbb R)$$, we can conclude that $$C_c^\infty(\mathbb R)$$ is dense in $$L^p(\lambda)$$ for all $$p\ge1$$.

Now, I'm especially interested in the case where $$\mu$$ has a density $$f$$ with respect to $$\lambda$$. It would be even fine for me to assume that $$f\in C^2(\mathbb R)$$ and that $$f>0$$. Moreover, it would be sufficient for me to obtain the desired claim for $$p=2$$?

Is there any chance to use the known result for the Lebesgue measure?

• Can we assume $\mu$ is a finite measure (i.e., that $\int f <\infty$)? – David Bowman Jan 17 at 0:06
• Stone Weierstrass ? – Mustafa Said Jan 17 at 1:10
• The result will be true if $\mu$ is sigma finite by convolution. – Will M. Jan 17 at 6:43
• @DavidBowman As I wrote in the question, $\mu$ is a probability measure. So, clearly $\int f\:{\rm d}\lambda=1$. – 0xbadf00d Jan 17 at 9:49
• @WillM. $\mu$ is a probability measure. Could you provide details? – 0xbadf00d Jan 17 at 9:50

Theorem: Let $$\mu$$ be a measure on $$(\mathbb{R}^n,\mathcal{B}(\mathbb{R}^n))$$ which assigns finite measure to compact sets. Then the compactly supported smooth functions $$C_c^{\infty}(\mathbb{R}^n)$$ are dense in $$L^p(\mu)$$ for any $$p \geq 1$$.
If $$\mu$$ is a probability measure on $$(\mathbb{R}^n,\mathcal{B}(\mathbb{R}^n))$$, then the assumption that $$\mu$$ assigns finite measure to compact sets is trivially satisfied, and hence $$C_c^{\infty}(\mathbb{R}^n)$$ is dense in $$L^p(\mu)$$ for all $$p \geq 1$$.