% This is a sample file for the Undergraduate Faculty Program at
% PCMI, containing one lecture 
%
%   What is a Partial Differential Equation?
%
%  from the Park City Lectures of Andrew J. Bernoff.
%
% The sample file illustrates the use of epsf.tex to include postscript 
% graphics, as well as various "AmS-LaTeX" constructions from the amsmath
% package (which is automatically loaded by the pcms-l document class).
% To run this file you need the files 
%
%        pcms-l.cls and pcmslmod.tex
%


\documentclass[lecture,12pt,]{pcms-l}
\input pcmslmod.tex  % v.1.2
%\input epsf.tex

%\usepackage{amssymb} % this command would have loaded all the extra symbols,



% authors should not define these, they will be defined by the volume editors
%\def\currentvolume{3}
%\def\currentyear{1993}


% EQUATION NUMBERING AND THEOREM SETUP

\numberwithin{section}{chapter}
\numberwithin{equation}{chapter}

\theoremstyle{plain}
\newtheorem{theorem}[equation]{Theorem}
\newtheorem{lemma}[equation]{Lemma}

\theoremstyle{definition}
\newtheorem{definition}[equation]{Definition}

\newtheorem{exercise}{Exercise}
\newtheorem{problem}{Problem}
\newtheorem*{remark}{Remark}

% Set enumerate to use letters, not numbers for problem parts.

\renewcommand{\theenumi}{\alph{enumi}}
\renewcommand{\labelenumi}{(\theenumi)}

% AUTHOR-DEFINED MACROS:

\newcommand{\cA}{\mathcal{A}}
\newcommand{\cB}{\mathcal{B}}
\newcommand{\C}{\mathbb{C}}
\newcommand{\cC}{\mathcal{C}}
\newcommand{\cD}{\mathcal{D}}

\begin{document}

\mainmatter
\setcounter{page}{1}

%\LogoOn

\lectureseries[An Introduction to PDE's]{An Introduction to Partial Differential Equations in the Undergraduate Curriculum}


\auth[Socha \& Arnold]{Katherine Socha \& David Arnold} 

%\address{Department of Mathematics, Harvey Mudd College,Claremont, CA 91711}
%\email{ajb@hmc.edu}

%The following items will become first page footnotes; they are optional.
%\date{\today}
%\setaddress


% the following hack starts the lecture numbering at 1
\setcounter{lecture}{7}
\setcounter{chapter}{0}

\lecture{Sturm-Liouville Theory---Part I}

\section{Outline of Lecture}
\begin{itemize}
\item{Example of a non-homogeneous boundary value problem}
\item{The Ten-Step Program} 
\end{itemize}



\section{The heat equation with a radiation boundary condition}

In this lecture, we consider the initial boundary value problem (IBVP) with
nonhomogeneous boundary data, 
\begin{align*}
 u_t=Ku_{xx}:&\quad 0<x<L,\quad t>0\\
\left. {\begin{array}{l}
    u(0,t)=T_1\\
    u_x(L,t)=-h\big[u(L,t)-T_2\big]
    \end{array}} \right\}:&\quad t>0,\\
 u(x,0)=T_3:&\quad 0<x<L,
\end{align*}
where $h$, $T_1$, $T_2$, $T_3$, and $K$ are (strictly) positive
constants.  We have seen all of these expressions except for the boundary condition at $x=L$: this is called a {\bf radiation}\ or {\bf Robin}\ condition.  It describes how heat radiates radiates from the end into the surrounding medium.  The general form of a homogeneous Robin condition at $x=a$ is
$$-k u_x(a,t)+\beta u(a,t) = 0 \quad t>0$$
where $k$ is the thermal conductivity of the bar (introduced in Lecture 2 (Bernoff)), a positive constant.  If $\beta<0$ (and, of course, $u(a,t)>0$), then heat flows into the bar, an {\sl absorption}\ condition.  If, as in our IBVP, $\beta>0$, then heat flows out of the bar, a radiation condition.  Rewriting our IBVP so that the radiation condition is more readable, we see
\begin{eqnarray}
 u_t=Ku_{xx}:&\quad 0<x<L,\quad t>0,\label{ibvpu}\\
