Approximating compactly supported $L^2$ functions with Schwartz functions “from within”

approximation-theoryfunctional-analysisschwartz-space

Crossposted from MathOverflow.

It is well known that the class of Schwartz functions $\mathcal{S}$ in dense in all $L^p$ spaces therefore for each $f \in L^2$ there exists a sequence of Schwartz functions $(f_k)$ such that $\lVert f – f_k \rVert_{L^2} \to 0$ as $k \to \infty$.

If we suppose further that $f$ has compact support can we find a sequence of Schwartz functions $(f_k)$ such that $\lVert f – f_k \rVert_{L^2} \to 0$ as $k \to \infty$ (as above) and additionally $\operatorname{supp}(f_k) \subseteq \operatorname{supp}(f)$ for all $k$?

If so, what argument can I appeal to?

Best Answer

If $E$ is a compact set with positive measure and empty interior, and if $f$ is the characteristic function of $E$, then $f$ is nonzero in $L^2$ and there is no nonzero continuous function whose support is contained in the support of $f$.

To construct such a set $E$, find an enumeration of $[0,1]\cap\mathbb Q$, say $\{q_n\}_{n=1}^\infty$, and for each $n$ choose an open interval $I_n$ around $q_n$ with length $\varepsilon /2^n$.

Then $U:= \bigcup I _n$ is an open set whose measure is at most $\varepsilon$, and $$ E:= [0,1]\setminus U $$ is a compact set with empty interior and measure at least $1-\varepsilon$.

Related Question