Wave Equation, Energy methods. I am reading the book of Evans, Partial differential Equations ... wave equation section 2.4; subsection 2.4.3: Energy methods. Arriving at the theorem:
Theorem 5 (Uniqueness for wave equation). There exists at most one function $u \in C^{2}(\overline{U}_{T})$ solving 
$u_{tt} -\Delta u=f $ in $ U_{T}$
$u=g $ on $ \Gamma_{T}$
$u_{t}=h$ on $U \times \{t=0\}.$  
Proof. If $\tilde{u}$ is another such solution, then $ w:=u-\tilde{u}$ solves 
$w_{tt} -\Delta w=0 $ in $ U_{T}$
$w=0 $ on $ \Gamma_{T}$
$w_{t}=0$ on $U \times \{t=0\}.$ 
Define the "energy" 
$e(t):=\frac{1}{2} \int_{U} w^{2}_{t}(x,t)+ \mid Dw(x,t)\mid ^{2} dx (0\leq t \leq T).$ 
We compute 
$\dot{e}(t)=\int_{U} w_{t}w_{tt}+ Dw \cdot Dw_{t}dx (\cdot = \frac{d}{dt})$ 
$=\int_{U}w_{t}(w_{tt} - \Delta w)dx=0$. 
There is no boundary term since $w=0$, and hence $w_{t}=0$, on $\partial U \times [0,T].$ Thus for all $0\leq t \leq T, e(t)= e(0)=0$, and so $w_{t}, Dw \equiv 0$ within $U_{T}$. Since $w \equiv 0$ on$ U \times \{t=0\}$, we conclude $w=u-\tilde {u}\equiv 0$ in $U_{T}$. 
I have two questions:
1) What is the motivation for the definition of $e(t)$
2)$\int_{U} w_{t}w_{tt}+ Dw \cdot Dw_{t}dx $ 
$=\int_{U}w_{t}(w_{tt} - \Delta w)dx$. How to justify this equality? 
Thank very much.
 A: From comments of Yimin, more-or-less:
2) Integrate by parts. See Appendix C, theorem 3, part (ii) in Evans. Note that the boundary term vanishes due to the assumptions.
1) Energy, in PDE, often means (the integral of) a quantity you can minimise in order to solve the equation in question, by which I mean that the function that minimises the energy also solves the PDE. This often corresponds to energy as it is used in physics.
A: This quantity, the definition of $e(t)$, can be easily recognized as the Hamiltonian (basically another name of energy) of the system by a physics student. Let's explore more details.
The PDE $w_{tt}-\Delta w=0$ is equivalent to a variation problem (under some boundary conditions, maybe), whose Lagrangian (or Lagrangian density) is
$$
\mathcal L = \frac{1}{2}(w_t^2-(\nabla w)\cdot(\nabla w))
$$
There is a standard process obtaining the Hamiltonian from the Lagrangian. First, calculate the canonical momentum $\pi$:
$$
\pi = \frac{\partial \mathcal L}{\partial w_t}=w_t.
$$
Then use the Legendre transformation:
$$
\mathcal H = \pi w_t - \mathcal L = \frac{1}{2} (w_t^2+(\nabla w)^2),
$$
which is the integrand in the definition of $e(t)$. This is actually the Hamitonian density and should be integrated over space to give the total energy.

P.S.
As a somewhat more complicated case, consider the following equation:
$$
u_{tt} - \nabla \cdot (c^2(x) \nabla u)+q(x)u = 0
$$
with some appropriate boundary conditions and initial conditions imposed. The two given functions $c,q\ge 0$ and depend on $x$ only. You can check that the Lagrangian is
$$
\mathcal L = \frac{1}{2}(u_t^2 - c^2 (\nabla u)^2-qu^2),
$$
which gives the Hamiltonian
$$
\mathcal H = \frac{1}{2} (u_t^2+c^2(\nabla u)^2+qu^2)
$$
