3.2. Heat equation (Miscellaneous)

$\renewcommand{\Re}{\operatorname{Re}}$ $\renewcommand{\Im}{\operatorname{Im}}$ $\newcommand{\erf}{\operatorname{erf}}$ $\newcommand{\dag}{\dagger}$ $\newcommand{\const}{\mathrm{const}}$ $\newcommand{\arcsinh}{\operatorname{arcsinh}}$

3.2. Heat Equation (Miscellaneous)

  1. 1D Heat equation on half-line
  2. Inhomogeneous boundary conditions
  3. Inhomogeneous right-hand expression
  4. Multidimensional heat equation
  5. Maximum principle
  6. References

Heat equation on half-line

In the previous section we considered heat equation \begin{equation} u_t=ku_{xx} \label{eq-3.2.1} \end{equation} with $x\in \mathbb{R}$ and $t>0$ and derived formula \begin{equation} u(x,t)=\int _{-\infty}^\infty G(x,y,t) g(y)\,dy. \label{eq-3.2.2} \end{equation} with \begin{equation} G(x,y,t)=G_0(x-y,t):= \frac{1}{2\sqrt{k\pi t}}e^{-\frac{(x-y)^2}{4kt}} \label{eq-3.2.3} \end{equation} for solution of IVP $u|_{t=0}=g(x)$.

Recall that $G(x,y,t)$ quickly decays as $|x-y|\to \infty$ and it tends to $0$ as $t\to 0^+$ for $x\ne y$, but $\int_{-\infty}^\infty G(x,y,t)\,dy=1$.

