This is a post recording my answer to a question on Math StackExchange^{1} with some references in L. Tartar’s book^{2}.

# Question

Whether the (sub)space of divergence free elements of $H_0^1(\Omega)^3$ is dense in the (sub)space of divergence free functions in $L^2(\Omega)^3$?

In this case:

- $J:= \mathrm{div}$
- $V:= H_0^1(\Omega)^3$ and $H:=L^2(\Omega)^3$
- $Q_H := L^2(\Omega)/\mathbb R$ and $Q’ = (H^1(\Omega)/\mathbb R)’$

And the question becomes:

\[\text{Show } \;\{v\in H_0^1(\Omega)^3:\text{div } v = 0 \in L^2(\Omega)/\mathbb R \} \text{ dense in } \{v \in L^2(\Omega)^3:\text{div } v = 0 \in (H^1(\Omega)/\mathbb R)' \}\]

# Proof

## A simple extension theorem for functionals

Main tool we use to prove density is the following lemma.

Suppose subspace $\mathcal{X} \subset X$, they are both Banach. Define
$$X^{\perp} = \{l\in X': \langle l,v\rangle =0 \;\forall v\in X\},$$
and
$$\mathcal{X}^{\perp} = \{l\in X': \langle l,v\rangle =0 \;\forall v\in \mathcal{X}\},$$
where $X'$ is the set of all bounded linear functional on $X$. Then we have
$$\mathcal{X} \text{ is dense in } X. \Longleftrightarrow \mathcal{X}^{\perp} = X^{\perp}.$$

Sketch of the proof: First $\mathcal{X}^{\perp} \supset X^{\perp}$ holds always. "$\Rightarrow$" is like standard exercise. For "$\Leftarrow$", we want to prove $\mathcal{X}^{\perp} \subset X^{\perp}$ implying the left: suppose the density does not hold, then we could find an open subset $Z\subset X$ so that $\overline{\mathcal{X}} \cap Z =\varnothing$. Choose $z\in Z$, we can find a non-zero bounded linear functional $g\in X'$ such that $\langle g,z\rangle \neq 0$. Consider a functional $L$ on $\overline{\mathcal{X}} + \{z\}$:
$$
\langle L,x+tz\rangle = \langle l,x\rangle + t\langle g,z\rangle, \quad \text{ for } x\in \mathcal{X}, t\in \mathbb{R}, l\in \mathcal{X}^{\perp},
$$
then we can extend $L$ to whole $X$. It can be checked that $L\in \mathcal{X}^{\perp}$, but $\langle L,z \rangle = \langle g,z \rangle\neq 0$ implies $L\notin X^{\perp}$. Thus $\mathcal{X}^{\perp} \not\subset X^{\perp}$ and the claim.

## Main result

Divergence free vector fields in $H^1$ is dense in divergence free vector fields in $L^2$.

Denote
$$
V :=H_0^1(\Omega)^3,\quad V_0 := \{v\in H_0^1(\Omega)^3:\mathrm{div}\, v = 0\},
$$
and
$$
H := L^2(\Omega)^3,\quad H_0 := \{v \in L^2(\Omega)^3:\mathrm{div}\, v = 0 \},
$$
then what you wanted to show is:
$$V_0 \text{ is dense in } H_0. \tag{A}$$
We can prove this using above claim. Define
$$
H(\mathrm{div}) = \{v \in L^2(\Omega)^3,\mathrm{div}\, v \in L^2(\Omega) \},
$$
and we can check this is a Hilbert space under the norm:
$$
\|\cdot\|_{H(\mathrm{div})}^2 = \|\cdot \|_{L^2(\Omega)^3}^2
+ \|\mathrm{div}(\cdot)\|_{ L^2(\Omega)}^2.
$$
Now all the relevant spaces are Hilbert now and we can associate the bounded linear functional with a specific inner product.
First Let $l\in H(\mathrm{div})'$, representation theorem in Hilbert space says there is some $u_l \in H(\mathrm{div}) \subset L^2(\Omega)^3$ :
$$
\langle l,v\rangle = \int_{\Omega} u_l \,v + \int_{\Omega}(\mathrm{div} \,u_l )\,(\mathrm{div}\, v).
$$
Consider some $l$ vanishes on $V_0$:
$$V_0^{\perp} = \{l\in H(\mathrm{div})': \langle l,v\rangle =0 \;\forall v\in V_0\}\subset \{l\in (H_0^1(\Omega)^3)': \langle l,v\rangle =0 \;\forall v\in V_0\}. $$
We also know that
$$
\mathrm{div}: H_0^1(\Omega)^3 \to L^2(\Omega),\quad \text{ and }\quad \mathrm{div}^* = -\nabla : (L^2(\Omega))'\simeq L^2(\Omega) \to ( H_0^1(\Omega)^3)'.
$$
Closed range theorem reads:
$$
R(-\nabla ) = (\mathrm{ker}(\mathrm{div}))^{\perp} = \{l\in ( H_0^1(\Omega)^3)': \langle l,v\rangle =0 \;\forall v\in \mathrm{ker}(\mathrm{div}) = V_0 \} \supset V_0^{\perp},
$$
and this means $\langle l,v\rangle =0 $ for any $v\in V_0$, then $u_l = \nabla \phi$ for some $\phi\in L^2(\Omega)/\mathbb{R}$ in the sense of isomorphism:
$$
\langle l,v\rangle = \int_{\Omega} u_l \,v = \int_{\Omega} \nabla \phi \,v,
$$
for $v\in H^1_0(\Omega)^3$ and divergence free.
Now we want to show
$$
V_0^{\perp}\subset \{l\in H(\mathrm{div})': \langle l,v\rangle =0 \;\forall v\in H_0\} = H_0^{\perp}.
$$
For the above $l$ that vanishes on $V_0$, $u_l = \nabla \phi$, for $u_l \in H(\mathrm{div})\subset L^2(\Omega)^3$, we can pin down this $\phi\in H^1_0(\Omega)$ by solving:
$$
\int_{\Omega} \nabla \phi \cdot \nabla v = \int_{\Omega} u_l \cdot \nabla v,\quad \text{ for } \forall v\in H^1_0(\Omega).
$$
We can use Green's identity which is valid for $u\in H(\mathrm{div})$ and $\phi \in H^1$, this result can be found in Tartar's book: for $u\in H_0\subset H(\mathrm{div})$
$$
\langle l,u\rangle = \int_{\Omega} \nabla \phi \cdot u = -\int_{\Omega} \phi\,\mathrm{div}\,u + \int_{\partial \Omega} (u\cdot n)\phi \,dS,
$$
and the boundary term vanish for $\phi \in H^1_0(\Omega)$. Therefore $\langle l,u\rangle = 0$ for $u\in H_0$, and we have:
$$V_0^{\perp}\subset H_0^{\perp}.$$
By the claim, we have (A).

## Comments