# Show that $\mathcal C^1(\bar \Omega )$ is dense in $W^{1,p}(\Omega )$.

Let $\Omega \subset \mathbb R^d$ a bounded domain. I want to show that $\mathcal C^1(\bar \Omega )$ is dense in $W^{1,p}(\Omega )$.

Attempts

Let $u\in W^{1,p}(\Omega )$. Then $u$ can be extended to $\bar u\in W^{1,p}(\mathbb R^d)$. We know that $\mathcal C_0^\infty (\mathbb R^d)$ is dense in $W^{1,p}(\mathbb R^d)$. Therefore, there is $(u_n)\subset \mathcal C_0^\infty (\mathbb R^d)$ s.t. $$\|u_n-\bar u\|_{W^{1,p}(\mathbb R^d)}\to 0.$$ Since $$\|u_n-u\|_{W^{1,p}(\Omega )}\leq \|u_n-\bar u\|_{W^{1,p}(\mathbb R^d)}\to 0$$ we have that $(u_n|_{\Omega })\subset \mathcal C^\infty (\bar \Omega)$ that converge to $u$ in $W^{1,p}(\Omega )$. The claim follow.

Question Is it correct ? If no, why ?

• You need stronger assumptions than just bounded domain to apply the extension theorem. Moreover, I think that the claim is false. Consider for example the unit square without the positive part of the x-axis. Now you may construct a function that is lets say 0 above the x-axis, 1 below the x-axis for $x \in (1/2,1)$ and on $(0,1/2)\times (-1,0)$ such that everything is continuous. Then it is not even possible to find a continuous function on the closed unit square that is arbitrary close to that function. – Jonas Lenz Dec 26 '17 at 10:37

As noted by Jonas Lenz, both your claim ($C^1(\bar \Omega)$ is dense in $W^{1,p}(\Omega)$) and the extension theorem are not true for general domains. The reasoning is otherwise correct.