How to show conservation of mass for the heat equation?

I have a question about a property of the solutions to the heat equation. Let $$u(t,x)$$ be a solution to the (one-space dimension) heat equation $$u_t = u_{xx}.$$ Is it true that $$\int_{\mathbb{R}}u(t,x) \mathrm{d}x$$ is constant with respect to $$t$$? That is, I want to verify (and find a reference) for the following equation:

$$\frac{\mathrm{d}}{\mathrm{d}t}\int_{\mathbb{R}}u(t,x) \mathrm{d}x = 0.$$ Where can I find a reference for this fact? In addition, do we have to assume $$u(0,\cdot) \in L^1(\mathbb{R})$$ for the above to hold? Or is it true even if the initial condition is not integrable? Many thanks!

Edit: I understand why conservation of mass holds under some conditions specified in an answer below. I still looking for a reference for this statement (I only found it in some private lecture notes, but not in any books or papers). I also want to know whether it is true even if the initial condition satisfies $$\int_{\mathbb{R}}u(0,x)\mathrm{d}x = \infty$$.

• conversation (blah blah...) $\to$ conservation... Commented Jun 11 at 12:24

I would say, to get a reasonable globale notion of total heat $$W(t):=\int_{\mathbb{R}^N} u(t, x) d x\quad W(0)=\int_{\mathbb{R}^N} g(x) d x \quad g\in L^1(\mathbb{R}^n)$$ you want to assume $$g\in L^1(\mathbb{R}^n)$$. Additionally, since you want to differentiate a parameter integral $$W(t)$$, having following conditions met will be sufficient to change integration and differentiation:

(i) $$u(t, \cdot)$$ is $$L^1(\mathbb{R}^n)$$ for every $$t \in (0,\infty)$$;

(ii) The $$\frac{d}{dt} u(t, x)$$ exists in $$(0,\infty)$$ and for $$\lambda$$-almost all $$x \in \mathbb{R}^n$$;

(iii) $$\exists h \in L^1(\mathbb{R}^n)$$, such that for all $$t \in (0,\infty)$$ there exist $$\lambda$$-nullset $$N_t$$ with $$\left|\frac{\partial u}{\partial t}(t, x)\right| \leq h(x) \quad \forall x \in \mathbb{R}^n \backslash N_t .$$

So at least in the cases, where your solution $$u$$ meets these conditions and $$u$$, $$\nabla u$$ additionally have sufficient (uniform) decay properties (which depends on your data function), you can simply see for the total heat via divergence theorem

\begin{aligned} \frac{d}{d t} W(t)=\int_{\mathbb{R}^N} u_t(t, x) d x & =\int_{\mathbb{R}^N} \Delta u(t, x) d x=\lim _{R \rightarrow \infty} \int_{B_R(0)} \Delta u(t, x) d x \\ & =\lim _{R \rightarrow \infty} \int_{S_R(0)} u_{\nu_x}(t, x) d x=0 \quad \text { für } t>0 . \end{aligned} Thus $$W(t)=W(0)$$

New contributor
xajas is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
• Thank you! I have 2 questions: 1. Is there a reference of the claim you stated? I've looked through about 4 books on PDEs and couldn't find this fact mentioned, not even as a problem/exercise. 2. I deal with a case where the initial condition is not integrable. I get that your reasoning doesn't work here, but the result fails here as well? Is there a counter example where you start with an infinite mass that becomes in a finite time? Commented Jun 11 at 13:23
• 1. Had it in a PDE lecture. 2. So in case you have an initial value problem, but your data function is not integrable, then i think it’s not clear how to get a notion of total heat, which one would naturally conceptualise by simply taking the integral of the solution for fixed time $t$, and in case for $t=0$, the initial data over the given integration domain. Do you have more context?:) Commented Jun 11 at 16:00
• I mean, what happens if $u(t,x)$ is a solution to the heat equation, where $\int_{\mathbb{R}}u(0,x)dx=\infty$ Commented Jun 11 at 21:31