This problem is in Stein.

In $L^p$, $1\leq p<\infty$ on $\mathbb{R}^d$ with Lebesgue measure.

(a) Continuous function with compact support are dense in $L^p$. I have already proves this :)
(b) Infinitely differentiable functions with compact support are dense in $L^p$.

How proves (b)? I read that this hard...


1 Answer 1


The argument I know depends on a few facts.

  • Consider the convolution $$(f*g)(x)=\int_{\mathbb R^d} f(t)\,g(x-t)\, dt.$$

  • One can show that if $f\in L^p$ and $g\in L^1$, then $$\|f*g\|_p\leq\|f\|_p\|g\|_1.$$ so $f*g\in L^p$.

  • If $f\in L^p$, $g\in C^r(\mathbb R^d)$ with compact support and $D$ is a mixed partial derivative of order $m$, then $$ D(f*g)(x)=(f*Dg)(x). $$ In particular, $f*g\in C^r(\mathbb R^d)$. So if $g\in C^\infty$, so does $f*g$.

  • Let $f\in L^p(\mathbb R^d)$, $g\in L^1(\mathbb R^d)$ with $\int_{\mathbb R^d} g=1$. Let $g_n(x)=n^d\,g(nx)$. Then $$\lim_{n\to\infty}\|f-f*g_n\|_p=0.$$

  • Since the compactly supported functions are dense in $L^p$, we may assume that $f$ is compactly supported. Then the functions $f*g_n$ from above are compactly supported.

  • Let $f\in L^p(\mathbb R^d)$. Take $g$ to be any compactly supported $C^\infty$ function with $\int_{\mathbb R^d} g=1$. Fix $\varepsilon>0$. There exists $f_0\in L^p(\mathbb R^d)$, with compact support, such that $\|f-f_0\|_p<\varepsilon/2$. By the above steps, we have that $f_0*g_n\in C^\infty_c(\mathbb R^d)$ and $\|f_0-f_0*g_n\|_p<\varepsilon/2$ for big enough $n$. Then $$\|f-f_0*g_n\|_p\leq\|f-f_0\|_p+\|f_0-f_0*g_n\|_p<\frac\varepsilon2+\frac\varepsilon2=\varepsilon.$$ Thus we get that $f$ is a limit of compactly supported infinitely differentiable functions.

  • Finally, it remains to construct a nonzero infinitely differentiable, compactly supported function. Start with $$h(t)=\begin{cases} e^{-1/x^2},&\ x>0\\ 0,&\ x\leq0\end{cases}$$ Then $h\in C^\infty(\mathbb R)$. Now, given any interval $[a,b]$, form $$h_{a,b}(x)=h(x-a)h(b-x).$$ Then $h_{a,b}\in C^\infty(\mathbb R)$ with support in $[a,b]$. Now given any box $B=\prod_{j=1}^d[a_j,b_j]\subset \mathbb R^d$, the function $$ g_B(x)=h_{a_1,b_1}(x_1)\cdots h_{a_d,b_d}(x_d) $$ is nonzero, non-negative, $C^\infty$, and with support in $B$.

  • $\begingroup$ I got stuck trying to prove the following... Could you help please? "Let $f\in L^p(\mathbb{R}^d), g\in L^1(\mathbb{R}^d)$ with integral 1, and $g_n(x):=n^dg(nx)$. Then $\lim ||f-f*g_n||_p=0$." $\endgroup$ Commented Mar 25, 2020 at 1:10
  • 1
    $\begingroup$ I posted the details here. $\endgroup$ Commented Mar 25, 2020 at 3:22
  • $\begingroup$ Very Clear and Helpful! Also for some who want to know more about this, you can check Folland's Real Analysis. $\endgroup$ Commented Oct 12, 2023 at 17:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .