Solution (source code)

= Solution

If the <Poincare inequality with a boundary trace> failed, after normalization there would be $u_k\in H^1(U)$ with
$$
\|u_k\|_{L^2(U)}=1,
\qquad
\|Du_k\|_{L^2(U)}+\|u_k\|_{L^2(\partial U)}\longrightarrow0.
$$
As in part 1(c)(i), a subsequence converges strongly in $L^2(U)$ and weakly in $H^1(U)$ to a <constant function> $u$. The <Sobolev trace theorem> is a bounded linear map, so the traces converge weakly while their norms tend to zero; hence the trace of $u$ is zero. A constant with zero trace is zero, contradicting $\|u\|_2=1$. Consequently
$$
\boxed{\|u\|_{L^2(U)}\leq C_2\left(\|Du\|_{L^2(U)}+\|u\|_{L^2(\partial U)}\right).}
$$