6.1. Separation of variables for heat equation

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

Chapter 6. Separation of variables

In this Chapter we continue study separation of variables which we started in Chapter 4 but interrupted to explore Fourier series and Fourier transform.

6.1. Separation of variables for heat equation

Dirichlet boundary conditions

Consider problem \begin{align} & u_t= ku_{xx},&& t>0,\ 0< x< l,\label{eq-6.1.1}\\[3pt] & u|_{x=0}=u|_{x=l}=0.\label{eq-6.1.2}\\[3pt] & u|_{t=0}=g(x). \label{eq-6.1.3} \end{align} Let us consider a simple solution $u(x,t)=X(x)T(t)$; then separating variables we arrive to $\frac{T'}{T}=k\frac{X''}{X}$ which implies $X''+\lambda X=0$, \begin{equation} T'=-k\lambda T \label{eq-6.1.4} \end{equation} (explain, how). We also get boundary conditions $X(0)=X(l)=0$ (explain, how).

So, we have eigenvalues $\lambda_n=(\frac{\pi n}{l})^2$ and eigenfunctions $X_n=\sin (\frac{\pi n x}{l})$ ($n=1,2,\ldots$) and equation (\ref{eq-6.1.4}) for $T$, which results in \begin{equation} T_n=A_ne^{-k\lambda_n t} \label{eq-6.1.5} \end{equation} and therefore a simple solution is \begin{equation} u_n=A_ne^{-k\lambda_n t}\sin (\frac{\pi n x}{l}) \label{eq-6.1.6} \end{equation} and we look for a general solution in the form \begin{equation} u=\sum_{n=1}^\infty A_ne^{-k\lambda_n t}\sin (\frac{\pi n x}{l}). \label{eq-6.1.7} \end{equation} Again, taking in account initial condition (\ref{eq-6.1.3}) we see that \begin{equation} u=\sum_{n=1}^\infty A_n\sin (\frac{\pi n x}{l}). \label{eq-6.1.8} \end{equation} and therefore \begin{equation} A_n=\frac{2}{l}\int_0^l g(x)\sin (\frac{\pi n x}{l})\,dx. \label{eq-6.1.9} \end{equation}

Corollaries

1. Formula (\ref{eq-6.1.6}) shows that the problem is really ill-posed for $t<0$.
2. Formula (\ref{eq-6.1.9}) shows that as $t\to +\infty$ \begin{equation} u=O(e^{-k\lambda_1 t}); \label{eq-6.1.10} \end{equation}
3. Moreover we have as $t\to +\infty$ \begin{equation} u=A_1 e^{-k\lambda_1t}X_1(x)e^{-k\lambda_1 t}+ O(e^{-k\lambda_2 t}). \label{eq-6.1.11} \end{equation}

Consider now inhomogeneous problem with the right-hand expression and boundary conditions independent on $t$: \begin{align} & u_t= ku_{xx}+f(x),&& t>0,\ 0< x< l,\label{eq-6.1.12}\\[3pt] & u|_{x=0}=\phi,\qquad u|_{x=l}=\psi,\label{eq-6.1.13}\\[3pt] & u|_{t=0}=g(x).\label{eq-6.1.14} \end{align} Let us discard initial condition and find a stationary solution $u=v(x)$: \begin{align} & v''=-\frac{1}{k}f(x),&& 0< x < l,\label{eq-6.1.15}\\[3pt] & v(0)=\phi,\qquad v(l)=\psi.\label{eq-6.1.16} \end{align} Then (\ref{eq-6.1.15}) implies \begin{equation*} v(x)=-\frac{1}{k}\int_0^x\int_0^{x'} f(x'')\,dx''dx'+A+Bx= \int_0^x (x-x')f(x')\,dx'+A+Bx \end{equation*} where we used formula of $n$-th integral (you must know it from the 1st year calculus) \begin{equation} I_n(x)= \frac{1}{(n-1)!}\int_a^x (x-x')^{n-1}f(x')\,dx'\qquad n=1,2,\ldots \end{equation} for $I_n:=\int_a^x I_{n-1}(x')\,dx'$, $I_0(x):=f(x)$.

Then satisfying b.c. $A=\phi$ and $B=\frac{1}{l}(\psi-\phi+\frac{1}{k}\int_0^l (l-x') f(x')\,dx')$ and \begin{equation} v(x) =\int_0^x G(x,x') f(x')\,dx'+\phi (1-\frac{x}{l})+\psi \frac{x}{l} \label{eq-6.1.18} \end{equation} with \begin{equation} G(x,x') =\frac{1}{k}\left\{ \begin{aligned} & x'(1-\frac{x}{l})&& 0< x'< x,\\[3pt] & x(1-\frac{x'}{l}) && x< x'< l. \end{aligned}\right. \label{eq-6.1.19} \end{equation} Returning to the original problem we note that $u-v$ satisfies (\ref{eq-6.1.1})--(\ref{eq-6.1.3}) with $g(x)$ replaced by $g(x)-v(x)$ and therefore $u-v=O(e^{-k\lambda_1t})$. So \begin{equation} u=v+O(e^{-k\lambda_1t}). \label{eq-6.1.20} \end{equation} In other words, solution stabilizes to the stationary solution. For more detailed analysis of BVP for ODEs see Section 6.A.

Other boundary conditions

Similar approach works in the cases of boundary conditions we considered before:

1. Dirichlet on one and and Neumann on the other $u|_{x=0}=u_x|_{x=l}=0$;
2. Neumann on both ends $u_x|_{x=0}=u_x|_{x=l}=0$;
3. Periodic $u|_{x=l}=u|_{x=0}$, $u_x|_{x=l}=u_x|_{x=0}$;
4. Dirichlet on one and and Robin on the other $u|_{x=0}=(u_x+\beta u)|_{x=l}=0$;
5. Robin on both ends $(u_x-\alpha u)|_{x=0}=(u_x+\beta u)|_{x=l}=0$

but in (d), (e) we cannot find eigenvalues explicitly.

Corollaries

All corollaries remain valid as long as $\lambda_1>0$ which happens in cases (a), (d) with $\beta\ge 0$, (e) with $\alpha \ge 0,\beta\ge 0$ except $\alpha=\beta=0$.

Let us consider what happens when $\lambda_1=0$ (cases (b) and (c)).

First, solution of the problem with r.h.e. and b.c. equal to $0$ does not decay as $t\to +\infty$, instead \begin{equation} u=A_1 +O(e^{-k\lambda_2 t}) \label{eq-6.1.21} \end{equation} because in (b) and (c) $X_1(x)=1$.

Second, solution of stationary problem exists only conditionally: iff \begin{equation} \frac{1}{k}\int_0^l f(x)\,dx-\phi+\psi =0 \label{eq-6.1.22} \end{equation} in the case of Neumann b.c. on both ends $u_x|_{x=0}=\phi$, $u_x|_{x=l}=\psi$ and \begin{equation} \frac{1}{k}\int_0^l f(x)\,dx =0 \label{eq-6.1.23} \end{equation} in the case of periodic b.c.

To cover the case when (\ref{eq-6.1.22}) or (\ref{eq-6.1.23}) fails (i.e. total heat flow is not $0$ so there is no balance) it is sufficient to consider the case $f=p$, $\phi=\psi=0$; then $u=pt$ with \begin{equation} p=\frac{1}{l} \int_0^l f(x)\,dx \label{eq-6.1.24} \end{equation} and in the general case \begin{equation} u = pt +A_1 +O(e^{-k\lambda_2 t}). \label{eq-6.1.25} \end{equation}