Solution (source code)

= Solution

If the asserted <Poincare inequality> failed, after rescaling there would be $u_j\in H$ with
$$
\lVert u_j\rVert_2=1,
\qquad
\lVert Du_j\rVert_2\longrightarrow0.
$$
The sequence is bounded in $H^1(U)$. By the <Rellich-Kondrachov compactness theorem>, a subsequence converges strongly in $L^2(U)$ to some $u$ and weakly in $H^1(U)$. Its weak gradient is zero, so connectedness of $U$ makes $u$ almost everywhere constant. Continuity of the integral under $L^2$ convergence gives $\int_Uu=0$, hence $u=0$. Strong convergence would then imply $\lVert u_j\rVert_2\to0$, contradicting the normalization. Therefore the required constant exists.