After reading [this question](https://math.stackexchange.com/questions/3546800/countable-dense-subset-of-c-c-infty-mathbb-rn), which asked for some examples of commonly used (proper) dense subsets of $C\_0^{\infty}(\mathbb{R}^n)$ with the $L^p$-norm I wonder. What are some "well-known" examples of countable subsets of $X\subseteq C\_c^{0} \cap \mathscr{S}(\mathbb{R}^n)$ (the Schwartz space) for which


* $X$ is dense in $C\_c^{0}$ for the topology generated by the sup-norm $\sup\_{x \in \mathbb{R}^n} \|f(x)\|$
* $X$ is dense in $\mathscr{S}(\mathbb{R}^n)$ for the topology generated by the semi-norms
$
p\_{\alpha,\beta,K}(f):=\sup\_{x\in K} \|x\|^\alpha \left\| (D^{\beta} f)(x) \right\|
.
$



Known dense subset of Schwartz-like space and $C_c^{\infty}$?
I don't know about "well known" or canonical answers to this question, but it is easy to construct an $X$ that works as follows.


Using the definition of Hermite polynomials given by
$$
H\_n(x)=(-1)^n e^{x^2}\left(\frac{d}{dx}\right)^n e^{-x^2}\ ,
$$
we define the one-dimensional Hermite functions
by
$$
h\_n(x)=\pi^{-\frac{1}{4}} 2^{-\frac{n}{2}} n!^{-\frac{1}{2}} e^{-\frac{x^2}{2}} H\_n(x)
$$
and then the $d$-dimensional Hermite functions by
$$
h\_{\alpha}(x\_1,\ldots,x\_d)=h\_{\alpha\_1}(x\_1)\cdots h\_{\alpha\_d}(x\_d)
$$
for every multiindex $\alpha$.
These functions form an orthonormal basis for the Hilbert space $L^2(\mathbb{R}^d)$ as well as as an unconditional Schauder basis of Schwartz space $\mathscr{S}(\mathbb{R}^d)$.
Clearly, finite linear combinations of the $h\_{\alpha}$ with rational coefficients is a countable dense subset of $\mathscr{S}(\mathbb{R}^d)$. To simultaneously satisfy the other condition one can pick a smooth cutoff function $\rho:\mathbb{R}^d\rightarrow [0,1]$, constant equal to $1$ on the ball $B(0,1)$ and equal to zero outside the ball $B(0,2)$. Now take previous linear combinations and multiply them by $x\mapsto \rho(\frac{1}{k}x)$, for $k=1,2,\ldots$ This will give a set $X$ that fulfills the two requirements.


