# dense subspaces in Hilbert spaces

So far I know, the Schwartz space $S(\mathbb{R}^n)$ is dense in $L^2(\mathbb{R}^n)$ with respect to the usual $\lVert \cdot \rVert_{L^2}$-norm, i.e., for every function $f \in L^2(\mathbb{R}^n)$ there is a sequence $(\varphi_n)$ such that $\lim_{n \to \infty} \lVert \varphi_n - f \rVert_{L^2} \rightarrow 0$. The first Sobolev space $H^1(\mathbb{R}^n)$ is a subspace of $L^2(\mathbb{R}^n)$ and can be made into a Hilbert space via the scalar product $\langle g,f \rangle_{H^1} = \langle g,f \rangle_{L^2} + \intop_{\mathbb{R}^n}\overline{\nabla g} \cdot \nabla f dx^n$. So, my question is if $S(\mathbb{R}^n)$ is also dense in $H^1(\mathbb{R}^n)$ with respect to the $\lVert \cdot \rVert_{H^1}$-norm. With respect to the $\lVert \cdot \rVert_{L^2}$-norm the answer is yes and this is trivial, but my problem is that the $\lVert \cdot \rVert_{H^1}$-norm is always bigger or equal than the $\lVert \cdot \rVert_{L^2}$-norm.

-

Yes. As to how to prove it: first ask yourself how you manage to show that $\mathcal{S}\subsetneq L^2$ is dense. Generally I construct the sequence $\varphi_n$ by

$$\varphi_n = \eta_n \ast (\chi_n f)$$

where $\chi_n$ is a smooth bump function supported on the ball of radius $2n$ and equal to 1 inside the ball of radius $n$, $\ast$ is convolution, and $\eta_n$ is an approximation to the identity (aka mollifier). It then is a routine computation that $\varphi_n \to f$ in $L^2$.

For a suitable family of mollifiers $\eta_n$ and cutoff functions $\chi_n$ (for example, defined via scaling from two given smooth bump functions $\eta$ and $\chi$), the same computation shows that for $f$ in any Sobolev space $W^{k,p}$, you have that $\varphi_n \to f$ with respect to the $W^{k,p}$ norm. To see the computations carried out, you may consider looking at Section 5.3 of Evans' Partial Differential Equations. (In fact, you easily compute that mollifiers commute with derivatives, so we have

$$\nabla \varphi_n = \eta_n\ast \left( \chi_n\nabla f + f\nabla\chi_n\right)$$

and using that $f\nabla\chi_n \to 0$ (if you define $\chi_n$ by scaling as indicated above), we have that $\nabla\varphi_n \approx \eta_n\ast\chi_n\nabla f \to \nabla f$.)

-