# Prove $\int_\Omega u(t,x) dx = \int_\Omega g(x) dx$ for diffusion equation using energy functional

Let $\Omega$ be an open and bounded subset of $\mathbb{R}^n$ with a $C^1$ boundary. Let $u=u(t, x)$ be the solution to the following diffusion problem: $$\left\{\begin{matrix} \frac{\partial u}{\partial t}(t, x) = \Delta_x u(t, x), & x \in \Omega, t > 0\\ \frac{\partial u}{\partial \mathbf{n}} (t, x) = 0, & x \in \partial \Omega, t > 0\\ u(0, x) = g(x), & x \in \Omega \end{matrix}\right.$$ Show that, for any $t > 0$: $$\int_\Omega u(t,x) dx = \int_\Omega g(x) dx$$

I have problems understanding the following reasoning:

Consider an arbitrary $t>0$. Then $$\int_\Omega \Delta_x u(t, x) dx = \int_\Omega \frac{\partial u}{\partial t}(t, x) dx = \frac{\partial}{\partial t}\int_\Omega u(t, x) dx = E'(t)$$

So if I define the energy functional as $$E(t) = \int_\Omega u(t, x) dx$$

then $$E(0) = \int_\Omega u(0, x) dx = \int_\Omega g(x) dx$$

How do I follow from this that $E$ is constant and therefore those two integrals are equal?

I feel like I'm missing the whole point of energy methods.

Edit:

I suppose that since the integrand $\int_\Omega \Delta_x u(t, x) dx$ depends only on $x$ for a given $t$, then I could the Green's formula and thus $\int_\Omega \Delta_x u(t, x) dx = \int_{\partial \Omega} \frac{\partial u}{\partial \mathbf{n}} (t, x) = 0$, meaning that $E'(t) = 0$ for all $t>0$?

• Can you compute $\frac{d}{dt}E(t)=0$ by differentiating under the integral and then using Stokes' theorem? Of course, you'd need to justify the interchange as well. Jan 24, 2018 at 1:08

You can differentiate in $t$ to show the energy is constant, just like with any differentiable function (note that $u$ is sufficiently smooth so we may differentiate under the integral sign freely).
Indeed, for any $t>0$ $$E'(t)\stackrel{\text{differentiate under the integral sign}}{=}\int_{\Omega}u_t(t,x)\;\mathrm dx\\ \stackrel{x\in \Omega\implies u_t-\Delta_x u=0}{=}\int_{\Omega}-\Delta_x u\;\mathrm dx\\ \stackrel{\text{Divergence Theorem}}{=}\int_{\partial \Omega}-\nabla_xu\cdot \vec{n}\;\mathrm ds=0$$ by the boundary condition. Smoothness of the boundary was used for the Divergence theorem.
So for any $t>0$ we have $E(t)=E(0)=\int_\Omega g(x)\;\mathrm dx$ as we had hoped.