\left. {\begin{array}{l}
    u(0,t)=T_1\\
    u_x(L,t)+hu(L,t) = hT_2
    \end{array}} \right\}:&\quad t>0,\nonumber\\
 u(x,0)=T_3:&\quad 0<x<L.\nonumber
\end{eqnarray}

%Recall that in Lecture 2 (Bernoff), we reviewed Newton's Law of Cooling, 
%which described Newton's hypothesis that the rate at which temperature $U(t)$ changes in time is proportional to its difference with the ambient temperature $\bar U$:
%\begin{equation}
%\frac{dU}{dt}=-\kappa(U - \bar U)
%\end{equation}
%where $\kappa$ is a positive constant.  




A straightforward application of the separation of variables
technique that worked so well for the heat equation with homogeneous 
Dirichlet or
Neumann boundary data leads to a hard problem (see Problem~1), so we will
try to transform the problem into one we actually \emph{can}
handle. Motivated by the examples shown in Lectures~2, 5
(Wittwer), and 8 (Vajiac) we will begin by seeking a steady-state solution.

\subsection{The steady state solution}
Finding a steady state solution means that we seek a solution that is
independent of time. That is, find a function $u_s(x)$ that
satisfies $u_t=K u_{xx}$~ on $0<x<L$, together with the boundary data
$u_s(0)=T_1$ and $u_s'(L)+hu_s(L)=hT_2$. Because 
$\{d/dt\}(u_s(x))=0$, we have
 $$u_s''(x)=0.$$
Integrate twice to find $u_s(x)=ax+b$. Requiring that
this line satisfies the boundary data allows us to compute the
integration constants $a$ and $b$. After this work, we find the steady-state solution:
 \begin{equation}
 u_s(x)=\frac{h(T_2-T_1)}{1+hL}\, x+T_1.\label{steadysoln}
 \end{equation}
 
 \begin{exercise}  Do the algebra to prove that this is the correct form of the steady solution.
 \end{exercise}
 
 \subsection{Homogeneous boundary conditions}
Now we transform our problem by setting $v(x,t)=u(x,t)-u_s(x)$. A
straightforward calculation (Problem~2) demonstrates that $v$ must
satisfy the new IBVP
\begin{align*}
 v_t=Kv_{xx}:&\quad 0<x<L,\quad t>0\\
\left. {\begin{array}{l}
    v(0,t)=0\\
    v_x(L,t)+hv(L,t) = 0
    \end{array}} \right\}:&\quad t>0,\\
 v(x,0)=T_3-u_s(x):&\quad 0<x<L.
\end{align*}

%\begin{align*}
% v_t&=Kv_{xx}:\quad  0<x<L,\\
% v(0,t)&=0,\quad v_x(L,t)+hv(L,t)=0,\quad t>0,\\
% v(x,0)&=T_3-u_s(x),\quad 0<x<L.
%\end{align*}

How is this an improvement? Notice that both boundary conditions are
now homogeneous and it is only the initial condition that varies in
$x$. Guided by the previous lectures, we expect that this non-constant
$v(x,0)$ will not pose any difficulties.

The goal now is to find a solution $v$ by separation of variables, and then to find a solution $u(x,t)=v(x,t)+u_s(x)$ of (\ref{ibvpu}). 

\subsection{Separation of variables}

Applying the standard separation of variables argument leads us
to two ordinary differential equations. For $v(x,t)=X(x)T(t)$, we
find, as in Lecture 5,
\begin{equation}
\frac{T^\prime(t)}{KT(t)}=\frac{X^{\prime\prime}(x)}{X(x)}
\end{equation}
which we set equal to $-\lambda$ to find
\begin{align*}
 T'(t)&=-\lambda K T(t)\\
 X''(x)&=-\lambda X(x).
\end{align*}
Again, the general solution for the time dependence
has the form
 $$T(t)=Ce^{-\lambda K t}.$$


\subsection{A Sturm-Liouville Equation}

From this point forth, we seek only
nontrivial (nonzero) solutions $v(x,t)$.

