Trace zero of the gradient implies trace constant of the function. I was thinking about the following:
Assume that $u \in W^{2,2}(\Omega)$, with $\Omega$ a smooth connected open set. Assume that $Du \in W_{0}^{1,2}(\Omega)$. How could i prove that $T(u)$ is constant? Where $T$ is the trace operator. I tried by aproximation without any success, and the trace inequalities that I know don't help me
 A: Let us only consider the case $\Omega=\mathbb{R}^{n}_{+}$. The rest can be done by flatting the boundary and apply the connectivity of $\partial \Omega$. 
If we have showed that 
$D_{k} T(u)=0$ for any $1\leq k\leq n-1$, then $Tu$ is a constant over the boundary. Since $u\in H^2(\mathbb{R}^{n}_{+})$, then $T(u)\in  H^{3/2}(\mathbb{R}^{n}_{+}) $, which implies that $D_k T(u)$ is well-defined. 
Since $Du\in W_0^{1,2}(\mathbb{R}^{n}_{+})$, we know that $T(D_k u)=0$ (An equivalent definition of $W_0^{1,2}(\Omega)$).  It remains to show that 
$D_k T(u)=T(D_k u)$. If it is done, then we have $D_k T(u)=T(D_k u)=0$ as desired. 
To prove the key identity, it is true for the smooth function. Then we prove the rest by density argument. That is, let $u_m$ be a smooth function approximating 
$u$ in $W^{2,2}(\mathbb{R}^{n}_{+})$. Then it is easy to see that  $D_k T(u_m)=T(D_k u_m)$. Passing limit as $m\to \infty$, we get the desired identity in the sense of $W^{1/2,2}(\mathbb{R}^{n-1})$ by the continuity of 
$T: W^{s,2}(\mathbb{R}^{n}_{+}))\to W^{s-1/2,2}(\mathbb{R}^{n-1}))$. 
