Let $X$ be the closed subspace of Schwartz space $\mathcal{S}(\mathbb{R}^N)$ defined by


\begin{equation\*}
X=\left\{f\in\mathcal{S}(\mathbb{R}^N):\quad \int f\; dx=0\right\}.
\end{equation\*}


My question: Is $C\_0^\infty(\mathbb{R}^N)\cap X$ dense in $X$, w.r.t. to the topology of $\mathcal{S}(\mathbb{R}^N)$?




---


Note that the usual way to approximate Schwartz functions by $C\_0^\infty$-functions does not yield this, at least not directly: 


Take $\eta\_k$ to be radial functions on $[0,k]$ which decrease smoothly to zero on $[k,k+1]$. Then, for any Schwartz function $f$, we have $\eta\_k f\rightarrow f$ in the topology of $\mathcal{S}(\mathbb{R}^N)$ and of course $\eta\_k f\in C\_0^\infty(\mathbb{R}^N)$. However, using the Fourier transform, 


\begin{equation\*}
 \int \eta\_k f \;dx= \widehat{\eta\_k f}(0)=(\hat{\eta}\_k \* \hat{f})(0).
\end{equation\*}


Now, a weak version of the uncertainty principle tells us that $\hat{\eta}\_k$ cannot have compact support. Thus, even if $\hat{f}$ vanishes in an entire neighborhood around zero (which is actually the case I'm interested in), the convolution with $\hat{\eta}\_k$ will generally ``smear out'' $\hat{f}$ so that $(\hat{\eta}\_k \* \hat{f})(0)\neq 0$, which means $\eta\_kf\notin X$.



Can I approximate Schwartz functions which integrate to zero by $C_0^\infty$ functions which integrate to zero?
Yes. Your approximations (or any other reasonable method) will have small integrals $\epsilon\_k=\int \eta\_k f = O(k^{-N})$ for all $N$, so you can fix this by adding $-\epsilon\_k \varphi(x)$, $\varphi\in C\_0^{\infty}$, $\int\varphi = 1$.


