Heat Equation - Energy (Neumann Condition)

Solution 1:

$E(t)$ is indeed non-constant: e.g.

$$ u(x, t) = \exp \left(-\frac{\pi^2t}{L^2} \right) \cos \left( \frac{\pi x}{L}\right)$$

satisfies the heat equation $u_t = u_{xx}$ and $$ u_x ( 0, t) = u_x (L, t) = 0,$$ but

$$E(t) = \int_0^L u^2(x, t)dx = \exp \left(-\frac{2\pi^2t}{L^2} \right)\int_0^L \cos ^2\left( \frac{\pi x}{L}\right) dx $$

is not constant in $t$. What you can show is only that $E(t)$ is non-increasing (as you did).