From the separation of variables argument $T(t)=Ce^{-\lambda Kt}$. Note that $T$ is
nonzero for all $t$. We now must find nontrivial solutions of the equation 
\begin{equation}\label{heatsturm}
-X''=\lambda X.
\end{equation}
Recall the boundary conditions, for all $t>0$
$$v(0,t)=0\qquad\text{and}\qquad v_x(L,t)+hv(L,t)=0.$$ 
Substituting $v(x,t)=X(x)T(t)$ in each of
these conditions provides
$$X(0)T(t)=0\qquad\text{and}\qquad X'(L)T(t)+hX(L)T(t)=0$$
for all $t>0$. Since $T(t)$ is nonzero, divide these equations by $T(t)$ to capture 
$$X(0)=0\qquad\text{and}\qquad X'(L)+hX(L)=0.$$
Putting all of this together leads to a
{\bf Sturm-Liouville problem}, 
\begin{equation}\label{sturm}
-X''=\lambda X,\quad X(0)=0,\quad X'(L)+hX(L)=0.
\end{equation}
If a nontrivial solution of equation~\eqref{sturm} exists, then
the constant $\lambda$ is called an {\bf eigenvalue} and the solution
$X$ is called its associated {\bf eigenfunction}.

Postponing until Lecture 9 a discussion of the possibility of complex eigenvalues, we consider three distinct cases:
\begin{itemize}
\item[i.] $\lambda<0$,
\item[ii.] $\lambda=0$, or
\item[iii.] $\lambda>0$.
\end{itemize}
Let's first consider the possibility that $\lambda$ is negative.

\subsubsection{Case i: $\lambda<0$}

A purely analytical approach is described in
Appendix~\ref{lambdalesszero}, but here we introduce a useful and more general approach called an {\bf energy argument}. First, multiply both sides of
$-X''=\lambda X$ by $X$ and integrate both sides with respect to $x$ on the interval $[0,L]$:
$$-\int_0^LX(x)X''(x)\,dx=\lambda\int_0^LX^2(x)\,dx.$$
Then integrate by parts to change the form of the left-hand side of this
equation: 
\begin{equation}\label{intparts}
-X(x)X'(x)\bigg|_0^L+\int_0^L\bigg[X'(x)\bigg]^2\,dx
=\lambda \int_0^L\bigg[X(x)\bigg]^2\,dx.
\end{equation}
However,
$$-X(x)X'(x)\bigg|_0^L=-X(L)X'(L)+X(0)X'(0).$$
The boundary conditions require $X(0)=0$ and $X'(L)=-hX(L)$. Thus,
$$-X(x)X'(x)\bigg|_0^L=-X(L)\big[-hX(L)\big]+0\cdot X'(0)=hX(L)^2\ge
0.$$
Now equation~\eqref{intparts} becomes
\begin{equation}
\frac{hX^2(L)+\int_0^L\left( X^\prime(x)\right)^2dx}{\int_0^L X^2(x)dx}=\lambda
\end{equation}
from which it follows that $\lambda\geq 0$.



\subsubsection{Case ii: $\lambda=0$}
If $\lambda=0$, then $-X''=\lambda X$ becomes $X''=0$, which has
general solution 
$$X(x)=A+Bx.$$
The boundary condition $X(0)=0$ implies that $A=0$, so the
solution is now $X(x)=Bx$, with derivative $X'(x)=B$. The second
boundary condition provides
$$0=X'(L)+hX(L)=B+h(BL)=B(1+hL).$$
Because both $h>0$ and $L>0$, it follows that
$B=0$. Hence, $X(x)=0$ for all $x$. Since $\lambda=0$ has only the trivial solution, we conclude that $\lambda=0$ is not an eigenvalue.


\subsubsection{Case iii: $\lambda>0$}
Since $\lambda>0$, we now know 
 $$X(x)=A\cos\big(x\sqrt\lambda\,\big)+B\sin\big(x\sqrt\lambda\,\big).$$
Applying the first boundary condition gives $$0=X(0)=A\cos 0+B\sin 0=A.$$
Thus, $X(x)=B\sin\big(x\sqrt\lambda\,\big)$. Notice that we must have $B\neq 0$ to obtain a nontrivial solution.  The second boundary
condition requires that
 $$0=X'(L)+hX(L)=B\sqrt\lambda\cos\big(L\sqrt\lambda\,\big)
   +hB\sin\big(L\sqrt\lambda\,\big).$$
