Trace operator and $W^{1,p}_0$ Let $W^{1,p}$ be the Sobolev space of $L^p$ functions with $L^p$ first derivatives. Let $W^{1,p}_0$ be the closure of the test functions in $W^{1,p}$. I am not explicitly writing the domain of the functions because I expect it won't matter, but call it $\Omega$ if you wish. What I will need is $\Gamma$ to be the boundary. I know we can define an operator $\gamma_0:W^{1,p}\to L^p(\Gamma)$ such that it is a bounded linear operator and its restriction to smooth functions is the restriction operator $u\mapsto u|_\Gamma$. I have been told the following holds:
$$W^{1,p}_0=\ker\gamma_0.$$
I can easily see $\subseteq$: if $u\in W^{1,p}_0$, then by definition we have test functions $u_n$ converging to $u$ in $W^{1,p}$, but test functions belong to the kernel and $\gamma_0$ is continuous, hence:
$$\gamma_0u=\lim_{n\to\infty}\gamma_0u_n=0.$$
But what about the converse? Assume $\gamma_0u=0$. How do I prove this implies $u$ is the limit of test functions? I wasn't able to find that on the internet, and the teacher decided to omit the proof, so here I am asking for a proof. How do I proceed? I know that I can find smooth functions $u_n\to u$ in $W^{1,p}$ (e.g. convolutions with mollifiers, which are not necessarily test functions, I mean the convolutions, the mollifiers are) since smooth functions on $\overline\Omega$ are dens i $W^{1,p}$, but how do I show they are (at least eventually) with zero trace? I can only see that their traces converge to 0 in $W^{1,p}$ by continuity of $\gamma_0$…
 A: In Evans book (Chapter 5) we can find a proof for bounded $\Omega$ with $C^1$ boundary. (The author says to omit it in a first reading.) Here it is in full:

THEOREM 2 (Trace-zero functions in $W^{1,p}$). Assume $U$ is bounded and $\partial U$ is $C^1$. Suppose furthermore that $u\in W^{1,p}(U)$. Then $$u\in W^{1,p}_0(U)\ \ \ \textit{if and only if}\ \ \ Tu=0\ \, \textit{on}\,\ \partial U.\tag4$$
Proof$^*$.

*

*Suppose first $u\in W_0^{1,p}(U).$ Then by definition there exist functions $u_m\in C_c^\infty(U)$ such that $$u_m\to u\quad{\rm in}\ W^{1,p}(U).$$ As $Tu_m=0$ on $\partial U\ (m=1,...)$ and $T:W^{1,p}(U)\to L^p (\partial U)$ is a bounded linear operator, we deduce $Tu=0$ on $\partial U$.


*The converse statement is more difficult. Let us assume that $$\tag{5} Tu=0\quad{\rm on}\ \partial U.$$ Using partitions of unity and flattening out $\partial U$ as usual, we may as well assume $$\begin{cases}u\in W^{1,p}(\Bbb R^n _+),\ \  u \ {\rm has\, compact\, support\, in\ }\overline{{ \Bbb R}}^n_+, \\ \qquad\ Tu=0\ {\rm on }\ \partial \Bbb R^n_+=\Bbb R^{n-1}. \end{cases}\tag6$$ Then since $Tu=0$ on $\Bbb R^{n-1}$, there exist functions $u_m\in C^1(\overline{ \Bbb R}^n_+)$ such that $$u_m\to u\ \ \ \ {\rm  in} \ \, W^{1,p}(\Bbb R^n_+)\tag7$$ and $$Tu_m=u_m|_{\Bbb R^{n-1}}\to0\ \ \ \ {\rm in}\ L^p(\Bbb R^{n-1}).$$ Now if $x'\in\Bbb R^{n-1}$, $x_n\geq0$, we have $$|u_m(x',x_n)|\leq|u_m(x',0)|+\int_0^{x_n}|u_{m,x_n}(x',t)|\, dt.$$ Thus $$\begin{aligned}&\int_{\Bbb R^{n-1}}|u_m(x',x_n)|^p \, dx' \\ \leq &\; C\left(\int_{\Bbb R^{n -1}}|u_m(x',0)|^p\, dx' + x_n^{p-1}\int_0^{x_n}\int_{\Bbb R^{n-1}}|Du_m(x',t)|^p dx'\, dt\right)\end{aligned}.$$ Letting $m\to\infty$ and recalling (7), (8), we deduce: $$\int_{\Bbb R^{n-1}}|u(x',x_n)|^p dx'\leq Cx^{p-1}_n \int_0^{x_n}\int_{\Bbb R^{n-1}}|Du|^p dx'dt\tag9$$ for a.e. $x_n>0$.


*Next let $\zeta\in C^\infty(\Bbb R)$ satisfy $$\zeta\equiv1\ {\rm on}\ [0,1],\ \zeta\equiv0\ {\rm on}\ {\Bbb R}-[0,2],\ \ \ 0\leq \zeta\leq1,$$ and write $$\begin{cases}\zeta_m(x):=\zeta(mx_n)\ \ \ \ (x\in\Bbb R^n_+) \\ w_m:=u(x)(1-\zeta_m).\end{cases}$$ Then $$\begin{cases}w_{m,x_n}=u_{x_n}(1-\zeta_m)-mu\zeta'\\ D_{x'}w_m=D_{x'}u(1-\zeta_m).\end{cases}$$ Consequently $$\begin{align}\int_{\Bbb R^n_+}|Dw_m-Du|^p \, dx&\leq C\int_{\Bbb R^n_+}|\zeta_m|^p|Du|^p\, dx \\ & \qquad\ +Cm^p\int_0^{2/m}\int_{\Bbb R^{n-1}}|u|^p\, dx'dt\\ &=:A+B. \end{align}$$ Now $$\tag{11}A\to0\quad{\rm as}\ m\to\infty,$$ since $\zeta_m\neq0$ only if $0\leq x_n\leq 2/m$. To estimate the term $B$, we utilize inequality (9): $$\tag{12}\begin{align}B&\leq Cm^p\left(\int_0^{2/m}t^{p-1}dt\right)\left(\int_0^{2/m}\int_{\Bbb R^{n-1}}|Du|^p dx'dx_n\right)\\ &\leq C\int_0^{2/m}\int_{\Bbb R^{n-1}}|Du|^p dx'dx_n\to 0\quad{\rm as}\ m\to 0.\end{align}$$ Employing (10)-(12), we deduce $Dw_m\to Du$ in $L^p(\Bbb R^n_+)$. Since clearly $w_m\to u$ in $L^p (\Bbb R^n_+)$, we conclude $$w_m\to u\quad{\rm in}\ W^{1,p}(\Bbb R^n _+).$$ But $w_m=0$ if $0<x_n<1/m$. We can therefore mollify the $w_m$ to produce functions $u_m\in C_c^\infty(\Bbb R^n _+)$ such that $u_m\to u$ in $W^{1,p}(\Bbb R^n_+)$. Hence $u\in W^{1,p}_0(\Bbb R^n _+)$. $\tag*{$\square$}$

