# The Schwartz Class is dense in $L^p$

Is there any hint to prove that for every $$1 \le p < \infty$$ the Schwartz Class is dense in $$L^p$$?

Thanks so much.

• It might be easier to show that the compactly supported smooth functions are dense. These are contained in the Schwartz space of course. – Cameron Williams Dec 25 '15 at 20:08
• @CameronWilliams how to do that? – user115608 Dec 25 '15 at 20:16

Hint:

Step 1. For every $f\in L^p$, and every $\varepsilon>0$, there exists an $M>0$, such that $$\|\,f-\chi_{[-M,M]\,}f\|_{L^p}<\varepsilon,$$ where $\chi_A$ is the characteristic function of $A$. Set $g=\chi_{[-M,M]\,}f$.

Set 2. Let now $K_t(x)=(\pi t)^{1/2}\mathrm{e}^{-x^2/t}$, $t>0$, and define $g_t=g*K_t$. Then $$\lim_{t\searrow 0}\|g_t-g\|_{L^p}=0,$$ and $g_t\in\mathscr S$, for all $t>0$.

• thanks,but I think there are mistakes in the sign of the exponents of $K_t$,they both are negative. And then how do you say $g_t$ is a Schwartz function? – user115608 Jan 7 '16 at 18:26

Let me consider the case $1<p<\infty$.

Hint: $C_c^\infty(\mathbb{R}^n)\subset\mathcal{S}(\mathbb{R}^n)$ + Hahn-Banach Theorem + du Bois-Reymond Lemma.

Details:

Let $1<p<\infty$ and $C_c^\infty(\Omega)$ be the space of all compactly supported smooth functions $u:\Omega\subset\mathbb{R}^n\to\mathbb{R}$. Let $\phi:L^p(\Omega)\to\mathbb{R}$ be a continuous linear functional such that \begin{align}\phi(u)=0,\qquad\forall\ u\in C_c^\infty(\Omega).\tag{1}\end{align} Then, by the Riesz representation theorem, there exists $v\in L^{p'}(\Omega)$ such that \begin{align}\phi(f)=\int_\Omega fv\;dx,\quad\forall\ f\in L^p(\Omega).\tag{2}\end{align} Then, by $(1)$, \begin{align}\int_\Omega fv\;dx=\phi(f)=0,\quad\forall\ f\in C_c^\infty(\Omega).\tag{3}\end{align} By the du Bois-Reymond Lemma, it follows from $(3)$ that $v=0$ in $L^{p'}(\Omega)$. Thus, by $(2)$, \begin{align}\phi(f)=\int_\Omega f\cdot 0\;dx=0,\quad\forall\ f\in L^p(\Omega).\end{align} So, by (a corollary of) the Hahn-Banach Theorem, $C_0^\infty(\Omega)$ is dense in $L^p(\Omega)$.

The case $p=1$ (and other approach for the case $1<p<\infty$) can be found in the Brezis book.

• I don't think that this is a good answer, since proving the Du Bois Reymond Lemma is essentially as hard as proving density itself. – PhoemueX Dec 25 '15 at 22:18

Let $f$ be a continuous function with compact support. Because such functions are dense in $L^p, 1\le p <\infty,$ it's enough to show $f$ can be approximated by Schwartz functions in all of these $L^p$ spaces.

Suppose $f$ is supported in $[-a,a].$ Let $\epsilon>0.$ By Weierstrass, there is a polynomial $q$ such that $|q-f|<\epsilon$ in $[-a,a].$

Define the functions

$$\begin {cases}\varphi_n(t) = \exp (1/[n(t^2-a^2)]),& t\in (-a,a)\\ 0, & |t| \ge a\\ \end {cases}$$

Each $\varphi_n$ is positive on $(-a,a)$ with support $[-a,a].$ We also have $\varphi_n \in C^\infty(\mathbb R),$ bounded by $1$ everywhere, and $\varphi_n \to\chi_{(-a,a)}$ pointwise everywhere. Of course each $\varphi_n$ is in the Schwartz space.

Now $q\varphi_n$ extends to be in $C_c^\infty(\mathbb R)$ in the obvious way. Thus

$$\int_{\mathbb R}|q\varphi_n - f|^p = \int_{-a}^a |q\varphi_n - f|^p \le 2^{p-1}\left (\int_{-a}^a |q\varphi_n - q|^p + \int_{-a}^a |q-f|^p\right ).$$

If $n$ is large enough, the last integral is less than $2a\epsilon^p,$ and this is enough for what we want.

• how do you say continuous compact support functions are dense in $L^p$? – user115608 Jan 7 '16 at 18:30
• That's a standard result. – zhw. Jan 7 '16 at 18:36
• Should it be $2^p$ in the last inequality? – Sam Wong Feb 3 at 12:33
• @SamWong $2^9$ will work, but $2^{p-1}$ comes from convexity: $((1/2)x+(1/2)y)^p\le (1/2)x^p+(1/2)y^p.$ – zhw. Feb 3 at 17:51
• @zhw. makes sense. thanks. – Sam Wong Feb 3 at 18:08