Let $\Omega\subset \mathbb{R}^n$ be a bounded domain with infinitely smooth boundary. Define the Sobolev norm on $C^\infty(\bar \Omega)$
$$||u||\_{W^{1,2}}:=\sqrt{\int\_\Omega (|\nabla u|^2+u^2)dx}.$$
Let us denote by $W\_0^{1,2}$ the completion of the space of smooth compactly supported functions in $\Omega$ with respect to this norm.



> 
> Let $u\in W^{1,2}\_0\cap C(\bar \Omega)$. Is it true that $u$ vanishes on $\partial \Omega$?
> 
> 
> 


Apologies if this question is not of the research level.



Question on Sobolev spaces in domains with boundary
For the sake of completeness, an expansion on the comment by Mike Miller: 


In Evans/Gariepy, Thm. 4.3.1, it is proven that if the boundary of $\Omega$ is Lipschitz, then for $1 \leq p < \infty$ there is a continuous linear trace operator $T$ from $W^{1,p}(\Omega)$ to $L^p(\Omega;\mathcal{H}\_{n-1})$ which satisfies $$Tf = f \quad \text{on $\partial \Omega$}$$ if $f \in W^{1,p}(\Omega) \cap C(\overline\Omega)$. 


Observing that $W^{1,p}\_0(\Omega)$ is a closed subspace of $W^{1,p}(\Omega)$ and taking $g \in W^{1,p}\_0(\Omega)$ and a sequence $(g\_k) \subset C\_c^\infty(\Omega)$ such that $g\_k \to g$ in the $W^{1,p}(\Omega)$ norm, we obtain $$Tg = \lim\_k Tg\_k = g\_k = 0 \quad \text{in $L^p(\partial\Omega,\mathcal{H}\_{n-1})$}.$$ Thus, if $g \in W^{1,p}\_0(\Omega) \cap C(\overline\Omega)$, then $0 = Tg = g$ everywhere on $\partial\Omega$. 


It is maybe worthwile to note (Thm. 5.3.2 in Evans/Gariepy) that $T$ is in fact given by $$Tf(x) := \lim\_{r\searrow0}\frac1{|B\_r(x) \cap \Omega|} \int\_{B\_r(x) \cap \Omega} f$$
which can be a useful thing to look at also in situations where $\partial\Omega$ is less regular.




---


*Evans, Lawrence C.; Gariepy, Ronald F.*, Measure theory and fine properties of functions, Studies in Advanced Mathematics. Boca Raton: CRC Press. viii, 268 p. (1992). [ZBL0804.28001](https://zbmath.org/?q=an:0804.28001).


