[proofplan]
We differentiate the kinetic and potential parts of the energy and use the [wave equation](/page/Wave%20Equation) to cancel the resulting interior terms. The only remaining term comes from [integration by parts](/theorems/210) in space. In a bounded domain this boundary contribution vanishes because the Dirichlet condition implies $\partial_t u = 0$ on the boundary; in $\mathbb{R}^n$ it vanishes after truncating to balls and using either compact support or the stated flux decay. Once $E_u'(t)=0$ for every $t \in (0,T)$, the ordinary one-dimensional fundamental theorem of calculus gives [conservation of energy](/theorems/1335) on $[0,T]$.
[/proofplan]
[step:Differentiate the energy at a fixed time]
Fix $t \in (0,T)$. Define the kinetic energy $K : [0,T] \to [0,\infty)$ and potential energy $P : [0,T] \to [0,\infty)$ by
\begin{align*}
K(t) = \frac{1}{2}\int_U |\partial_t u(t,x)|^2\, d\mathcal{L}^n(x)
\end{align*}
and
\begin{align*}
P(t) = \frac{c^2}{2}\int_U |\nabla u(t,x)|^2\, d\mathcal{L}^n(x).
\end{align*}
By the theorem hypothesis that the maps $t\mapsto \partial_tu(t,\cdot)$ and $t\mapsto \nabla u(t,\cdot)$ are $C^1$ with values in $L^2(U)$ and $L^2(U;\mathbb{R}^n)$, respectively, with derivatives $t\mapsto \partial_t^2u(t,\cdot)$ and $t\mapsto \nabla\partial_tu(t,\cdot)$, the differentiability of the squared $L^2$ norm gives
\begin{align*}
K'(t) = \int_U \partial_t u(t,x)\,\partial_t^2 u(t,x)\, d\mathcal{L}^n(x)
\end{align*}
and
\begin{align*}
P'(t) = c^2\int_U \nabla u(t,x)\cdot \nabla\partial_t u(t,x)\, d\mathcal{L}^n(x).
\end{align*}
Therefore
\begin{align*}
E_u'(t) = \int_U \partial_t u(t,x)\,\partial_t^2 u(t,x)\, d\mathcal{L}^n(x) + c^2\int_U \nabla u(t,x)\cdot \nabla\partial_t u(t,x)\, d\mathcal{L}^n(x).
\end{align*}
[guided]
Fix $t \in (0,T)$. The energy has two pieces: the part involving $\partial_t u$ and the part involving $\nabla u$. We name them so that the differentiation is explicit. Define
\begin{align*}
K : [0,T] \to [0,\infty), \qquad K(t) = \frac{1}{2}\int_U |\partial_t u(t,x)|^2\, d\mathcal{L}^n(x),
\end{align*}
and
\begin{align*}
P : [0,T] \to [0,\infty), \qquad P(t) = \frac{c^2}{2}\int_U |\nabla u(t,x)|^2\, d\mathcal{L}^n(x).
\end{align*}
Thus $E_u(t)=K(t)+P(t)$.
The point of differentiating is that the wave equation contains $\partial_t^2 u$ and $\Delta u$, so the time derivative of the energy will expose exactly those quantities. The differentiation is justified in the [Hilbert space](/page/Hilbert%20Space) $L^2(U)$: the theorem assumes that $t\mapsto \partial_tu(t,\cdot)$ is continuously differentiable as an $L^2(U)$-valued map, with derivative $t\mapsto \partial_t^2u(t,\cdot)$. The derivative formula for the squared norm in a Hilbert space therefore gives
\begin{align*}
K'(t) = \int_U \partial_t u(t,x)\,\partial_t^2 u(t,x)\, d\mathcal{L}^n(x).
\end{align*}
The same argument applies to the $L^2(U;\mathbb{R}^n)$-valued map $t\mapsto \nabla u(t,\cdot)$. Its derivative is $t\mapsto \nabla\partial_tu(t,\cdot)$, because the classical $C^2$ regularity lets the time derivative commute with each spatial derivative. Hence
\begin{align*}
P'(t) = c^2\int_U \nabla u(t,x)\cdot \nabla\partial_t u(t,x)\, d\mathcal{L}^n(x).
\end{align*}
Adding the two identities yields
\begin{align*}
E_u'(t) = \int_U \partial_t u(t,x)\,\partial_t^2 u(t,x)\, d\mathcal{L}^n(x) + c^2\int_U \nabla u(t,x)\cdot \nabla\partial_t u(t,x)\, d\mathcal{L}^n(x).
\end{align*}
This formula is the energy identity before [integration by parts](/theorems/2098).
[/guided]
[/step]
[step:Convert the spatial-gradient term into an interior term and a boundary flux]
Assume first that $U$ is bounded. Let $\nu : \partial U \to \mathbb{R}^n$ denote the outward unit normal field. Applying the classical integration-by-parts formula on the smooth domain $U$ to the $C^1$ functions $x \mapsto u(t,x)$ and $x \mapsto \partial_t u(t,x)$ gives
\begin{align*}
\int_U \nabla u(t,x)\cdot \nabla\partial_t u(t,x)\, d\mathcal{L}^n(x)=-\int_U \Delta u(t,x)\,\partial_t u(t,x)\, d\mathcal{L}^n(x)+\int_{\partial U} \partial_t u(t,x)\,\nabla u(t,x)\cdot \nu(x)\, d\mathcal{H}^{n-1}(x).
\end{align*}
Since $u(t,x)=0$ for all $(t,x)\in[0,T]\times\partial U$, differentiating this boundary identity with respect to $t$ gives $\partial_t u(t,x)=0$ for every $(t,x)\in(0,T)\times\partial U$. Therefore the boundary integral vanishes, and
\begin{align*}
\int_U \nabla u(t,x)\cdot \nabla\partial_t u(t,x)\, d\mathcal{L}^n(x)=-\int_U \Delta u(t,x)\,\partial_t u(t,x)\, d\mathcal{L}^n(x).
\end{align*}
[guided]
The spatial integration by parts is the step where the boundary condition is used. Let $\nu : \partial U \to \mathbb{R}^n$ be the outward unit normal field. Since $U$ is a bounded smooth domain and the functions $x\mapsto u(t,x)$ and $x\mapsto \partial_tu(t,x)$ are $C^1$ up to $\partial U$, the classical integration-by-parts formula on $U$ gives
\begin{align*}
\int_U \nabla u(t,x)\cdot \nabla\partial_t u(t,x)\, d\mathcal{L}^n(x)=-\int_U \Delta u(t,x)\,\partial_t u(t,x)\, d\mathcal{L}^n(x)+\int_{\partial U} \partial_t u(t,x)\,\nabla u(t,x)\cdot \nu(x)\, d\mathcal{H}^{n-1}(x).
\end{align*}
Why does the boundary term disappear? The Dirichlet condition says that the map $s\mapsto u(s,x)$ is identically zero on $[0,T]$ for each $x\in\partial U$. Differentiating this one-dimensional identity at the fixed time $t\in(0,T)$ gives $\partial_tu(t,x)=0$ for every $x\in\partial U$. Therefore the boundary integrand is identically zero on $\partial U$, and the identity reduces to
\begin{align*}
\int_U \nabla u(t,x)\cdot \nabla\partial_t u(t,x)\, d\mathcal{L}^n(x)=-\int_U \Delta u(t,x)\,\partial_t u(t,x)\, d\mathcal{L}^n(x).
\end{align*}
[/guided]
[/step]
[step:Handle the boundary term in the whole-space case]
Now suppose $U=\mathbb{R}^n$. For $R>0$, define the truncated ball $B_R := B(0,R)$ and define the truncated energy $E_R : [0,T] \to [0,\infty)$ by
\begin{align*}
E_R(t) = \frac{1}{2}\int_{B_R} |\partial_t u(t,x)|^2\, d\mathcal{L}^n(x) + \frac{c^2}{2}\int_{B_R} |\nabla u(t,x)|^2\, d\mathcal{L}^n(x).
\end{align*}
Since $B_R$ is bounded and $u$ is $C^2$ on $[0,T]\times \overline{B_R}$, differentiating under the integral sign on $B_R$ is justified and gives
\begin{align*}
E_R'(t) = \int_{B_R} \partial_t u(t,x)\,\partial_t^2 u(t,x)\, d\mathcal{L}^n(x) + c^2\int_{B_R} \nabla u(t,x)\cdot \nabla\partial_t u(t,x)\, d\mathcal{L}^n(x).
\end{align*}
Let $\nu_R : \partial B_R \to \mathbb{R}^n$ denote the outward unit normal field. Applying Green's first identity on $B_R$, namely the classical integration-by-parts formula on the smooth ball $B_R$, to the $C^1$ functions $x\mapsto u(t,x)$ and $x\mapsto \partial_tu(t,x)$ gives
\begin{align*}
E_R'(t) = \int_{B_R} \partial_t u(t,x)\left(\partial_t^2u(t,x)-c^2\Delta u(t,x)\right)\, d\mathcal{L}^n(x) + c^2\int_{\partial B_R} \partial_t u(t,x)\,\nabla u(t,x)\cdot\nu_R(x)\, d\mathcal{H}^{n-1}(x).
\end{align*}
The wave equation cancels the interior integral, so
\begin{align*}
E_R'(t) = c^2\int_{\partial B_R} \partial_t u(t,x)\,\nabla u(t,x)\cdot\nu_R(x)\, d\mathcal{H}^{n-1}(x).
\end{align*}
The global energy $E_u : [0,T]\to[0,\infty)$ is differentiable by the $L^2$-valued $C^1$ hypotheses from the first step, and its derivative is
\begin{align*}
E_u'(t) = \int_{\mathbb{R}^n} \partial_t u(t,x)\,\partial_t^2 u(t,x)\, d\mathcal{L}^n(x) + c^2\int_{\mathbb{R}^n} \nabla u(t,x)\cdot \nabla\partial_t u(t,x)\, d\mathcal{L}^n(x).
\end{align*}
We use the pointwise inequality
\begin{align*}
|ab|\leq \frac{a^2+b^2}{2}
\end{align*}
with $a=\partial_tu(t,x)$ and $b=\partial_t^2u(t,x)$, and the analogous vector inequality
\begin{align*}
|v\cdot w|\leq \frac{|v|^2+|w|^2}{2}
\end{align*}
with $v=\nabla u(t,x)$ and $w=\nabla\partial_tu(t,x)$. The $C^1$ Hilbert-space hypotheses imply that the functions $x\mapsto \partial_tu(t,x)\,\partial_t^2u(t,x)$ and $x\mapsto \nabla u(t,x)\cdot\nabla\partial_tu(t,x)$ belong to $L^1(\mathbb{R}^n)$. By the absolute continuity of the [Lebesgue integral](/page/Lebesgue%20Integral) applied to these two $L^1$ functions, the integrals over $B_R$ converge to the corresponding integrals over $\mathbb{R}^n$ as $R\to\infty$, and hence $E_R'(t)\to E_u'(t)$.
Let $\operatorname{supp}(f)$ denote the closure of the set where a function $f$ is nonzero. If $u(t,\cdot)$ has compact support, choose $R_0>0$ such that $\operatorname{supp}(u(t,\cdot))\subset B(0,R_0)$. Since the function $x\mapsto u(t,x)$ is $C^1$ and vanishes on the [open set](/page/Open%20Set) $\mathbb{R}^n\setminus \operatorname{supp}(u(t,\cdot))$, its spatial gradient satisfies $\nabla u(t,x)=0$ on $\mathbb{R}^n\setminus \operatorname{supp}(u(t,\cdot))$. Hence, for every $R>R_0$, the boundary flux integrand vanishes on $\partial B_R$, and the boundary integral is zero. Under the stated flux decay assumption, the boundary integral also tends to zero, since
\begin{align*}
\left|\int_{\partial B_R} \partial_t u(t,x)\,\nabla u(t,x)\cdot \nu_R(x)\, d\mathcal{H}^{n-1}(x)\right|\leq\int_{\partial B_R} |\partial_t u(t,x)|\,|\nabla u(t,x)|\, d\mathcal{H}^{n-1}(x).
\end{align*}
Therefore $E_u'(t)=0$ for every $t\in(0,T)$ in the whole-space case.
[guided]
The whole-space case cannot be integrated by parts directly over $\mathbb{R}^n$ without controlling the boundary at infinity. We therefore work on the finite ball $B_R:=B(0,R)$ and define
\begin{align*}
E_R : [0,T] \to [0,\infty), \qquad E_R(t)=\frac{1}{2}\int_{B_R}|\partial_tu(t,x)|^2\,d\mathcal{L}^n(x)+\frac{c^2}{2}\int_{B_R}|\nabla u(t,x)|^2\,d\mathcal{L}^n(x).
\end{align*}
Because $B_R$ is bounded and $u$ is $C^2$ on $[0,T]\times\overline{B_R}$, differentiating under the integral sign on $B_R$ gives
\begin{align*}
E_R'(t)=\int_{B_R}\partial_tu(t,x)\,\partial_t^2u(t,x)\,d\mathcal{L}^n(x)+c^2\int_{B_R}\nabla u(t,x)\cdot\nabla\partial_tu(t,x)\,d\mathcal{L}^n(x).
\end{align*}
Let $\nu_R:\partial B_R\to\mathbb{R}^n$ be the outward unit normal field. The classical Green first identity on the smooth ball $B_R$ converts the spatial-gradient term into an interior Laplacian term and a boundary flux term, so
\begin{align*}
E_R'(t)=\int_{B_R}\partial_tu(t,x)\left(\partial_t^2u(t,x)-c^2\Delta u(t,x)\right)\,d\mathcal{L}^n(x)+c^2\int_{\partial B_R}\partial_tu(t,x)\,\nabla u(t,x)\cdot\nu_R(x)\,d\mathcal{H}^{n-1}(x).
\end{align*}
The first integral vanishes because $u$ satisfies $\partial_t^2u-c^2\Delta u=0$ on $(0,T)\times\mathbb{R}^n$. Thus
\begin{align*}
E_R'(t)=c^2\int_{\partial B_R}\partial_tu(t,x)\,\nabla u(t,x)\cdot\nu_R(x)\,d\mathcal{H}^{n-1}(x).
\end{align*}
Now we pass from the truncated identity to the global one. The theorem assumes that $t\mapsto\partial_tu(t,\cdot)$ and $t\mapsto\nabla u(t,\cdot)$ are continuously differentiable in the relevant $L^2$ spaces, with derivatives $t\mapsto\partial_t^2u(t,\cdot)$ and $t\mapsto\nabla\partial_tu(t,\cdot)$. Therefore $E_u$ is differentiable and its derivative is the global $L^2$ inner-product formula. For the first product, use the pointwise inequality
\begin{align*}
|ab|\leq \frac{a^2+b^2}{2}
\end{align*}
with $a=\partial_tu(t,x)$ and $b=\partial_t^2u(t,x)$. This gives
\begin{align*}
\int_{\mathbb{R}^n}|\partial_tu(t,x)\,\partial_t^2u(t,x)|\,d\mathcal{L}^n(x)<\infty.
\end{align*}
For the vector product, use
\begin{align*}
|v\cdot w|\leq \frac{|v|^2+|w|^2}{2}
\end{align*}
with $v=\nabla u(t,x)$ and $w=\nabla\partial_tu(t,x)$. This gives
\begin{align*}
\int_{\mathbb{R}^n}|\nabla u(t,x)\cdot\nabla\partial_tu(t,x)|\,d\mathcal{L}^n(x)<\infty.
\end{align*}
Because these two integrands are in $L^1(\mathbb{R}^n)$, the absolute continuity of the Lebesgue integral implies that the tail integrals over $\mathbb{R}^n\setminus B_R$ tend to zero as $R\to\infty$. Therefore the integrals over $B_R$ converge to the corresponding integrals over $\mathbb{R}^n$, hence $E_R'(t)\to E_u'(t)$.
It remains to show that the boundary flux tends to zero. Here $\operatorname{supp}(f)$ denotes the closure of the set where $f$ is nonzero. If $u(t,\cdot)$ has compact support, choose $R_0>0$ such that $\operatorname{supp}(u(t,\cdot))\subset B(0,R_0)$. Since $x\mapsto u(t,x)$ is $C^1$ and vanishes on the open set $\mathbb{R}^n\setminus \operatorname{supp}(u(t,\cdot))$, we have $\nabla u(t,x)=0$ there. Thus, for every $R>R_0$, the boundary sphere $\partial B_R$ lies in the region where $\nabla u(t,\cdot)=0$, so the boundary integral is zero. Under the stated flux decay hypothesis, we instead estimate the absolute value of the flux by
\begin{align*}
\left|\int_{\partial B_R}\partial_tu(t,x)\,\nabla u(t,x)\cdot\nu_R(x)\,d\mathcal{H}^{n-1}(x)\right|\leq\int_{\partial B_R}|\partial_tu(t,x)|\,|\nabla u(t,x)|\,d\mathcal{H}^{n-1}(x),
\end{align*}
which tends to zero by assumption. Therefore $E_u'(t)=0$ for every $t\in(0,T)$ in the whole-space case.
[/guided]
[/step]
[step:Use the wave equation to cancel the interior terms in the bounded-domain case]
In the bounded-domain case, the preceding steps give
\begin{align*}
E_u'(t)=\int_U \partial_t u(t,x)\,\partial_t^2 u(t,x)\, d\mathcal{L}^n(x)-c^2\int_U \Delta u(t,x)\,\partial_t u(t,x)\, d\mathcal{L}^n(x).
\end{align*}
Combining the two integrals,
\begin{align*}
E_u'(t)=\int_U \partial_t u(t,x)\left(\partial_t^2 u(t,x)-c^2\Delta u(t,x)\right)\, d\mathcal{L}^n(x).
\end{align*}
The homogeneous wave equation states that
\begin{align*}
\partial_t^2 u(t,x)-c^2\Delta u(t,x)=0
\end{align*}
for every $(t,x)\in(0,T)\times U$. Hence
\begin{align*}
E_u'(t)=0
\end{align*}
for every $t\in(0,T)$ in the bounded-domain case. The whole-space case was already shown to satisfy the same identity in the preceding step.
[/step]
[step:Conclude that the energy is constant in time]
The Hilbert-space differentiability hypotheses used above imply that $E_u\in C^1([0,T])$. Let $\mathcal{L}^1$ denote one-dimensional [Lebesgue measure](/page/Lebesgue%20Measure) on $\mathbb{R}$. Since $E_u'(t)=0$ for every $t\in(0,T)$, continuity of $E_u'$ gives $E_u'(0)=E_u'(T)=0$ when the endpoint derivatives are interpreted one-sidedly. The one-dimensional [Fundamental Theorem of Calculus](/theorems/632) applied to the $C^1$ function $E_u : [0,T]\to[0,\infty)$ gives, for every $t\in[0,T]$,
\begin{align*}
E_u(t)-E_u(0)=\int_0^t E_u'(s)\, d\mathcal{L}^1(s)=0.
\end{align*}
Therefore
\begin{align*}
E_u(t)=E_u(0)
\end{align*}
for every $t\in[0,T]$, which is the claimed conservation of energy.
[/step]