Variation on the Sobolev space $H^1_0$ Let $\Omega\subset\mathbb{R}^n$ be a bounded open set, let 
$$
C^1_0(\overline\Omega) = \{u\in C^1(\Omega)\cap C(\overline\Omega):u|_{\partial\Omega}=0\},
$$
and let $C^1_c(\Omega)$ be the space of compactly supported $C^1$ functions in $\Omega$. We usually define $H^1_0(\Omega)$ as the completion of $C^1_c(\Omega)$ with respect to the $H^1$-norm. I want to define a new space, say $H^1_*(\Omega)$, as the completion of $C^1_0(\overline\Omega)\cap H^1(\Omega)$ with respect to the $H^1$-norm. 
My question is, are these spaces the same? In other words, can any element of $C^1_0(\overline\Omega)\cap H^1(\Omega)$ be approximated with arbitrary accuracy by compactly supported smooth functions in the $H^1$-norm? 
I can prove this under some assumptions on the boundary of $\Omega$, but the question is what happens if $\Omega$ is an arbitrary open set. The motivation for this question is that for solving boundary value problems with homogeneous Dirichlet conditions, it seems that the space $H^1_*$ is more natural, at least pedagogically. The introduction of $H^1_0$ in a first lecture on Dirichlet problem appears "from nowhere" because it is not clear to the student why for instance, we have to take the completion of $C^1_c$, which consists of functions with not only the values, but also the derivatives vanishing near the boundary. I thought it would be good to introduce $H^1_*$ first, and then later prove that it would have made no difference if we used $C^1_c$ or $C^\infty_c$ in the definition. However, I am stuck at proving this equivalence for general domains.
 A: Let $\Omega=\{(x,y)\,|\,0<x<1,0<y<w(x)\}$, where $w(x)\to 0$ as $x\to 0$. Let $\phi$ be any
smooth positive function on $[0,1]$, which vanishes at the end points. Now define
$$\psi(x,y)=(1-x)\phi(y/w(x))q(x),$$
where $q(x)$ and $w(x)$ are smooth functions for $x>0$ such that $q(x)\to 0$ as $x\to 0$, but $q(x)^2/w(x)$ is not integrable at 0. Then $\psi\in C_0^1(\bar\Omega)$ in the sense of your definition, but $\psi_y$ is not square integrable.
A: The question is whether a function in $H^1(\Omega)\cap C(\bar\Omega)$ which vanishes on $\partial\Omega$ is in fact in $H^1_0(\Omega)$. This is true. A more general result is proved in D. Swanson and W.P. Ziemer, Sobolev functions whose inner trace at the boundary is zero, Ark. Mat. 37 (1999), 373-380.
A: For bounded domains with Lipschitz-condition boundary, the Meyers-Serrin theorem proves that the two (suitable forms of the) definitions give the same outcome.
One way to appraise potential obstacles in the "general" situation is to specify a collection $\Phi$ of distributions supported on the boundary $\partial \Omega$, meant to suggest that for $f$ smooth on $\mathbb R^n$ satisfaction of all conditions $\phi(f)=0$ for $\phi\in\Phi$ means "$f$ vanishes on $\partial \Omega$".
When $\partial \Omega$ is a sufficiently docile set, it may have a measure, and then this vanishing condition can be specified by integration against (smooth?) functions on $\partial \Omega$, of course.
In such a set-up, part of the question becomes that of ascertaining what Sobolev space on $\mathbb R^n$ contains the functionals in $\Phi$. If they are in $H^{-1}$, then the Friedrichs extension $F$ of $\Delta$ restricted to test functions supported in the interior of $\Omega$ has two interesting properties: first, $Fu=v$ if and only if $\Delta u = v+\phi$ for some $\phi$ in the $H^{-1}$ closure of $\Phi$; second, functions $u$ in the domain of $F$ retain the property $\phi(u)=0$ for all $\phi\in\Phi$.
That is, this version of the "two" definitions of the Sobolev spaces makes them be provably the same, pushing various questions off into asking what functionals specify "vanish on the boundary" (or whatever other condition), and asking what global Sobolev spaces those functional are in on the ambient $\mathbb R^n$, where the 'essential' self-adjointness of $\Delta$ removes certain comparable ambiguities.
A: Assume that $\Omega \subset \mathbb{R}^n$. I will prove that $C^1_c (\Omega)$ is dense in $H^1 (\Omega) \cap C^1 (\Omega) \cap C_0 (\Omega)$ endowed with the $H^1$ norm, where 
$$
  C_0 (\Omega) = \{u: \Omega \to \mathbb{R} : \text{for every } \varepsilon > 0, \, u^{-1} (\mathbb{R} \setminus (-\varepsilon, \varepsilon)) \text{ is compact}\}. 
$$
Take $\theta \in C^1 (\mathbb{R})$ such that $\lim_{\vert t \vert \to \infty} \frac{\theta (t)}{t} = 1$ and $\lim_{\vert t \vert \to \infty} \theta' (t) = 1$ and $\theta = 0$ on $(-1, 1)$. For example,
$$
  \theta (t) = \begin{cases}
  \sqrt{1 + (t - 1)^2} & \text{if $t > 1$},\\
  0 & \text{if $- 1 \le t \le 1$},\\
  -\sqrt{1 + (t + 1)^2} & \text{if $t <- 1$},\\
\end{cases}
$$
In particular, $\theta'$ is bounded on $\mathbb{R}$. Set for $\lambda > 0$
$$
  \theta_\lambda (t) = \lambda \theta (t/\lambda).
$$
For every $u \in H^1 (\Omega) \cap C^1 (\Omega) \cap C_0 (\Omega)$ and $\lambda > 0$, define $u_\lambda = \theta_\lambda \circ u$. First observe that since $u \in C_0 (\Omega)$ and $\theta_\lambda = 0$ on $(-\lambda, \lambda)$, $\operatorname{supp} u_\lambda$ is compact.
Next, for every $x \in \Omega$,
$$
  \lim_{\lambda \to 0} u_\lambda (x)
=u (x)
$$
and 
$$
  \lim_{\lambda \to 0} \nabla u_\lambda (x)
=\begin{cases}
\nabla u (x) & \text{if $u (x) \ne 0$},\\
0 & \text{if $u (x) = 0$}
\end{cases}
$$
By the implicit function theorem, $\{x \in \Omega : u(x) = 0 \text{ and } \nabla u (x) \ne 0\}$ is an $n-1$--dimensional embedded submanifold of $\Omega$. Hence for almost every $x \in \Omega$,
$$
  \lim_{\lambda \to 0} u_\lambda (x)
=u (x)
$$
and 
$$
  \lim_{\lambda \to 0} \nabla u_\lambda (x)
=
\nabla u (x).
$$
In order to conclude, observe that for every $x \in \Omega$,
$$
  \lvert u (x) - u_\lambda (x) \rvert ^2
+ \lvert \nabla u (x) - \nabla u_\lambda (x) \rvert ^2
\le \Bigl( \sup_{t \in \mathbb{R}} \frac{\lvert \theta (t) - t\rvert}{\lvert t \rvert}\Bigr)^2 \lvert u (x) \rvert^2 + \Bigl( \sup_{t \in \mathbb{R}} \lvert \theta' (t) - 1\rvert\Bigr)^2 \lvert \nabla u (x) \rvert^2.
$$
Hence, by Lebesgues' dominated convergence theorem, 
$$ \lim_{\lambda \to 0} \int_{\Omega} \lvert u  - u_\lambda  \rvert ^2
+ \lvert \nabla u  - \nabla u_\lambda \rvert ^2=0.
$$
