# Show smooth functions of compact support are dense in the Schwartz space

Show $\mathcal{D}=C_c^\infty(\mathbb R^n)$ is dense in the Schwartz space $\mathcal{S}(\mathbb R^n)$. Use the standard topology on $\mathcal{S}$ $$\|f\|_{a,b}=\sup_{x \in \Bbb{R}^n}\left| x^a\partial^bf \right|$$ with $a,b\in\Bbb{Z}_+^n$.

This post highligths the proof: Let $g \in \mathcal{S}$, there is a sequence $\{f_n\} \subset \mathcal{D}$ for which $$f_n\ast g \to g \quad \text{in} \quad L^1(\Bbb R^n).$$ Hence, there is a subsequence $\{h_n\}$ of $\{f_n\}$ for which $$h_n \ast g \to g \quad \text{a.e.}$$ How to show $$\|h_n\ast g -g \|_{a,b} \to 0 \quad \text{for any} \quad a,b?$$

-
The proposed proof cannot work because $f_n * g$ is in general not an element of $\mathcal{D}$ even if $f_n \in \mathcal{D}$. It is also different with the proof you linked. – Sangchul Lee Nov 5 '12 at 15:38
Yes, I didn't use convolution in the link. – Davide Giraudo Nov 5 '12 at 15:58

Let $f_k(x):=\phi(x/k)f(x)$, where $\phi\in \cal D$ is such that $\phi(x)=1$ if $|x|\leqslant 1$. We have $f_k\in\cal D$, and what we have to show is that $f_k\to f$ for the topology induced by the semi-norms. This means that we need to show that for all $a,b\in\Bbb Z_+^n$, $$\tag{1}\sup_{x\in\Bbb R^n}|x^a\partial^bf_k(x)-x^a\partial^bf(x)|\to 0.$$ We have, using Leibniz formula, \begin{align} \partial^bf_k(x)&=\sum_{c\leqslant b}k^{c-b}\binom bc\partial^cf(x)\partial^{b-c}\phi(x/k)\\ &=\sum_{c\leqslant b,c\neq b}k^{c-b}\binom bc\partial^cf(x)\partial^{b-c}\phi(x/k)+\partial^bf(x). \end{align} This gives \begin{align} |x^a\partial^bf_k(x)-x^a\partial^bf(x)|&\leqslant \left|x^a\sum_{c\leqslant b;|b-c|\geqslant 1}k^{c-b}\binom bc\partial^cf(x)\partial^{b-c}\phi(x/k)\right|\\ &\leqslant \frac 1k\max_{|\alpha|\leqslant d}\sup_{t\in\Bbb R^n}|\partial^d(t)|\cdot\sum_{c\leqslant b;|b-c|\geqslant 1}\lVert f\rVert_{a,c}, \end{align} and $(1)$ follows.
I was looking for a proof of this fact on my own and followed a similar way as yours. However, I cannot get rid of the factor $\phi(x/k)\partial^{b}f(x)$. It is not equal to $\partial^{b}f(x)$ as you wrote since for $x:\vert x\vert >1$, there are some $x$ for which this does not hold. Hence, $\vert x^{\gamma}\partial^{b}f(x)(1-\phi(x/k))\vert$ does not cancel out independently of $k$. We can get rid of this by considering $\sup\vert f+g\vert\le\sup\vert f\vert + \sup\vert g\vert$ and $g=x^{\gamma}\partial^{b}f(x)(1-\phi(x/k))$ converges to $0$ as $k\to\infty$. – MoebiusCorzer May 24 at 17:56