# Gradient of harmonic function matching with $C^2$ function on boundary is bounded by gradient of function

Let $\Omega \subset \mathbb{R}^n$, $n\geq 1$ be a bounded domain with $\partial \Omega \in C^1$ and $u \in C^2(\Omega)\cap C^1(\overline\Omega)$ a harmonic function.

Show that for all $v\in C^2(\Omega)\cap C^1(\overline\Omega)$ with $v=u$ on $\partial \Omega$ the following holds: $$\int_\Omega |\nabla u|^2 dx\leq \int_\Omega |\nabla v|^2dx$$

I got the hint that $0\leq \int_\Omega |\nabla (u-v)|^2 dx$ but I simply couldn't come up with anything useful from that.

Hence $$A:=\int\ u\Delta v -v\Delta v \geq 0$$
ii) $(u-v)\nabla v$ : $$0= \int_{\partial \Omega }\ n\cdot (u-v)\nabla v = \int\ {\rm div}\ (u-v)\nabla v = \int \ \nabla u\cdot \nabla v-|\nabla v|^2 +A$$ so that $$\int\ |\nabla v|^2\geq \int\ \nabla u\cdot \nabla v$$
iii) $v\nabla u$ : Here $$\int_{\partial\Omega }\ n\cdot u\nabla u= \int\ {\rm div}\ v\nabla u = \int\ \nabla v\cdot \nabla u$$
And $$\int_{\partial \Omega }\ n\cdot u \nabla u = \int\ |\nabla u|^2$$