Dividing through by $B\cos\big(L\sqrt\lambda\,\big)$ shows
 $$0=\sqrt\lambda+h\tan\big(L\sqrt\lambda\,\big).$$
To obtain nontrivial solutions $X(x)$, we must hope that this trigonometric equation has at least one solution for $\lambda$.
This is a perfect opportunity to use a computer application such as Maple. In fact, we will see that there are infinitely many solutions!  Write these
eigenvalues of the BVP as $\lambda_j$
such that 
 \begin{equation}
 -\tan\big(L\sqrt{\lambda_j}\,\big)=\frac{\sqrt{\lambda_j}}{h},\label{eigenval}
 \end{equation} 
with corresponding eigenfunctions
 $$X_j(x)=\sin\big(x\sqrt{\lambda_j}\,\big).$$



\subsection{Orthogonality}

The eigenvalues of the Sturm-Liouville
problem~\eqref{sturm} are the positive solutions of
\begin{equation}
-\tan\big(L\sqrt\lambda\big)=\frac{\sqrt\lambda}{h}\label{evalagain}
\end{equation}
and have associated
eigenfunctions
\begin{equation}
X_j(x)=\sin\big(x\sqrt{\lambda_j}\,\big).\label{evectagain}
\end{equation}
In the Fourier theory developed in
Lecture 6, the eigenfunctions had the remarkable property of orthogonality.
Because we can find only approximate (numerical) solutions of
\eqref{evalagain}, it will be difficult to show that (for $j\neq k$)
$$\int_0^L\sin\big(x\sqrt{\lambda_j}\big)\,\sin\big(x\sqrt{\lambda_k}\big)\,dx=0,$$
for our eigenfunctions \eqref{evectagain} . Returning to the differential equation itself may provide more insight into the nature of these eigenfunctions.

Suppose that $\lambda_1\ne\lambda_2$ are  two distinct eigenvalues with associated eigenfunctions $X_1$ and
$X_2$ that both satisfy the Sturm-Liouville problem
$$-X''=\lambda X,\qquad X(0)=0,\qquad X'(L)+hX(L)=0.$$
Thus,
\begin{align*}
-X_1''&=\lambda_1 X_1\\
-X_2''&=\lambda_2 X_2.
\end{align*}
Multiply the first equation by $X_2$ and the second by $X_1$ and
subtract:
$$-X_2X_1''+X_1X_2''=(\lambda_1-\lambda_2)X_1X_2.$$
Integrate this expression with respect to $x$ on the interval $[0,L]$ to find
$$\int_0^L\big(-X_2X_1''+X_1X_2'')\,dx
 =(\lambda_1-\lambda_2)\int_0^L X_1X_2\,dx.$$
Note that the integrand on the left is exact, so
$$\int_0^L\frac{d}{dx}\bigg[X_1X_2'-X_2X_1'\bigg]\,dx
 =(\lambda_1-\lambda_2)\int_0^L X_1X_2\,dx.$$
Thus,
\begin{equation}\label{diffeigs}
X_1X_2'-X_2X_1'\bigg|_0^L
  =(\lambda_1-\lambda_2)\int_0^L X_1X_2\,dx.
\end{equation}
Because $X_1(0)=0$ and $X_2(0)=0$,
\begin{equation}\label{diffigs2}
X_1X_2'-X_2X_1'\bigg|_0^L
  =X_1(L)X_2'(L)-X_2(L)X_1'(L).
  \end{equation}
The next step is to argue that the right-hand side of 
equation~\eqref{diffigs2} also equals zero.