Consider the same equation (\ref{eq-3.2.1}) on half-line with the homogeneous Dirichlet or Neumann boundary condition at $x=0$: the method of continuation \begin{align} &u_D|_{x=0}=0,\tag{D}\label{eq-3.2.D}\\[3pt] &u_{N\,x}|_{x=0}=0\tag{N}.\label{eq-3.2.N} \end{align} The method of continuation (see Subsection 2.6.3 works.

Indeed, coefficients do not depend on $x$ and equation contains only even order derivatives with respect to $x$. Recall that continuation is even under Neumann condition and odd under Dirichlet condition.

Then we arrive to solutions in a form similar to (\ref{eq-3.2.2}) \begin{gather*} u(x,t)=\int_{0}^\infty G(x,y,t) g(y)\,dy \tag{2} \end{gather*} but with different function $G(x,y)$ and domain of integration $[0,\infty)$: \begin{align} &G=G_D(x,y,t)=G_0(x-y,t)-G_0(x+y,t),\label{eq-3.2.4}\\[3pt] &G=G_N (x,y,t)=G_0(x-y,t)+G_0(x+y,t)\label{eq-3.2.5} \end{align} for (\ref{eq-3.2.D}) and (\ref{eq-3.2.N}) respectively.

Both these functions satisfy equation (\ref{eq-3.2.1}) with respect to $(x,t)$ and corresponding boundary condition \begin{align} &G_D|_{x=0}=0,\label{eq-3.2.6}\\[3pt] &G_{N\,x}|_{x=0}=0.\label{eq-3.2.7} \end{align} Both $G_D(x,y,t)$ and $G_N(x,y,t)$ tend to $0$ as $t\to 0^+$, $x\ne y$ \begin{align} &\int_0^\infty G_D(x,y,t)\,dy\to 1 \qquad \text{as }t\to 0^+,\label{eq-3.2.8}\\[3pt] &\int_0^\infty G_N(x,y,t)\,dx= 1.\label{eq-3.2.9} \end{align} Further, \begin{equation} G(x,y,t)=G(y,x,t) \label{eq-3.2.10} \end{equation}

Exercise 1

  1. Prove (\ref{eq-3.2.8}) and (\ref{eq-3.2.9}). Explain the difference.
  2. Prove (\ref{eq-3.2.10}).

Inhomogeneous boundary conditions

Consider now inhomogeneous boundary conditions (one of them) \begin{align} &u_D|_{x=0}=p(t),\label{eq-3.2.11}\\[3pt] &u_{N\,x}|_{x=0}=q(t).\label{eq-3.2.12} \end{align} Consider \begin{equation*} 0=\iint_\Pi G(x,y,t-\tau) \bigl(-u_{\tau}(y,\tau)+ku_{yy}(y,\tau)\bigr)\,d\tau dy \end{equation*} with $\Pi:= \Pi_\epsilon = \{x>0,\ 0< \tau < t-\epsilon \}$. Integrating by parts with respect to $\tau$ in the first term and twice with respect to $y$ in the second one we get \begin{align*} 0=&\iint_\Pi \Bigl( -G_t (x,y,t-\tau) + k G_{yy}(x,y,t-\tau)\Bigr)u(y,\tau)\,d\tau dy\\ -& \int_0^\infty G (x,y,\epsilon) u(y,t-\epsilon)\, dy + \int _0^\infty G (x,y,t) u(y,0)\, dy \\ +& k \int_0^{t-\epsilon} \bigl( -G(x,y,t-\tau)u_y(y,\tau) + G_y(x,y,t-\tau)u(y,\tau)\bigr)_{y=0}\,d\tau. \end{align*} Note that, since $G(x,y,t)$ satisfies (\ref{eq-3.2.1}) not only with respect to $(x,t)$ but also with respect to $(y,t)$ as well due to symmetry (\ref{eq-3.2.10}), the first line is $0$.

In the second line the first term tends to $-u(x,t)$ as $\epsilon\to 0^+$ because of properties of $G(x,y,t)$. Indeed, $G(x,y,\tau)$ tends everywhere but for $x=y$ to $0$ as $\tau\to 0^+$ and its integral from $0$ to $\infty$ tends to $1$.

So we get \begin{multline} u(x,t)=\int_0^\infty G(x,y,t)\underbrace{u(y,0)}_{=g(y)}\,dy+\\ k\int_0^{t} \Bigl[ -G(x,y,t-\tau)u_y(y,\tau) + G_y(x,y,t-\tau)u(y,\tau)\Bigr]_{y=0}\,d\tau. \qquad \label{eq-3.2.13} \end{multline} The first line in the r.h.e. gives us solution of the IBVP with $0$ boundary condition. Let us consider the second line.

In the case of Dirichlet boundary condition $G(x,y,t)=0$ as $y=0$ and therefore we get here \begin{equation*} k \int_0^{t} G_y(x,0,t-\tau)\underbrace{u(0,\tau)}_{=p(\tau)}\,d\tau. \end{equation*} In the case of Neumann boundary condition $G_y(x,y,t)=0$ as $y=0$ and therefore we get here \begin{equation*} -k \int_0^{t} G(x,0,t-\tau)\underbrace{u(0,\tau)}_{=q(\tau)}\,d\tau. \end{equation*} So, (\ref{eq-3.2.13}) becomes \begin{equation} u_D(x,t)=\int_0^\infty G_D(x,y,t)g(y)\,dy+k \int_0^{t} G_{D\,y}(x,0,t-\tau)p(\tau) \,d\tau; \qquad \label{eq-3.2.14} \end{equation} and \begin{equation} u_N(x,t)=\int_0^\infty G_N(x,y,t)g(y)\,dy- k \int_0^{t} G_{N}(x,0,t-\tau)q(\tau) \,d\tau.\qquad \label{eq-3.2.15} \end{equation}

image image

Plots of $G_{D}(x,y,t)$ and $G_{N}(x,y,t)$ as $y=0$ (for some values of $t$)

Remark 1.

  1. If we consider a half-line $(-\infty,0)$ rather than $(0,\infty)$ then the same terms appear on the right end ($x=0$) albeit with the opposite sign.
  2. If we consider a finite interval $(a,b)$ then there will be contributions from both ends.
  3. If we consider Robin boundary condition $(u_x-\alpha u)|_{x=0}=q(t)$ then formula (\ref{eq-3.2.15}) would work but $G$ should satisfy the same Robin condition and we cannot construct $G$ by the method of continuation.
  4. This proof (which also works for the Cauchy problem) shows that integral formulae give us the unique solution satisfying condition \begin{gather*} |u(x,t)|\le C_\epsilon e^{\epsilon |x|^2}\qquad \forall t>0, x , \ \forall \epsilon >0 \end{gather*} provided $g(x )$ satisfies the same condition. This is much weaker assumption than $\max |u|<\infty$.

Visual examples (animation)

Inhomogeneous right-hand expression

Consider equation \begin{equation} u_t-ku_{xx}=f(x,t). \label{eq-3.2.16} \end{equation} Either by Duhamel principle applied to the problem (\ref{eq-3.2.2})--(\ref{eq-3.2.3}) or by the method of continuation applied to 3.1.20 we arrive to

Theorem 1. Solution of (\ref{eq-3.2.16}), (\ref{eq-3.2.3}) with homogeneous Dirichlet or Neumann boundary condition at $x=0$ is given by \begin{equation} u(x,t)= \int_0^t \int_0^\infty G(x,y,t-\tau) f(y,\tau)\,dyd\tau+ \int _0^\infty G(x,y,t) g(y)\,dy \label{eq-3.2.17} \end{equation} with $G(x,y,t)$ given by (\ref{eq-3.2.4}) or (\ref{eq-3.2.5}) correspondingly.

Remark 2. Inhomogeneous boundary conditions could be also incorporated as in (\ref{eq-3.2.13}).

Multidimensional heat equation

Now we claim that for 2D and 3D heat equations \begin{align} &u_t=k\bigl(u_{xx}+u_{yy}\bigr), \label{eq-3.2.18}\\ &u_t=k\bigl(u_{xx}+u_{yy}+u_{zz}\bigr), \label{eq-3.2.19} \end{align} similar formulae hold: \begin{align} &u=\iint G_2 (x,y;x',y';t) g(x',y')\,dx'dy', \label{eq-3.2.20}\\ &u=\iiint G_3 (x,y,z;x',y',z';t) g(x',y',z')\,dx'dy'dz' \label{eq-3.2.21} \end{align} with \begin{align} &G_2 (x,y;x',y';t) =&& G_1(x,x',t)G_1(y,y',t), \label{eq-3.2.22}\\ &G_3 (x,y,z;x',y',z';t) =&& G_1(x,x',t)G_1(y,y',t)G_1(z,z',t); \label{eq-3.2.23} \end{align} in particular for the whole $\mathbb{R}^n$ \begin{align} &G_n (\mathbf{x},\mathbf{x}';t) =&& (4\pi k t)^{-\frac{n}{2}}e^{-\frac{|\mathbf{x}-\mathbf{x}'|^2}{4kt}}. \label{eq-3.2.24} \end{align}

To justify our claim we note that

  1. $G_n$ satisfies $n$-dimensional heat equation. Really, consider f.e. $G_2$: \begin{align*} G_{2\,t} (x,y;x',y';t) =& G_{1\,t}(x,x',t)G_1(y,y',t)+G_1(x,x',t)G_{1.t}(y,y',t)=\\ & kG_{1\,xx}(x,x',t)G_1(y,y',t)+kG_1(x,x',t)G_{1\,yy}(y,y',t)=\\ &k \Delta \bigl( G_{1\,t}(x,x',t)G_1(y,y',t) \bigr)= k\Delta G_2(x,y;x',y';t). \end{align*}
  2. $G_n (\mathbf{x},\mathbf{x}';t)$ quickly decays as $|\mathbf{x}-\mathbf{x}'|\to \infty$ and it tends to $0$ as $t\to 0^+$ for $\mathbf{x}\ne \mathbf{x}'$, but
  3. $\iint G(\mathbf{x},\mathbf{x}',t)\,dy\to 1$ as $t\to 0^+$.
  4. $G(\mathbf{x},\mathbf{x}',t)=G(\mathbf{x}',\mathbf{x},t)$.
  5. $G(\mathbf{x},\mathbf{x}',t)$ has a rotational (spherical) symmetry with a center at $\mathbf{x}'$. No surprise: we considered heat equation in isotropic media.

Properties [2]-[4] re due to the similar properties of $G_1$ and imply integral representation (\ref{eq-3.2.20}) (or its $n$-dimensional variant).

Visual examples (animation)

Similarly to Theorem 3.1.5 and following it remark we have now:

Theorem 2. Let $u$ satisfy (\ref{eq-3.2.16}) in domain $\Omega\subset \mathbb{R}_t\times \mathbb{R}^n_{\boldsymbol{x}}$ with $f\in C^\infty(\Omega)$. Then $u\in C^\infty(\Omega)$.

Remark 3.

  1. This "product trick'' works for heat equation or Schrödinger equation because both of them are equations (not systems) $u_t =Lu$ with $L$ which does not contain differentiation by $t$.

  2. So far we have not discussed the uniqueness of the solution. In fact, as formulated, the solution is not unique. But do not worry: "extra solutions" are so irregular at infinity that they have no "physical sense". We discuss it later.

  3. IVP in the direction of negative time is ill-posed. Indeed, if $f\in C^\infty$ it follows from Theorem 2 that solution cannot exist for $t\in (-\epsilon, 0]$ unless $g \in C^\infty$ (which is only necessary, but not sufficient).

Maximum principle

Consider heat equation in the domain $\Omega$ like below


We claim that

Theorem 3. (maximum principle). Let $u$ satisfy heat equation in $\Omega$. Then \begin{equation} \max _\Omega u = \max _\Gamma u. \label{eq-3.2.25} \end{equation}

Almost correct proof. Let (\ref{eq-3.2.25}) be wrong. Then $\max _\Omega u > \max _\Gamma u$ and there exists point $P=(\bar{x},\bar{t})\in \Omega\setminus \Gamma$ s.t. $u$ reaches its maximum at $P$. Without any loss of the generality we can assume that $P$ belongs to an upper lid of $\Omega$. Then \begin{equation} u_t(P )\ge 0 . \label{eq-3.2.26} \end{equation} Indeed, $u(\bar{x},\bar{t})\ge u(\bar{x},t)$ for all $t: \bar{t}>t>\bar{t}-\epsilon$ and then $\bigl( u(\bar{x},\bar{t})-u(\bar{x},t)\bigr)/(\bar{t}-t)\ge 0$ and as $t\nearrow \bar{t}$) we get (\ref{eq-3.2.26}).

\begin{equation} u_{xx}(P )\le 0. \label{eq-3.2.27} \end{equation} Indeed, $u(x,\bar{t})$ reaches maximum as $x=\bar{x}$. This inequality combined with (\ref{eq-3.2.26}) almost contradict to heat equation $u_t= ku_{xx}$ ("almost" because there could be equalities).

Correct proof. Note first that the above arguments prove (\ref{eq-3.2.25}) if $u$ satisfies inequality $u_t-ku_{xx} <0$ because then there will be a contradiction.

Further note that $v= u-\varepsilon t$ satisfies $v_t-kv_{xx} <0$ for any $\varepsilon \>0$ and therefore \begin{equation*} \max _\Omega (u-\varepsilon t) = \max _\Gamma (u-\varepsilon t). \end{equation*} Taking limit as $\varepsilon \to 0^+$ we get (\ref{eq-3.2.25}).

Remark 4.

  1. Sure, the same proof works for multidimensional heat equation.
  2. In fact, there is a strict maximum principle. Namely, either in $\Omega \setminus \Gamma$ $u$ is strictly less than $\max _\Gamma u$ or $u=\const$. The proof is a bit more sophisticated.

Corollary 4 (minimum principle) \begin{equation} \min _\Omega u = \min _\Gamma u. \label{eq-3.2.28} \end{equation} Really, $-u$ also satisfies heat equation.

Corollary 5.

  1. $u=0$ everywhere on $\Gamma$ $\implies u=0$ everywhere on $\Omega$.
  2. Let $u,v$ both satisfy heat equation. Then $u=v$ everywhere on $\Gamma$ $\implies u=v$ everywhere on $\Omega$.


  1. Really, then $\max _\Omega u=\min_\Omega u=0$.
  2. Really, then $(u-v)$ satisfies heat equation.


  1. erf function
  2. erf derivative

$\Leftarrow$  $\Uparrow$  $\downarrow$  $\Rightarrow$