I have a question about Sobolev space.
Let $\Omega$ be an open subset of $\mathbb{R}^{d}$,
we consider the Sobolev space
$H^{1}(\Omega):=\left\{ u \in L^{2}(\Omega) : D_{j}u \in L^{2}(\Omega), j=1,\ldots,n \right\}$
with norm
$\|u\|^{2}_{H^{1}(\Omega)}:=\|u\|^{2}_{L^{2}(\Omega)}+\sum_{j=1}^{n}\|D_{j}u\|_{L^{2}(\Omega)}^{2}$,
where $D_{j}u=\partial u/ \partial x_{j}$ is the distributional deriavtive. Moreover, we let
$X:=\text{closure of }\left\{ u|{}_{\Omega} \in H^{1}(\Omega): u \in C_{c}(\bar{\Omega})\right\} \text{in } H^{1}(\Omega) ,$
$Y:=\text{closure of }\left\{ u|{}_{\Omega} \in H^{1}(\Omega): u \in C(\bar{\Omega})\right\} \text{in } H^{1}(\Omega),$
where $C_{c}(\bar{\Omega})$ denotes the space of all continuous real valued functions on $\bar{\Omega}$ with compact support and $C(\bar{\Omega})$ denotes the space of all continuous real valued functions on $\bar{\Omega}$.
My question
Can we show $X=Y$ ?
My attempt
It is clear that $X \subset Y$. If $\Omega$ is bounded, $X=Y$ (since $C_{c}(\bar{\Omega})=C(\bar{\Omega})$ holds).
Can we show $X=Y$ when $\Omega$ is an arbitary open subset?
If you know, please tell me.
Thank you in advance.
If you have $y \in H^1(\Omega) \cap C(\bar\Omega)$ you can use a truncation argument to obtain $x \in H^1(\Omega) \cap C_c(\bar\Omega)$ such that $\|x-y\|_{H^1}$ is arbitrarily small.