I'm trying to follow the prove that my math book provide for the uniqueness of the solutions of the wave equation, given certain boundary conditions.
It is as follows,
Defining $U=f_1-f_2$, where both $f_1$ and $f_2$ satisfy the wave equation and the same boundary conditions.
With $\psi=U$ and $\phi=\partial_t U=\dot U$, the Green's first identity reads, $$\int_VdV\left[\dot U \Delta U + (\vec\nabla \dot U)\cdot(\vec\nabla U) \right]=\oint_S dS \left[\dot U \partial_nU\right]$$ Where $\Delta$ is the Laplace operator and $\partial_t$ is the derivative normal to the surface.
After some steps, and using the fact that $U$ satisfy either $U|_S = 0$ or $(\partial_n U)|_S=0$, one gets
$$\dfrac{1}{2}\dfrac{d}{dt}\int dV \left[\left(\dfrac{\dot U}{c}\right)^2+\left(\vec\nabla U\right)^2\right]=0$$ Now, the integral must be equal to a constant. Using $U|_{t=0}=0$ that constant is zero.
Here is where I'm stuck
$$\int dV \left[\left(\dfrac{\dot U}{c}\right)^2+\left(\vec\nabla U\right)^2\right]=0$$ The idea, of course, is to find that $U=0$, but the only argument the book gives is 'because inside the integral there is an addition of squares, $U$ must be constant and, because $U|_{t=0}=0$, that constant must be zero'
I can't see why having that pair of squared terms inside the integral implies that $U=\text{constant}$.