Question:
Suppose that $u(x,t)$ is continuous, together with its first and second partial derivatives; suppose that $u$ and its first partial derivatives are periodic in $x$ of period $1,$ and suppose that $u_{tt}=u_{xx}.$ Prove that $$E(t)=\frac{1}{2}\int_0^1\left(u_t^2(x,t)+u_x^2(x,t)\right)\text{d}x$$ is a constant, independent of $t.$
Here is my solution:
Since $u(x,t)$ and its $t-$partial derivative is continuous, we can differentiate as follows. \begin{equation} \begin{aligned} E'(t)&=\frac{1}{2}\int_0^12u_tu_{tt}+2u_xu_{xt}\text{d}x\\ &=\int_0^1u_tu_{xx}+u_xu_{xt}\text{d}x\\ &=u_xu_t\bigg|^1_0-\int_0^1u_xu_{tx}\text{d}x+u_tu_x\bigg|_0^1-\int_0^1u_tu_{xx}\text{d}x\\ &=-\int_0^1u_xu_{tx}\text{d}x-\int_0^1u_tu_{xx}\text{d}x \end{aligned} \end{equation} Combining the first and third line from the bottom to see that $$E'(t)=0\quad \forall t.$$ And thus $E(t)$ is a constant.
Then I just realised that I haven't used the periodic condition. Was I wrong somewhere?
You have implicitly used the periodicity conditions to conclude that \begin{equation} \begin{aligned} u_xu_t\bigg|^1_0 = u_tu_x\bigg|_0^1 = 0 \end{aligned} \end{equation} From the second to the third line.