I'm trying to understand the answer given here in detail. In particular, I have the problem:
\begin{cases} u_{tt} - u_{xx} &= 0 \ \ & \text{for} \ -\infty < x < \infty, \ 0 \leq t < \infty\\ u(x,0) &= \phi(x) \ \ & \text{for} \ -\infty < x < \infty\\ u_t(x,0) &= \psi(x) \ \ & \text{for} \ -\infty < x < \infty\\ \end{cases}
And I am trying to show that, for kinetic energey $KE = \frac{1}{2}\int_{-\infty}^{\infty} u_t^{2} dx$ and potential energy $PE = \frac{1}{2} \int_{-\infty}^{\infty} u_x^{2} dx$
$KE + PE$ is constant.
I tried to follow the answer linked above and get a similar, but wrong result:
$ \begin{equation} \frac{d}{d t}(Et) = \frac{d}{d t} \frac{1}{2} \int_{-\infty}^\infty u_t^2 + u_x^2 d x \\ = \frac{1}{2} \int_{-\infty}^\infty \frac{d}{d t} \left( u_t^2 + u_x^2 \right) d x \\ = \frac{1}{2} \int_{-\infty}^\infty 2 u_t u_{tt} + 2 u_x u_{xt} d x \\ = \int_{-\infty}^\infty u_t u_{tt} + u_x u_{xt} d x \\ = \int_{-\infty}^\infty u_t u_{tt} d x + \int_{-\infty}^\infty u_x u_{xt} d x \\ \stackrel{(1)}{=} \int_{-\infty}^\infty u_t u_{tt} d x + u_x u_t - \int_{-\infty}^\infty u_t u_{xx} d x \\ = \int_{-\infty}^\infty u_t u_{tt} - u_t u_{xx} d x + u_x u_t \\ = \int_{-\infty}^\infty u_t (u_{tt} - u_{xx}) d x + u_x u_t \\ = \int_{-\infty}^\infty u_t \cdot 0 d x + u_x u_t \\ = u_x u_t \\ \end{equation}$
Where I use partial integration in the step marked by 1, using $u_x$ as u and $u_{tx}$ as $v'$
Now, I should have gotten 0 in total, but there's a term remaining and I can't see why it should be 0 or how I could get rid of it otherwise.