Both $X_1$ and $X_2$ must satisfy the second boundary condition of the
Sturm-Liouville equation. Thus,
\begin{align*}
X_1'(L)+hX_1(L)&=0\\
X_2'(L)+hX_2(L)&=0.
\end{align*}
This system can be written in matrix form:
$$\begin{bmatrix}
X_1'(L) & X_1(L)\\ X_2'(L) & X_2(L)
\end{bmatrix}
\begin{bmatrix} 1\\h
\end{bmatrix}=
\begin{bmatrix}0\\0\end{bmatrix}.$$
The fact that this matrix equation has a nontrivial solution demands
that the determinant of the coefficient matrix equal zero. Thus,
$$0=\begin{vmatrix}
X_1'(L) & X_1(L)\\ X_2'(L) & X_2(L)
\end{vmatrix}=
X_1'(L)X_2(L)-X_2'(L)X_1(L).
$$
This last result, along with equations~\eqref{diffeigs}  and \eqref{diffigs2}, provide
$$0=(\lambda_1-\lambda_2)\int_0^L X_1X_2\,dx.$$
Finally, because $\lambda_1$ and $\lambda_2$ are distinct eigenvalues,
$$0=\int_0^L X_1X_2\,dx,$$
and $X_1$ and $X_2$ are orthogonal.


 
 \subsection{A formal solution and orthogonality}

We may construct a formal solution for $v$ by superposition:
 \begin{equation}
 v(x,t)=\sum_{j=1}^\infty C_j e^{-\lambda_j K t}
   \sin\big(x\sqrt{\lambda_j}\,\big)\label{vsoln}
\end{equation}
We want this formal solution to satisfy the initial condition.  This requires that
\begin{equation}
T_3-u_s(x) = v(x,0) = \sum_{j=1}^\infty C_j \sin(x\sqrt{\lambda_j}). \label{incond}
\end{equation}
How do we know that such $C_j$ exist? 

We have shown that the eigenfunctions
 \begin{equation}
 \big\{\sin\big(x\sqrt{\lambda_j}\,\big)\,\big\}_{j=1}^\infty\label{evectors}
 \end{equation}
are pairwise orthogonal.
(Refer to Problem~3 in
which you will demonstrate via Maple that these
functions are orthogonal.) 
Further, this set forms a basis for $L^2$ in which we may write our linear function $v(x,0)$ as a linear combination of elements of (\ref{evectors}).  (This idea will be explored further in Lecture 9.)

We may obtain the ``Fourier'' coefficients $C_j$ just as the Fourier coefficients were constructed in Lecture 6 (Aarao).  Multiply both sides of (\ref{incond}) by $\sin(x\sqrt{\lambda_k})$ and integrate over the interval $[0, L]$.  
This gives
\begin{equation}
\int_0^L \left[ T_3-u_s(x)\right]\sin\big(x\sqrt{\lambda_k}\big) dx
= \int_0^L 
\sum_{j=1}^\infty C_j\sin\big(x\sqrt{\lambda_k}\big)\sin\big(x\sqrt{\lambda_j}\big) dx.
\nonumber
\end{equation}
Assuming uniform convergence, we may interchange the order of integration and summation.  By orthogonality, the right-hand side is non-zero only when $j=k$.  Hence,
\begin{equation}
\int_0^L \left[ T_3-u_s(x)\right]\sin\big(x\sqrt{\lambda_k}\big) dx = \int_0^L 
C_k\sin^2\big(x\sqrt{\lambda_k}\big) dx.
\end{equation}
We may now write
\begin{equation}
C_k = \frac{\int_0^L \left[ T_3-u_s(x)\right]\sin\big(x\sqrt{\lambda_k}\big) dx }{\int_0^L 
\sin^2\big(x\sqrt{\lambda_k}\big) dx }
\label{coeffs}
\end{equation}
for integers $k\geq 1$.
\footnote{Using the neat inner product and norm notations introduced in Lecture 6, we may write equation (\ref{coeffs}) above as
\begin{equation}
C_k = \frac{ \left(v(x,0), \sin\big(x\sqrt{\lambda_k}\big) \right) }{\Vert \sin\big(x \sqrt{\lambda_k}\big)\Vert^2}.\nonumber
\end{equation}
}


Now we have completely determined the series solution for $v$, and hence for $u(x,t)=v(x,t)+u_s(x)$:
\begin{equation}
u(x,t)= \sum_{j=1}^\infty C_j e^{-\lambda_j K t}\sin\left(x\sqrt{\lambda_j}\right) + \frac{h(T_2-T_1)}{1+hL} x + T_1 \label{usoln}
\end{equation}
with $(\lambda_j, C_j)$ solutions of equations (\ref{eigenval}) and (\ref{coeffs}), respectively.


