Let $u$ solve the initial-value problem or the wave equation in one dimension: $$\begin{cases}u_{tt}-u_{xx}=0 & \text{in } \mathbb{R} \times (0,\infty) \\ u = g, u_t = h & \text{on } \mathbb{R} \times \{t=0\}. \end{cases}$$ Suppose $g,h$ have compact support. The kinetic energy is $k(t) := \frac 12 \int_{-\infty}^\infty u_t^2(x,t) \, dx$ and the potential energy is $p(t) := \frac 12 \int_{-\infty}^\infty u_x^2(x,t) \, dx$. Prove
(a) $k(t)+p(t)$ is constant in $t$,
(b) $k(t)=p(t)$ for all large enough times $t$.
This is Chapter 2, Exercise 24 of PDE Evans, 2nd edition.
I am only doing part (a) right now; my work is shown below:
Define $$e(t):=k(t)+p(t)=\int_{-\infty}^\infty u_t^2+u_x^2 \, dx.$$ Then $$e'(t)=\frac 12 \int_{-\infty}^\infty 2u_tu_{tt}+2u_{x}u_{xt} \, dx= \int_{-\infty}^\infty u_tu_{tt}+u_{x}u_{xt} \, dx.$$
Now, I want to get $e'(t)=0$ so that $e(t)$ is constant. How can I go about doing this? I do know that I can use $u_{tt}-u_{xx}=0$, if $t > 0$.
With $t>0$ into mind, do I have to consider the $t=0$ case separately? Or can I treat both cases together as $t \ge 0$, since $g$ and $h$ have compact support?