# Is $H^1(\Omega) \cap C_c(\Omega)$ dense in $C_c(\Omega)$?

Let $\Omega$ be a bounded smooth domain. Denote by $C_c(\Omega)$ the space of compactly supported continuous functions on $\Omega$.

is $H^1(\Omega) \cap C_c(\Omega)$ dense in $C_c(\Omega)$?

I usually see the density for $H^1$, not the other way around.

• Do you mean density with respect to the topology given by uniform convergence? – Pozz Aug 18 '17 at 9:18
• @Pozz Yes, I think so. I am trying to check a condition on dirichlet spaces which is where my question arises. – math_guy Aug 18 '17 at 9:31

Let us take $f\in C_c(\Omega)$. We want to find a sequence $f_n\in C_c(\Omega)\cap H^1(\Omega)$ converging to $f$ uniformly on $\Omega$. We are going to construct a sequence $f_n\in C_c^\infty(\Omega)\subseteq C_c(\Omega)\cap H^1(\Omega)$.
Let us take some open sets $\Omega',\Omega''$ such that $supp(f)\subset\Omega'\subset\subset\Omega''\subset\subset\Omega$ (where $supp$ denotes the support of a function) and let $\chi\in C^\infty_c(\Omega)$ such that $\chi|_{\overline{\Omega'}}=1$ and $\chi|_{\overline{\Omega}\setminus\Omega''}=0$. Let us extend $f$ to zero out of $\Omega$. We know that by convolution with a mollifier there exists a sequence $g_n\in C_c^\infty(\mathbb{R}^n)$ that converges to $f$ con compact sets. Now we consider $f_n=\chi g_n$.
We have $f_n\in C^\infty_c(\Omega)$ with $supp(f_n)\subseteq \overline{\Omega''}$; $f_n$ converges uniformly to $f$ on $\overline{\Omega'}$ and on $\overline{\Omega''}\setminus \Omega'$, in particular $f_n$ converges to zero on $\overline{\Omega''}\setminus \Omega'$. Hence we obtain:
$\sup_{x\in\overline{\Omega''}}|f_n-f|\le\sup_{x\in\overline{\Omega'}}|f_n-f|+\sup_{x\in\overline{\Omega''}\setminus \Omega'}|f_n-f|= \sup_{x\in\overline{\Omega'}}|g_n-f|+\sup_{x\in\overline{\Omega''}\setminus \Omega'}|f_n|\longrightarrow 0$
• Thanks. this argument also gives $H^1(\Omega)\cap C_c(\omega) \subset C_c(\omega)$ is dense, for $\omega \subset \Omega$, doesn't it? – math_guy Aug 18 '17 at 15:48
• @math_guy Yes it's right. But since $H^1(\Omega)\cap C_c(\omega)=H^1(\omega)\cap C_c(\omega)$ (I think we are assuming to extend to zero functions in $C_c(\omega)$ out of $\omega$), we have exactly the same situation of $\Omega$. – Pozz Aug 18 '17 at 17:32