\subsection{Convergence}
How do we know that the formal series solution (\ref{usoln}) converges uniformly on $[0, L]$?  Further, the series formulations of $u_t, u_x, u_{xx}$ obtained through term-by-term differentiation also ought to converge uniformly.  After all, in order to claim that a certain function $u$ satisfies the IBVP, it had better be true that $u$ is actually a function, differentiable once in $t$ and twice in $x$!  

\begin{lemma} 
 For all $j\geq 1$, the coefficients $C_j$ given by (\ref{coeffs}) satisfy $|C_j| \leq M$ for some constant $M$.
\end{lemma}

\begin{exercise} Prove the lemma.
\end{exercise}

This claim allows us to prove that all of the series formulations for $u, u_t, u_x,$ and $u_{xx}$ are uniformly convergent on $[0,L]$.

\subsection{Long-term behavior (Asymptotics)}

Finally, what happens to the series solution for $u(x,t)$ as $t\rightarrow\infty$?  Since $\lambda_j K>0$ we can use the Lemma to show that
\begin{equation}
\Biggl| C_j e^{-\lambda_j K t}\sin\left( x\sqrt{\lambda_j}\right)\Biggr| \leq
|C_j| e^{-\lambda_j K t} \leq M e^{-\lambda_j K t} \rightarrow 0
\end{equation}
as $t\rightarrow \infty.$
By uniform convergence, then, 
\begin{equation}
\sum_{j=1}^\infty C_j e^{-\lambda_j K t}\sin\left( x\sqrt{\lambda_j}\right) \longrightarrow 0
\quad {\rm as}~ t\rightarrow\infty.
\end{equation}
Thus, $u(x,t)\rightarrow u_s(x)$, the steady state solution!




\section{Summary: The Ten-Step Program}
At this point we review the procedure discussed in the previous pages.
\begin{enumerate}

\item[1.] Find a steady-state solution $u_s$.

\item[2.] Change variables by $v=u-u_s$, transforming our IBVP with
inhomogeneous boundary conditions to an
IBVP with homogeneous boundary conditions.

\item[3.] Apply separation of variables, using $v(x,t)=X(x)T(t)$ to obtain
two ODEs, in $x$ and in $t$, from 
$$\frac{X''(x)}{X(x)}=\frac{T'(t)}{kT(t)}=-\lambda.$$

\item[4.] Solve for the $t$-dependence: $T(t)=Ce^{-\lambda K t}$.

\item[5.] Use an energy argument to determine sign of $\lambda$.

\item[6.] Solve the $x$-ODE to determine pairs $\big(\lambda_j, X_j\big)$.

\item[7.] Create a formal solution $v(x,t)$ by superposition and use orthogonality to determine the series coefficients.

\item[8.] Determine a formal solution for $u=v+u_s$.

\item[9.] Prove that the series expressions for $u$, $u_t$, $u_x$, and
$u_{xx}$ converge uniformly.  Thus, $u$ in series form is genuinely a
solution.

\item[10.] Study long-term behavior. Show that
 $$\lim_{t\to\infty} u(x,t)=u_s(x).$$ 

\end{enumerate}





\section{Challenge Problems for Lecture 8}

\begin{problem}
Use separation of variables to try to solve the IBVP
\begin{align*}
 u_t=Ku_{xx}:&\quad 0<x<L,\quad t>0\\
\left. {\begin{array}{r}
    u(0,t)=T_1\\
    u_x(L,t)+hu(L,t) = hT_2
    \end{array}} \right\}:&\quad t>0,\\
 u(x,0)=T_3:&\quad 0<x<L.
\end{align*}
(Hint: it won't be pretty.  Where do you run into trouble?)
\end{problem}

\begin{problem}
Show that $v(x,t)=u(x,t)-u_s(x)$
satisfies the IBVP
\begin{align*}
 v_t=Kv_{xx}:&\quad 0<x<L,\quad t>0\\
\left. {\begin{array}{r}
    v(0,t)=0\\
    v_x(L,t)+hv(L,t) = 0
    \end{array}} \right\}:&\quad t>0,\\
 v(x,0)=T_3-u_s(x):&\quad 0<x<L.
