# Using an energy argument to prove a solution is unique for a PDE

Let $D$ be the domain in $\mathbb{R}^3$. Use an energy argument to prove that any solution to $$\begin{cases} \Delta u(x) = f(x) \ \ \ &\text{for} \ x\in D\\ \frac{\partial u}{\partial n} + au(x) = h(x)\ \ \ &\text{for} \ x\in \partial D \end{cases}$$ is unique, where $f$ is a function defined on $D$, $h$ is a function defined on $\partial D$, and $a$ is a positive constant.

Attempted proof - Assume that we have two solutions $u_1(x)$ and $u_2(x)$. Let $v(x) = u_1(x) - u_2(x)$. Then we have $$\begin{cases}\Delta v(x) = 0 \ \ &\text{for} \ x\in D\\ \frac{\partial v}{\partial n}(x) + a v(x) = 0 \ \ &\text{for} \ x\in \partial D \end{cases}$$ So,

\begin{align*} 0 = \int_D v \Delta v dx &= \int_{D} v\cdot \mathrm{div}(\mathrm{grad} (v))dx\\ &= \int_{\partial D} (v \cdot \mathrm{grad}(v))\cdot n dS - \int_{D} \mathrm{grad}(v) \cdot \mathrm{grad(v)}dx\\ &= \int_{\partial D}v \frac{\partial v}{\partial n}dS - \int_{D} |\nabla v|^2 dx\\ &= -\int_{\partial D}v\alpha v dS - \int_{D} |\nabla v|^2 dx\\ &= -\int_{\partial D}\alpha v^2 dS - \int_{D} |\nabla v|^2 dx\\ &= -\int_{\partial D}\alpha v^2 dS + \int_{\partial D}\alpha v^2 dS\\ &= 0 \end{align*} So we ended up with $$0 = - \int_{\partial D}a v^2 - \int_{D} |\nabla v|^2 dx$$ From this we get that $$\int_{D}|\nabla v|^2dx = - a\int_{\partial D}v^2 dS$$ Now the left-hand side is non-negative and the right-hand side is non-positive, which implies that we must have $\Delta v(x) = 0$ so then $u_1(x) - u_2(x) = 0 \Rightarrow u_1(x) = u_2(x)$.

I posted this question before but I am not getting the feedback I need since I changed my question around. I just want to know if this proof is correct or if it is not what I need to change around to make it correct.

Note that one must assume $\alpha \geq 0$.
Your proof is correct, it is only that last few implications that are (perhaps) too quick. You wrote that $\Delta v=0$ implies $v_1 = v_2$, but were it the case, you would no need to do this long computation. Let me sum it up: You have $\nabla v \equiv 0$ in $D$ and $v=0$ on $\partial D$. The critical part is deducing $v\equiv 0$. The gradient vanishes so $v$ must be a constant function on each connected component of $D$. That constant must be $0$.
It is worthwhile to understand when does the fact that $v$ is harmonic comes into play. It does in the begining of the calculations, in the first integral. Also, the successful use of Green's identity is due to the fact that the expression involved $\Delta$ operator, but that's that.
Another tactic is to use maximum principle, which again relies heavily on the fact that $v$ is harmonic.