following my lecture notes I stumbled upon the following integral and could not make sense of certain aspects of it. It is said that if \begin{equation} 0 = \frac{1}{2}\partial_t[(\partial_t\phi)^2 + (\nabla\phi)^2] + div(\partial_t\phi\nabla\phi) \end{equation} is integrated over a region $K =\bigcup\limits_{\tau\in[0,T]}\{\tau\}\times B_{R+T-\tau} $, we would then end up with the following result:
\begin{equation} \int_{\{t=T\} \times B_{R}} \frac{1}{2} \left( (\partial_t \phi)^2 + |\nabla_x \phi|^2 \right) \, d^n x - \int_{\{t=0\} \times B_{R+T}} \frac{1}{2} \left( (\partial_t \phi)^2 + |\nabla_x \phi|^2 \right) \, d^n x + \int_{0}^{T} \int_{\partial B_{R+T-\tau}} \frac{1}{2} \left( (\partial_t \phi)^2 + |\nabla_x \phi|^2 \right) \, dS \, d\tau = \int_{0}^{T} \int_{\partial B_{R+T-\tau}} \partial_t \phi \nabla_x \phi \cdot \mathbf{N} \, dS \, d\tau \end{equation}, whith $S$ the surface of $B_{R+T-\tau}$.
My question now is how actually the addtional term $\int_{0}^{T} \int_{\partial B_{R+T-\tau}} \frac{1}{2} \left( (\partial_t \phi)^2 + |\nabla_x \phi|^2 \right) \, dS \, d\tau$ comes up, although the divergence theorem can only be applied on $div(\partial_t\phi\nabla\phi)$.