\end{align*}
when $u(x,t)$ satisifies
\begin{align*}
 u_t=Ku_{xx}:&\quad 0<x<L,\quad t>0\\
\left. {\begin{array}{r}
    u(0,t)=T_1\\
    u_x(L,t)+hu(L,t) = hT_2
    \end{array}} \right\}:&\quad t>0,\\
 u(x,0)=T_3:&\quad 0<x<L.
\end{align*}
and $u_s(x)$ is its steady state solution.
\end{problem}


\begin{problem}
Use Maple to demonstrate that functions $\sin\big(x\sqrt{\lambda_j}\big)$ are orthogonal when $\lambda_j$ are the solutions of the transcendental equation (\ref{eigenval}).
\end{problem}



\begin{problem}  (Logan, p.\ 131)
Consider a large, circular, tubular ring of circumference $2L$ that contains a chemical of concentration $c(x,t)$ dissolved in water.  Let $x$ be the arc-length parameter with $0<x<2L$.  If the concentration of the chemical is initially given by $c_0(x)$, then $c(x,t)$ satisfies the IBVP
\begin{align*}
 c_t=Dc_{xx}:&\quad 0<x<2L,\quad t>0\\
\left. {\begin{array}{r}
    c(0,t)=c(2L,t)\\
    c_x (0,t)=c_x (2L,t)
    \end{array}} \right\}:&\quad t>0,\\
 c(x,0)=f(x):&\quad 0<x<2L.
\end{align*}
These boundary conditions are called {\sl periodic boundary conditions}, and $D$ is the diffusion constant.  Apply the separation of variables method and show that the associated Sturm-Liouville problem has eigenvalues $\lambda_n = (n\pi/L)^2$ for $n=0, 1, 2, \dots$ and eigenfunctions $X_n(x) = A_n\cos(n\pi x/L)+B_n\sin(n\pi x/L)$ for $n=1, 2, \dots$.  Show that the concentration is given by
$$c(x,t)=\frac{A_0}{2} +\sum_{n=0}^\infty \left( A_n \cos(n\pi x/L) + B_n\sin(n\pi x/L)\right)e^{-n^2\pi^2Dt/L^2}$$
and find the formulae for the $A_n$ and $B_n$.
\end{problem}




\section{Appendix}\label{lambdalesszero}
Here is the analytical argument that 
the Sturm-Liouville problem
\begin{equation}\label{appendixsturm}
-X''=\lambda X,\quad X(0)=0,\quad X'(L)+hX(L)=0
\end{equation}
has only nonnegative eigenvalues.
Suppose that $\lambda<0$ and, so, write $\lambda=-\omega^2$, where
$\omega>0$.  Then equation~\eqref{appendixsturm} becomes
$$X''-\omega^2X=0.$$
It is easily seen that the general solution is\footnote{The hyperbolic
sine and cosine are defined as follows: $\cosh x=(e^x+e^{-x})/2$ and
$\sinh x=(e^x-e^{-x})/2$.}
$$X=A\cosh\omega x+B\sinh\omega x.$$
The boundary condition $X(0)=0$ forces
$$0=X(0)=A\cosh 0+B\sinh 0=A,$$
and $X(x)=B\sinh \omega x$, which has derivative
$X'(x)=B\omega\cosh \omega x$. The second boundary condition now
provides 
$$0=X'(L)+hX(L)=B\omega\cosh \omega L+hB\sinh\omega L.$$
Dividing by $B$,
$$0=\omega\cosh\omega L+h\sinh\omega L,$$
or equivalently,
$$\tanh\omega L=-\frac{\omega}{h}.$$
It is not difficult to show that the only solution of this equation is
$\omega=0$, contradicting our assumption that $\omega>0$.

Therefore, it cannot be the case that $\lambda$ is negative. That is,
$\lambda$ must be nonnegative ($\lambda\ge 0$).




\end{document}