# Construct a dense family in $W^{2,2}(\Omega)\cap W^{1,2}_0(\Omega)$ based on distance functions

Let $$\Omega$$ be a sufficiently regular domain, for example $$\Omega=B(0,r)$$, $$r>0$$, and $$m(x)=\textrm{dist}(x,\partial \Omega)$$ be the distance to boundary function.

Suppose $$\mathcal{F}$$ is a given family of smooth functions, which is dense in $$C^m(\bar\Omega)$$ (with corresponding $$m$$-th order sup-norms) for arbitrary $$m$$. Is it possible to explicitly construct another family $$\mathcal{G}$$ of functions based on $$\mathcal{F}$$ and the function $$m(x)=\textrm{dist}(x,\partial \Omega)$$, such that $$\mathcal{G}$$ is dense in $$W^{2,2}(\Omega) \cap W^{1,2}_0(\Omega)$$ (i.e., any function $$g\in \mathcal{G}$$ satisfies that $$g|_{\partial \Omega}=0$$)?

A natural candidate is the set $$\mathcal{G}=\{ mf\mid f\in \mathcal{F}\},$$ where I directly multiply the function $$f$$ by the distance function. Since $$\Omega$$ has a sufficient regular boundary, the function $$m$$ is sufficiently smooth, hence for any $$f\in C^{2}(\bar{\Omega})$$, $$mf\in C^2(\bar{\Omega})\cap C_0(\bar{\Omega})$$. I also know $$C^{2}(\bar{\Omega})\cap C_0(\bar{\Omega})$$ is dense in $$W^{2,2}(\Omega) \cap W^{1,2}_0(\Omega)$$ (in $$W^{2,2}$$ norm). But I was not able to proceed further to show $$\mathcal{G}$$ is dense in $$C^2(\bar{\Omega})\cap C_0(\bar{\Omega})$$.

This is a partial answer (too long for a comment). The idea is to reduce to the case when the normal derivative of $$f$$ vanishes on the boundary.

In the following let us use the notation from the book Sobolev spaces by R.A. Adams. In particular, $$\|f\|_{s,p,\Omega}$$ is the norm of $$f$$ in $$W^{s,p}(\Omega)$$, let $$T= \prod_{k=0}^{s-1} W^{s-k-1/p, p}(\partial \Omega)$$ and let $$\gamma \colon W^{s,p}(\Omega) \to T$$ denote the trace map, i.e. the extension from $$C_0^\infty(\mathbb{R}^n)$$ to $$W^{s,p}(\Omega)$$ of the map $$f \mapsto (\gamma_0(f),\dots, \gamma_{s-1}(f)) := (f|_{\partial \Omega}, \dots, \frac{\partial^{s-1} f}{\partial n^{s-1}}|_{\partial \Omega})$$, for more details see Section 7.52 in the cited book. In our case $$s=p=2$$. By theorem 7.53 the operator $$\gamma$$ is bounded and for any $$g\in T$$ there exists $$E(g)\in W^{s,p}(\Omega)$$ such that $$\gamma(E(g)) = g$$ and $$\|E(g)\|_{s,p,\Omega} \le C \|g\|_T$$. (All constants are denoted below with $$C$$.)

Let $$f\in W^{2,2}(\Omega) \cap W^{1,2}_0(\Omega)$$. Take $$\phi \in \mathcal{F}$$ such that $$\|f - \phi\|_{2,2,\Omega} < \epsilon$$.

Define $$\tilde \phi:=E(0,\gamma_1(\phi))$$, i.e. take a function $$\tilde\phi$$ with the same normal derivative as $$\phi$$ but zero value on $$\partial \Omega$$.

Then $$\gamma_0(f-\tilde \phi)=0$$ and $$\|\gamma_1(f-\tilde \phi)\| = \|\gamma_1(f - \phi)\| \le C \epsilon$$. Hence there exists a function $$r = E(\gamma(f-\tilde \phi))\in W^{2,2}(\Omega)$$ such that $$\gamma(r) = \gamma(f-\tilde \phi)$$ and $$\|r\| \le C \epsilon$$. Therefore $$\gamma(f - \tilde \phi - r) = (0,0)$$, that is $$f-\tilde \phi-r \in W^{2,2}_0(\Omega)$$. Such functions can easily be approximated by functions of the form $$\zeta \cdot \psi$$, where $$\zeta$$ is a cutoff function (0 at $$\partial \Omega$$, 1 sufficiently far from $$\partial \Omega$$) and $$\psi \in \mathcal{F}$$.

Thus we have written $$f$$ in the form $$f = \tilde \phi + \zeta \cdot \psi + \tilde r$$, with $$\tilde \phi + \zeta \cdot \psi \in W^{2,2}(\Omega)\cap W^{1,2}_0(\Omega)$$ and $$\|\tilde r\|_{2,2,\Omega}$$ is small. Therefore $$\mathcal{G} = \{\tilde \phi + \zeta\cdot \psi: \phi,\psi\in \mathcal{F}, \text{ \zeta boundary cutoff function}\}$$ where $$\tilde \phi = E(0,\gamma_1(\phi))$$.

If one were able to write $$E(0,\gamma_1(\phi))$$ explicitly using the distance to the boundary (I believe this is possible), then this construction would be more explicit.