3.1. 1D Heat equation


# Chapter 3. Heat equation in 1D

In this Chapter we consider 1-dimensional heat equation (also known as diffusion equation). Instead of more standard Fourier method (which we will postpone a bit) we will use the method of self-similar solutions.

## 3.1. 1D Heat equation

### Introduction

Heat equation which is in its simplest form $$u_t = ku_{xx} \label{eq-3.1.1}$$ is another classical equation of mathematical physics and it is very different from wave equation. This equation describes also a diffusion, so we sometimes will refer to it as diffusion equation. It also describes random walks (see Project "Random walks").

### Self-similar solutions

We want to solve IVP for equation (\ref{eq-3.1.1}) with $t>0$, $-\infty< x < \infty$. Let us plug $$u_{\alpha,\beta,\gamma}(x,t)=\gamma u(\alpha x, \beta t). \label{eq-3.1.2}$$

Proposition 1. If $u$ satisfy (\ref{eq-3.1.1}) then $u_{\alpha,\beta,\gamma}$ also satisfies (\ref{eq-3.1.1}) provided $\beta =\alpha^2$.

Proof is just by calculation. Note that $\beta=\alpha^2$ because one derivative with respect to $t$ is "worth" of two derivatives with respect to $x$.

We impose another assumption:

Condition 1. Total heat energy $$I(t):=\int_{-\infty}^\infty u(x,t)\, dx \label{eq-3.1.3}$$ is finite and does not depend on $t$.

The second part is due to the first one. Really (not rigorous) integrating (\ref{eq-3.1.1}) by $x$ from $-\infty$ to $+\infty$ and assuming that $u_x (\pm \infty)=0$ we see that $\partial_t I(t)=0$.

Note that $\int_{-\infty}^\infty u_{\alpha,\beta,\gamma} \,dx = \gamma |\alpha|^{-1} \int_{-\infty}^\infty u\,dx$ and to have them equal we should take $\gamma=|\alpha|$ (actually we restrict ourselves by $\alpha>0$). So (\ref{eq-3.1.2}) becomes $$u_{\alpha}(x,t)=\alpha u(\alpha x, \alpha^2 t). \label{eq-3.1.4}$$ This is transformation of similarity. Now we are looking for a self-similar solution of (\ref{eq-3.1.1}) i.e. solution such that $u_{\alpha}(x,t)=u(x,t)$ for all $\alpha>0, x, t>0$. So we want $$u(x,t)=\alpha u(\alpha x, \alpha^2 t)\qquad \forall \alpha>0, t>0, x. \label{eq-3.1.5}$$ We want to get rid off one of variables; so taking $\alpha = t^{-\frac{1}{2}}$ we get $$u(x,t)=t^{-\frac{1}{2}} u(t^{-\frac{1}{2}} x, 1) = t^{-\frac{1}{2}} \phi (t^{-\frac{1}{2}} x) \label{eq-3.1.6}$$ with $\phi (\xi ):= u(\xi, 1)$. Equality (\ref{eq-3.1.6}) is equivalent to (\ref{eq-3.1.5}).

Now we need to plug it into (\ref{eq-3.1.1}). Note that \begin{multline*} u_t = -\frac{1}{2} t^{-\frac{3}{2}}\phi (t^{-\frac{1}{2}}x) + t^{-\frac{1}{2}}\phi '(t^{-\frac{1}{2}}x)\times \bigl(-\frac{1}{2}t^{-\frac{3}{2}}x\bigr)= \\ -\frac{1}{2} t^{-\frac{3}{2}} \bigl( \phi (t^{-\frac{1}{2}}x) + t^{-\frac{1}{2}}x \phi' (t^{-\frac{1}{2}}x)\bigr) \end{multline*} and \begin{equation*} u_x = t^{-1}\phi ' (t^{-\frac{1}{2}}x), \qquad u_{xx} = t^{-\frac{3}{2}}\phi '' (t^{-\frac{1}{2}}x) \end{equation*} and after multiplication by $t^{\frac{3}{2}}$ and plugging $t^{-\frac{1}{2}}x=\xi$ we arrive to $$-\frac{1}{2} \bigl( \phi (\xi) + \xi \phi '(\xi )\bigr)= k\phi '' (\xi). \label{eq-3.1.7}$$ Good news: it is ODE. Really good news: $\phi (\xi) + \xi \phi '(\xi )= \bigl( \xi\phi(\xi)\bigr)'$. Then integrating we get $$-\frac{1}{2} \xi \phi (\xi)= k\phi ' (\xi). \label{eq-3.1.8}$$

Remark 1. Sure there should be $+C$ but we are looking for a solution fast decaying with its derivatives at $\infty$ and it implies that $C=0$.

Separating in (\ref{eq-3.1.8}) variables and integrating we get \begin{equation*} \frac{d\phi}{\phi}= -\frac{1}{2k}\xi d\xi \implies \log \phi = -\frac{1}{4k}\xi^2+\log c\implies \phi(\xi)= ce^{-\frac{1}{4k}\xi^2} \end{equation*} and plugging into (\ref{eq-3.1.6}) we arrive to $$u(x,t)= \frac{1}{2\sqrt {\pi kt}} e^{-\frac{x^2}{4kt}}. \label{eq-3.1.9}$$

