# Integration by parts in time derivative of energy integral for wave equation

I am trying to understand the proof of the theorem of finite propagation speed about solutions of the wave equation in Evans, p84. More precisely I am struggling to see exactly how partial integration is used in the following calculation (u is $\mathcal C^2$ defined in $\mathbb R^n \times (0,\infty)$): $$e(t) = \frac{1}{2}\int_{B(x_0,t_0-t)} u_t^2(x,t) + |Du(x,t)|^2 dx$$ with $(0 \leq t \leq t_0).$ Then $$\frac{d}{dt} e(t) = \int_{B(x_0,t_0-t)} (u_t u_{tt} + Du \cdot Du_t) dx - \frac{1}{2} \int_{\partial B(x_0,t_0-t)} (u_t^2 + |Du|^2) dS.$$

If I would naively pull in the time derivative into the integral I would just get the first part - of couse I guess this is not how it works and we get this boundary term too. What formula is used here?