I would like to show that $C^\infty(\mathbb{R}^n)$ is dense in the space $L^2(\mathbb{R}^n, (1 + |\xi|^2)^s d \xi)$ (here, $s$ is an arbitrary element of $\mathbb{R}$).
I am familiar with the standard argument that if $\phi \in C^\infty_0(\mathbb{R}^n),$ $\int \phi = 1$, $\phi_\epsilon = \epsilon^{-n} \phi (\epsilon^{-1}( \cdot))$ and $f \in L^2(\mathbb{R}^n, d \xi)$, then each $f \ast \phi_{\epsilon} \in C^\infty$ with $f \ast \phi_{\epsilon} \to f$ in $L^2(\mathbb{R}^n, d \xi)$ as $\epsilon \to 0^+$.
I am wondering if this same style of argument can be used to prove density in $L^2(\mathbb{R}^n, (1 + |\xi|^2)^s d \xi)$? If we try to reproduce the old argument verbatim, then we run into a bit of trouble because the factor $(1 + |\xi|^2)^s$ now lies inside the integral, and it's not quite clear to me how to define convolution in the setting of this more general measure space $L^2( \mathbb{R}^n, (1 + |\xi|^2)^s d \xi)$.
Hints or solutions are greatly appreciated.
Hint. A possible approach is to use the fact that the Schwartz space $\mathcal S(\mathbb{R})$, the space of functions all of whose derivatives are rapidly decreasing, is dense in $L^2(\mathbb{R}^n, (1 + |\xi|^2)^s d \xi)$ (recall that a rapidly decreasing function is essentially a function $f(\cdot)$ such that $f'(\cdot), f''(\cdot),f'''(\cdot), \ldots ,$ all exist everywhere on $\Bbb R$ and go to zero as $x → ±∞$ faster than any inverse power of $x$) and that this space $\mathcal S(\mathbb{R})$ is a subspace of $C^\infty(\mathbb{R}^n)$, giving the desired density.
Here is a related link.