Remark 2. We took $c=\frac{1}{2\sqrt {\pi k}}$ to satisfy $I(t)=1$. Really, \begin{equation*} I(t)=c\int_{-\infty}^{+\infty} t^{-\frac{1}{2}} e^{-\frac{x^2}{4kt}}\,dx = c\sqrt{4k}\int_{-\infty}^{+\infty} e^{-z^2}\,dz= 2c\sqrt{k\pi} \end{equation*} where we changed variable $x=z/\sqrt{2kt}$ and used the equality $$J= \int_{-\infty}^{+\infty} e^{-x^2}\,dx=\sqrt{\pi}. \label{eq-3.1.10}$$ To prove (\ref{eq-3.1.10}) just note that \begin{equation*} J^2= \int_{-\infty}^{+\infty} \int_{-\infty}^{+\infty}\ e^{-x^2}\times e^{-y^2}\,dxdy= \int_0^{2\pi} d\theta \int_0^\infty e^{-r^2}rdr =\pi \end{equation*} where we used polar coordinates; since $J>0$ we get (\ref{eq-3.1.10}).

Remark 3. Solution which we got is a very important one. However we have a problem understanding what is $u|_{t=+0}$ as $u(x,t)\to 0$ as $t\to +0$ and $x\ne 0$ but $u(x,t)\to \infty$ as $t\to +0$ and $x= 0$ and $\int_{-\infty}^\infty u(x,t)\,dx=1$. In fact $u|_{t=+0}=\delta(x)$ which is Dirac $\delta$-function which actually is not an ordinary function but a distribution.

To work around this problem we consider $$U(x,t)=\int_{-\infty}^x u(x,t)\,dx. \label{eq-3.1.11}$$

We claim that

Proposition 2.

1. $U(x,t)$ also satisfies (\ref{eq-3.1.1}).
2. U(x,0)=\theta(x)=\left\{\begin{aligned} &0 \qquad &&x<0,\\ &1 && x>0. \end{aligned}\right.

Proof. Plugging $u=U_x$ into (\ref{eq-3.1.1}) we see that $(U_t-kU_{xx})_x=0$ and then $(U_t-kU_{xx})=\Phi(t)$. However one can see easily that as $x\to -\infty\$ $U$ is fast decaying with all its derivatives and therefore $\Phi(t)=0$ and (a) is proven.

Note that $$U(x,t)=\frac{1}{\sqrt{4\pi }} \int_{-\infty}^{\frac{x}{\sqrt{4kt}}} e^{- z^2}\,dz=: \frac{1}{2}+\frac{1}{2}\erf \bigl(\frac{x}{\sqrt{4kt}}\bigr) \label{eq-3.1.12}$$ with $$\erf(z):= \frac{2}{\sqrt{\pi}}\int_0^z e^{-z^2}\,dz \label{Erf}\tag{erf}$$ and that an upper limit in integral tends to $\mp \infty$ as $t\to+0$ and $x\lessgtr 0$. Then since an integrand is very fast decaying at $\mp \infty$ we using (\ref{eq-3.1.10}) arrive to (b).

Remark 4.

1. One can construct $U(x,t)$ as a self-similar solution albeit with $\gamma=1$.
2. We can avoid analysis of $U(x,t)$ completely just by noting that $u(x,t)$ is a $\delta$-sequence as $t\to +0$: $u(x,t)\to 0$ for all $x\ne 0$ but $\int_{-\infty}^\infty u(x,t)\,dx=1$.

Consider now a smooth function $g(x)$, $g(-\infty)=0$ and note that $$g(x)=\int _{-\infty}^\infty \theta (x-y) g'(y)\,dy. \label{eq-3.1.13}$$ Really, the r.h.e. is $\int_{-\infty}^x g'(y)\,dy=g(x)-g(-\infty)$.

Also note that $U(x-y,t)$ solves the IVP with initial condition $U(x-y,+0)=\theta (x-y)$. Therefore $u(x,t)=\int _{-\infty}^\infty U (x-y,t) g'(y)\,dy$ solves the IVP with initial condition $u(x,+0)=g(y)$. Integrating by parts with respect to $y$ we arrive to $u(x,t)=\int _{-\infty}^\infty U_x (x-y,t) g(y)\,dy$ and finally to $$u(x,t)=\frac{1}{2\sqrt{k\pi t}}\int _{-\infty}^\infty e^{-\frac{(x-y)^2}{4kt}} g(y)\,dy. \label{eq-3.1.14}$$

So we have proven:

Proposition 3. Formula (\ref{eq-3.1.14}) gives us a solution of \begin{align} &u_t = ku_{xx}\qquad &&-\infty <x< \infty, t>0, \label{eq-3.1.15}\\ &u|_{t=0}=g(x). \label{eq-3.1.16} \end{align}

Remark 5. We will recreate the same formulae later using Fourier transform.

### References

-

$\erf(x)$ and its derivative original and scaled