# Schwartz class function convergence in $L^1$ and $L^2$

Let $f:\mathbb{R}\rightarrow\mathbb{R}$ be a function in both $L^1(\mathbb{R})$ and $L^2(\mathbb{R})$. I want to show that there exists a sequence of functions $g_1,g_2,\ldots$ in the Schwartz class such that both $\|g_n-f\|_1\rightarrow 0$ and $\|g_n-f\|_2\rightarrow 0$ as $n\rightarrow \infty$.

Following the suggestion given in this post, I'm looking at the function $$g_m(x) = f(x)\cdot \chi_{[-m,m]}(x)\cdot \chi_{\{ \lvert f(y)\rvert \leqslant m\}}(x),$$ where $\chi$ denotes the characteristic function. I can see that the convergence follows from the dominated convergence theorem. But why would $g_m$ be in the Schwartz class? Since there is no assumption on the differentiability of $f$, the function $g_m$ might not even have derivatives of any order, right?

• No, $g_m$ isn't in the Schwartz class. But it is bounded and has compact support, so its convolution with any function from the Schwartz class belongs to the Schwartz class. Make it a convolution with a test function, and you have a test function. – Daniel Fischer Nov 13 '13 at 20:20
• @DanielFischer Oh, I misread. So what do you mean by a "compactly supported approximation of the identity"? What is such a function? – PJ Miller Nov 13 '13 at 20:23
• Actually, now I realize that this is much more complicated than I thought. Any easier examples of such functions $g_m$ would be welcome too. – PJ Miller Nov 13 '13 at 20:29

$g_m$ is in general not even continuous. But it is bounded and has compact support, and that makes it easy to check that for any $\varphi \in C_c^\infty(\mathbb{R})$ with $\int \varphi = 1$, you have

\begin{align}(\varphi_\varepsilon \ast g_m)(x) &= \int_\mathbb{R} \frac{1}{\varepsilon}\varphi\left(\frac{z}{\varepsilon}\right) g_m(x-z)\,dz\\ &=\int_\mathbb{R} \varphi(y)g_m(x-\varepsilon y)\,dy \xrightarrow{\varepsilon\to 0} g_m\tag{1} \end{align}

both in $L^1$ and in $L^2$. The family $\left\lbrace \varphi_\varepsilon : \varepsilon > 0 \right\rbrace$, where $\varphi_\varepsilon(x) := \varepsilon^{-1}(x/\varepsilon)$, is called an approximation of the identity (because $\lim\limits_{\varepsilon\to 0} \varphi_\varepsilon \ast h = h$ for $h \in L^p$ [and other reasonable function spaces], so convolution with $\varphi_\varepsilon$ is approximately the identity operation for small $\varepsilon > 0$).

Since $g_m$ and $\varphi$ have compact support, the support of $g_m$ is contained in $[-m,m]$, and the support of $\varphi$ say is contained in $[-K,K]$, the support of $\varphi_\varepsilon\ast g_m$ is contained in $[-(m+\varepsilon K), m+\varepsilon K]$, hence compact. Writing the convolution integral in the form

$$(\varphi_\varepsilon \ast g)(x) = \frac{1}{\varepsilon}\int_\mathbb{R} \varphi\left(\frac{x-z}{\varepsilon} \right)g_m(z)\,dz,$$

the dominated convergence theorem shows that $\varphi_\varepsilon \ast g_m$ is differentiable with

$$(\varphi_\varepsilon \ast g)'(x) = \frac{1}{\varepsilon^2}\int_\mathbb{R} \varphi'\left(\frac{x-z}{\varepsilon} \right)g_m(z)\,dz,$$

and iterating the argument shows that $\varphi_\varepsilon \ast g_m \in C^\infty(\mathbb{R})$.

And thus, to obtain a sequence in $\mathscr{S}(\mathbb{R})$ converging to $f$ in both $L^1$ and $L^2$, for every $n \in\mathbb{Z}^+$, choose an $m$ such that $\lVert g_m-g\rVert_p < \frac{1}{2n}$ for $p\in \{1,2\}$, and then choose $\varepsilon$ in $(1)$ small enough that you have $\lVert (\varphi_\varepsilon \ast g_m) - g_m\rVert_p < \frac{1}{2n}$ for $p\in\{1,2\}$.

Since for all $m$ and $\varepsilon > 0$ we have $\varphi_\varepsilon \ast g_m \in C_c^\infty(\mathbb{R}) \subset \mathscr{S}(\mathbb{R})$, the so-constructed sequence converges of Schwartz functions converges to $f$ simultaneously in $L^1$ and $L^2$.

• Does your $\varphi_\varepsilon$ mean $\varphi/\varepsilon$ or something like that? Also, why is $\varphi_\varepsilon \ast g_m \in C_c^\infty(\mathbb{R})$? – PJ Miller Nov 13 '13 at 20:41
• It actually means $\varphi_\varepsilon(x) = \dfrac{1}{\varepsilon}\varphi\left(\dfrac{x}{\varepsilon}\right)$. I have reparametrised the convolution integral directly, I think I shouldn't have. Let me edit that. As for $\varphi_\varepsilon\ast g_m \in C_c^\infty(\mathbb{R})$, it's pretty direct to show that the convolution has compact support, and the dominated convergence theorem yields differentiability with $(\varphi_\varepsilon \ast g_m)' = (\varphi_\varepsilon)' \ast g_m$. As you don't yet have much experience with mollifiers, let me say a bit more about it in an edit. – Daniel Fischer Nov 13 '13 at 20:49
• Thanks Daniel. That will take some time for me to read, so let me accept your answer for now, and I'll come back later if I have anything to ask. – PJ Miller Nov 13 '13 at 21:10
• Why is it that $\int_\mathbb{R} \varphi(y)g_m(x-\varepsilon y)\,dy \xrightarrow{\varepsilon\to 0} g_m$ both in $L^1$ and in $L^2$ – PJ Miller Nov 13 '13 at 22:01
• Especially since $g_m$ is not necessarily continuous, I struggle to see why that's true. – PJ Miller Nov 13 '13 at 22:09