# Showing Energy is Conserved with Neumann and Dirichlet Boundary Conditions

I have a question, and was wondering if anyone could help. The question reads:

We have the two PDE with Neumann and Dirichlet Boundary Conditions: $$\begin{cases} u_{tt} &= c^2 u_{xx} \>\>\>\> 0\leq x\leq L\\ u(x,0) &= \phi(x), \>\>\>\> u_t(x,0) = \psi(x)\\ u(0,t) &= 0, \>\>\>\> u(L,t)=0, t>0 \end{cases}$$ $$\begin{cases} u_{tt} &= c^2 u_{xx} \>\>\>\> 0\leq x\leq L\\ u(x,0) &= \phi(x), \>\>\>\> u_t(x,0) = \psi(x)\\ u_x(0,t) &= 0, \>\>\>\> u_x(L,t)=0, t>0 \end{cases}$$ Where the top is Dirichlet and bottom is Neumann. Show that both problems conserve energy. Why is this reasonable?

Now I know how to show the Wave Equation conserves energy in general. Do I assume that there are two solutions $u_1, u_2$ to each PDE, set $w=u_1-u_2$ and then create another PDE (for example using Neumann: $$\begin{cases} w_{tt} &= c^2 w_{xx} \>\>\>\> 0\leq x\leq L\\ w(x,0) &= 0, \>\>\>\> w_t(x,0) = 0\\ w_x(0,t) &= 0, \>\>\>\> w_x(L,t)=0, t>0 \end{cases}$$ Then the Total Energy is given by: $$\frac{1}{2}\int_0^L(w_t^2+c^2 w_x^2)dx$$ Which leads to: $$E'(t) = \int_0^L w_t\cdot w_{tt}+c^2 w_x\cdot w_{xt} dx$$ Which simpifies to: $$E'(t) = c^2(w_xw_t)|_0^L$$ And then show using $w$ that $E'(t)=0$? The part that confuses me is that can't I use the exact same method for both of these boundary conditions? Why are there are two separate parts to this question when in reality we are doing the exact same thing to both of them? Or do the Auxiliary Conditions change the way we prove this?

## 1 Answer

The difference is in how you prove that $E'(t) = c^2(w_xw_t)|_0^L$ is zero. In the case of the Dirichlet problem, you can use the fact that $w_t=0$ at x values of 0 and L whereas in the case of the Neumann problem, you can use the fact that $w_x=0$ at x values of 0 and L.

edit: Merged answers

Btw, I just noticed that there is an error in the logic you have used to make the proof. You need to show that $E(u)$ is conserved, i.e. $E'(u)=0$. What you have shown $E'(w)=0$ is that $w\equiv 0$ on the domain (used to prove the uniqueness of the solution). But the right argument also ends along similar lines.

Correcting the argument listed along with the question (proving it for $u$, not $w$). The Total Energy is given by: $$\frac{1}{2}\int_0^L(u_t^2+c^2 u_x^2)dx$$ Which leads to: $$E'(t) = \int_0^L u_tu_{tt}+c^2 u_x u_{xt} dx$$ Using integration by parts $$=\int_0^L u_t\left(u_{tt}-c^2u_{xx}\right) dx + c^2(u_xu_t)|_0^L$$ Now is when you would use the boundary condition to see that the last term is zero (as discussed earlier, true in either case, Dirichlet or Neumann) and also the integral itself is zero because $u$ satisfies the wave equation. Then you get $$E'(t) = 0$$