%%%%		-*- Mode: LaTeX -*-
%%%% Author:    J. Robert Buchanan
%%%% Address:   Department of Mathematics
%%%%		Millersville University
%%%%            P.O. Box 1002
%%%%            Millersville, PA 17551-0302
%%%% Phone:     717-871-7305
%%%% FAX:	717-871-7948
%%%%
%%%% Email:     Robert.Buchanan@millersville.edu
%%%%
%%%% Date:      03/31/2025
%%%%
%%%% Purpose:   Solving Parabolic PDEs Using Green's Functions
%%%%

\documentclass[10pt]{beamer}

\mode<presentation>
{
  %\usetheme{Warsaw}
  \usetheme{default}
  %\usetheme{CambridgeUS}
  % or ...

  %\setbeamercovered{transparent}
  % or whatever (possibly just delete it)
}


\usepackage[english]{babel}
% or whatever

\usepackage[latin1]{inputenc}
% or whatever

\usepackage{times}
\usepackage[T1]{fontenc}
% Or whatever. Note that the encoding and the font should match. If T1
% does not look nice, try deleting the line with the fontenc.


\title{Solving Parabolic PDEs Using Green's Functions}
\subtitle{\textit{Partial Differential Equations}} % (optional)


\author % (optional, use only with lots of authors)
{J~Robert~Buchanan}
% - Use the \inst{?} command only if the authors have different
%   affiliation.

\institute[Millersville University of Pennsylvania]
% (optional, but mostly needed)
{
  Department of Mathematics
}
% - Use the \inst command only if there are several affiliations.
% - Keep it simple, no one is interested in your street address.

\date{ % (optional)
Fall
%Spring
%Summer
\the\year}

\subject{Talks}
% This is only inserted into the PDF information catalog. Can be left
% out. 



% If you have a file called "university-logo-filename.xxx", where xxx
% is a graphic format that can be processed by latex or pdflatex,
% resp., then you can add a logo as follows:

% \pgfdeclareimage[height=0.5cm]{university-logo}{university-logo-filename}
% \logo{\pgfuseimage{university-logo}}



% Delete this, if you do not want the table of contents to pop up at
% the beginning of each subsection:
\AtBeginSubsection[]
{
  \begin{frame}<beamer>
    \frametitle{Outline}
    \tableofcontents[currentsection,currentsubsection]
  \end{frame}
}


% If you wish to uncover everything in a step-wise fashion, uncomment
% the following command: 

%\beamerdefaultoverlayspecification{<+->}


\begin{document}

\begin{frame}
  \titlepage
\end{frame}

%\begin{frame}
%  \frametitle{Outline}
%  \tableofcontents
  % You might wish to add the option [pausesections]
%\end{frame}


% Since this a solution template for a generic talk, very little can
% be said about how it should be structured. However, the talk length
% of between 15min and 45min and the theme suggest that you stick to
% the following rules:  

% - Exactly two or three sections (other than the summary).
% - At *most* three subsections per section.
% - Talk about 30s to 2min per frame. So there should be between about
%   15 and 30 frames, all told.

%\section{Introduction}

\begin{frame}\frametitle{Objectives}

In this lesson we will:
\begin{itemize}
\item develop Green's functions for some parabolic differential
  equations, and
\item use Green's functions to solve examples of the heat or diffusion equation.
\end{itemize}

\end{frame}
%%

\begin{frame}\frametitle{One-Dimensional Setting}

%\label{eq:green:heat:IBVP}
\begin{align*}
u_{t} - \kappa u_{xx}
	&= Q(x, t)
\mbox{ for $0 < x < M$ and $t > 0$}	\\
u(0, t)
	&= \alpha(t)
\mbox{ for $t > 0$}	\\
u(M, t)
	&= \beta(t)
\mbox{ for $t > 0$}	\\
u(x, 0)
	&= f(x)
\mbox{ for $0 < x < M$}
\end{align*}

\end{frame}
%%

\begin{frame}\frametitle{Eigenfunction Expansion}

Write the solution as an infinite sum involving the
eigenfunctions of the Dirichlet-bounded heat equation in one spatial dimension.
\[
u(x, t)
	= \sum_{n=1}^{\infty} T_{n}(t) \phi_{n}(x)	,
\]
where $\phi_{n}(x) = \sin \frac{n \pi x}{M}$.
Differentiate the solution with respect to $t$ and solve for $T_{n}'(t)$.
\[
\sum_{n=1}^{\infty} T_{n}'(t) \phi_{n}(x)
	= u_{t}
	= \kappa u_{xx} + Q(x, t)
\]
Multiply both sides by $\phi_{m}(x)$ and integrate over the interval
$[0, M]$.
\[
\int_{0}^{M} \sum_{n=1}^{\infty} T_{n}'(t) \phi_{n}(x) \phi_{m}(x) \, dx
	= \int_{0}^{M} (\kappa u_{xx} + Q(x, t)) \phi_{m}(x) \, dx
\]
Assuming the order of integrations and summation can be interchanged,
the orthogonality of the eigenfunctions implies
\[
%\label{eq:green:heat:tmprime}
T_{m}'(t)
	= \frac{\kappa \int_{0}^{M} u_{xx} \phi_{m}(x) \, dx}{ \|
   \phi_{m} \|^{2}} + \frac{\int_{0}^{M} Q(x, t) \phi_{m}(x) \, dx}{
   \| \phi_{m} \|^{2}}
\]

\end{frame}
%%

\begin{frame}\frametitle{Eigenfunction Expansion}

Define $L[u] = u_{xx}$.
By integration by parts or
Green's Formula
\begin{align*}
\int_{0}^{M} ( u L[\phi_{m}] - \phi_{m} L[u] ) \,dx
	= {} & \left[ u \phi_{m}' - u_{x} \phi_{m} \right]_{x=0}^{x=M}	\\
\int_{0}^{M} ( -\lambda_{m} u - u_{xx} ) \phi_{m} \, dx
	= {} & u(M, t) \phi_{m}'(M) - u_{x}(M, t) \phi_{m}(M)	\\
	&- u(0, t) \phi_{m}'(0) + u_{x}(0, t) \phi_{m}(0)	\\
	= {} & \beta(t) \phi_{m}'(M) - \alpha(t) \phi_{m}'(0)	.
\end{align*}
Replace $u$ by the series
formulation and use the orthogonality of the eigenfunctions.
\[
\int_{0}^{M} -\lambda_{m} u \phi_{m} \, dx
	= \int_{0}^{M} -\lambda_{m} \left( \sum_{n=1}^{\infty}
          T_{n}(t) \phi_{n}(x) \right) \phi_{m}(x) \, dx
	= -\lambda_{m} T_{m}(t) \| \phi_{m} \|^{2}
\]
Thus the necessary expression for the integral is
\[
\int_{0}^{M} u_{xx} \phi_{m} \, dx
	= -\lambda_{m} T_{m}(t) \| \phi_{m} \|^{2} - \beta(t)
        \phi_{m}'(M) + \alpha(t) \phi_{m}'(0)	.
\]

\end{frame}
%%

\begin{frame}\frametitle{Eigenfunction Expansion}
\fontsize{9pt}{10.8}\selectfont

\[
T_{m}'(t)
	= \frac{\kappa \left( -\lambda_{m} T_{m}(t) \| \phi_{m} \|^{2} - \beta(t)
        \phi_{m}'(M) + \alpha(t) \phi_{m}'(0) \right)}{ \|
   \phi_{m} \|^{2}} + \frac{\int_{0}^{M} Q(x, t) \phi_{m}(x) \, dx}{
   \| \phi_{m} \|^{2}}	.
\]
Let the last expression be denoted $Q_{m}(t)$ and a
nonhomogeneous, first-order ordinary differential equation for
$T_{m}$ arises.
\[
T_{m}'(t) + \kappa \lambda_{m} T_{m}(t)
	= Q_{m}(t) + \kappa \frac{\alpha(t) \phi_{m}'(0) - \beta(t)
          \phi_{m}'(M)}{\| \phi_{m} \|^{2}}
\]
Solving the differential equation above yields
%\label{eq:green:heat:tmsoln}
\begin{align*}
T_{m}(t)
	= {} & \int_{0}^{t} e^{-\kappa \lambda_{m} (t-\tau)}\left[ Q_{m}(\tau) + \kappa
  \frac{\alpha(\tau) \phi_{m}'(0) - \beta(\tau) \phi_{m}'(M)}{\| \phi_{m}
    \|^{2}} \right] \, d\tau	\\
	&+ T_{m}(0) e^{-\kappa \lambda_{m} t}	.
\end{align*}

\end{frame}
%%

\begin{frame}\frametitle{Eigenfunction Expansion}
\fontsize{9pt}{10.8}\selectfont

\begin{align*}
u(x, t)
	= {} & \sum_{n=1}^{\infty} T_{n}(0) e^{-\kappa \lambda_{n} t} \phi_{n}(x)	\\
	&+ \sum_{n=1}^{\infty} \left( \int_{0}^{t} e^{-\kappa
   \lambda_{n} (t-\tau)}\left[ Q_{n}(\tau) + \kappa \frac{\alpha(\tau)
   \phi_{n}'(0) - \beta(\tau) \phi_{n}'(M)}{\| \phi_{n} \|^{2}}
   \right] \, d\tau \right) \phi_{n}(x)
\end{align*}
Note that when $t = 0$,
\begin{align*}
\sum_{n=1}^{\infty} T_{n}(0) \phi_{n}(x)
	&= u(x, 0)
	= f(x)	\\
T_{n}(0)
	&= \frac{\int_{0}^{M} f(x) \phi_{n}(x) \, dx}{\| \phi_{n} \|^{2}}	.
\end{align*}

\end{frame}
%%

\begin{frame}\frametitle{Eigenfunction Expansion}

\begin{align*}
u(x, t)
	= {} & \int_{0}^{M} \left( \sum_{n=1}^{\infty} \frac{\phi_{n}(x)
               \phi_{n}(\xi)}{\| \phi_{n} \|^{2}} e^{-\kappa
               \lambda_{n} t} \right) f(\xi) \, d\xi	\\
	&+ \int_{0}^{t} \int_{0}^{M} \left( \sum_{n=1}^{\infty} \frac{\phi_{n}(x) 
               \phi_{n}(\xi)}{\| \phi_{n} \|^{2}} e^{-\kappa
   \lambda_{n} (t-\tau)} \right) Q(\xi, \tau) \, d\xi \, d\tau	\\
	&+ \kappa \int_{0}^{t} \left( \sum_{n=1}^{\infty} \frac{\phi_{n}(x)
   \phi_{n}'(0)}{\| \phi_{n} \|^{2}} e^{-\kappa \lambda_{n} (t-\tau)} \right)
   \alpha(\tau) \, d\tau	\\
	&- \kappa \int_{0}^{t} \left( \sum_{n=1}^{\infty} \frac{\phi_{n}(x)
   \phi_{n}'(M)}{\| \phi_{n} \|^{2}} e^{-\kappa \lambda_{n} (t-\tau)} \right)
   \beta(\tau) \, d\tau	.
\end{align*}

\end{frame}
%%

\begin{frame}\frametitle{Green's Function}

Define the Green's function is
\[
%\label{eq:green:heat:greensfunction}
G(x, t; \xi, \tau)
	= \sum_{n=1}^{\infty} \frac{\phi_{n}(x) \phi_{n}(\xi)}{\|
          \phi_{n} \|^{2}} e^{-\kappa \lambda_{n} (t-\tau)}	.
\]
The solution to the IBVP can be expressed as
\begin{align*}
u(x, t)
	= {} & \int_{0}^{M} G(x, t; \xi, 0) f(\xi) \, d\xi +
\int_{0}^{t} \int_{0}^{M} G(x, t; \xi, \tau) Q(\xi, \tau) \, d\xi \, d\tau	\\
	+& \kappa \int_{0}^{t} \left[ G_{\xi}(x, t; 0, \tau)
           \alpha(\tau) - G_{\xi}(x, t; M, \tau) \beta(\tau) \right]
           \, d\tau	.
\end{align*}
The first integral above handles the initial condition,
the second addresses the source term,
and the third was previously referred to as
the surface terms.

\end{frame}
%%

\begin{frame}\frametitle{Infinite Domain}

The principal solution term of the Green's function for the unbounded
one-dimensional heat equation must satisfy the differential equation
\[
L^{\ast}[U]
	= -U_{\tau} - \kappa U_{\xi\xi}
	= \delta(\xi - x, \tau - t)
\mbox{ for $-\infty < \xi < \infty$ and $\tau > 0$.}
\]
Apply the Fourier transform.
\begin{align*}
\mathcal{F}[ -U_{\tau} - \kappa U_{\xi\xi} ]
	&= \mathcal{F} [ \delta(\xi - x, \tau - t) ]	\\
%\label{eq:green:heat:UhatODE}
-\hat{U}_{\tau} + \omega^{2} \kappa \hat{U}
	&= \frac{1}{\sqrt{2 \pi}} \delta(\tau - t) e^{-i \omega x}
\end{align*}
The solution to this first-order ordinary differential equation is
\[
\hat{U}(\omega)
	= \left\{ \begin{array}{rl}
A e^{\omega^{2} \kappa \tau}	& \mbox{if $t < \tau$,}	\\
B e^{\omega^{2} \kappa \tau}	& \mbox{if $t > \tau$.}
\end{array} \right.
\]

\end{frame}
%%

\begin{frame}\frametitle{Infinite Domain}

Let $\epsilon > 0$ and integrate both sides of the ODE
with respect to $\tau$ over the interval
$[t - \epsilon, t + \epsilon]$.
\begin{align*}
\int_{t - \epsilon}^{t + \epsilon} (-\hat{U}_{\tau} + \omega^{2}
  \kappa \hat{U}) \, d\tau
	&= \int_{t - \epsilon}^{t + \epsilon} \frac{1}{\sqrt{2 \pi}}
   \delta(\tau - t) e^{-i \omega x} \, d\tau	\\
-A e^{\omega^{2} \kappa (t+\epsilon)} + B e^{\omega^{2} \kappa
  (t-\epsilon)} + \int_{t - \epsilon}^{t+\epsilon} \omega^{2} \kappa
  \hat{U} \, d\tau
	&= \frac{1}{\sqrt{2 \pi}} e^{-i \omega x}
\end{align*}
Taking the limit of both sides of the last equation as $\epsilon \to
0$ produces the equation,
\[
(B-A) e^{\omega^{2} \kappa t}
	= \frac{1}{\sqrt{2 \pi}} e^{-i \omega x}	.
\]

\end{frame}
%%

\begin{frame}\frametitle{Infinite Domain}

If $\tau > t$ the differential equation for the
principal solution is $L^{\ast}[U] = -U_{\tau} - \kappa U_{\xi\xi} =
0$ which has solution $U = 0$.
This implies that for $\tau > t$, the Fourier transform $\hat{U} = 0$
and $A = 0$.
Consequently
\[
B
	= \frac{1}{\sqrt{2 \pi}} e^{-(i \omega x + \omega^{2} \kappa t)}
\mbox{ and }
\hat{U}(\omega)
	= \frac{H(t-\tau)}{\sqrt{2 \pi}} e^{-i \omega x - \omega^{2}
          \kappa (t-\tau)}	.
\]
Apply the inverse Fourier transform to $\hat{U}$ to determine the
principal solution portion of Green's function.
\[
%\label{eq:green:heat:principalU}
U(x, t; \xi, \tau)
	= \frac{H(t-\tau)}{\sqrt{4 \pi\kappa (t-\tau)}} e^{-\frac{(\xi-x)^{2}}{4 \kappa
   (t-\tau)}}	.
\]
Since the other component of the Green's function must satisfy
$L^{\ast}[g] = 0$ subject to the boundary conditions at infinity then
$g(x, t; \xi, \tau) = 0$.
Thus the Green's function $G(x, t; \xi, \tau) = U(x,
t; \xi, \tau)$.

\end{frame}
%%

\begin{frame}\frametitle{Initial Value Problem}

%\label{eq:green:heat:unboundedIBVP}
\begin{align*}
L[u]
	= u_{t} - \kappa u_{xx}
	&= Q(x, t)
\mbox{ for $-\infty < x < \infty$ and $t > 0$}	\\
u(x, 0)
	&= f(x)
\mbox{ for $-\infty < x < \infty$.}
\end{align*}
The formal adjoint equation is defined over a region $R$.
Replacing $v$ with the Green's function results in the equation,
\[
\iint_{R} L[u] G \, dA
	= \oint_{\partial R} [(-\kappa u_{\xi} G + \kappa u G_{\xi})
        \mathbf{i} + u G \mathbf{j}] \cdot \mathbf{N} \, ds +
\iint_{R} u L^{\ast}[G] \, dA	.
\]

\end{frame}
%%

\begin{frame}\frametitle{Region $R$}

\begin{center}
\resizebox{1.00\textwidth}{!}{\includegraphics{unboundedheatdomain}}
\end{center}
%\label{eq:green:heat:unboundedsoln}
\begin{align*}
u(x, t)
	= {} & \int_{-\infty}^{\infty} f(\xi) G(x, t; \xi, 0) \, d\xi	\\
	&+ \int_{0}^{t} \int_{-\infty}^{\infty} Q(\xi, \tau) G(x, t; \xi, \tau)
\, d\xi \, d\tau	.
\end{align*}

\end{frame}
%%

\begin{frame}\frametitle{Semi-Infinite Domain}

%\label{eq:green:heat:semiinfiniteIBVP}
\begin{align*}
L[u]
	= u_{t} - \kappa u_{xx}
	&= Q(x, t)
\mbox{ for $0 < x < \infty$ and $t > 0$}	\\
u(0, t)
	&= h(t)
\mbox{ for $t > 0$}	\\
u(x, 0)
	&= f(x)
\mbox{ for $0 < x < \infty$.}
\end{align*}

The Green's function for the semi-infinite domain is
\[
%\label{eq:green:heat:semiinfiniteGreen}
G(x, t; \xi, \tau)
	= U(x, t; \xi, \tau) - U(-x, t; \xi, \tau)	.
\]

The solution can be expressed as
%\label{eq:green:heat:semiinfinitesoln}
\begin{align*}
u(x, t)
	= {} & \int_{0}^{t} \kappa h(\tau) G_{\xi}(x, t; 0, \tau) \, d\tau +
\int_{0}^{\infty} f(\xi) G(x, t; \xi, 0) \, d\xi	\\
	&+ \int_{0}^{t} \int_{0}^{\infty} Q(\xi, \tau) G(x, t; \xi, \tau)
\, d\xi \, d\tau	.
\end{align*}

\end{frame}
%%

\begin{frame}\frametitle{Example}

%\label{xmpl:green:heat:semiinfinitesoln}
Consider the initial, boundary value problem,
\begin{align*}
u_{t} - u_{xx}
	&= 1 + \sin (x \, t)
\mbox{ for $0 < x < \infty$ and $t > 0$}	\\
u(0, t)
	&= e^{-t}
\mbox{ for $t > 0$}	\\
u(x, 0)
	&= \cos^{2} x
\mbox{ for $0 < x < \infty$.}
\end{align*}

\end{frame}
%%

\begin{frame}\frametitle{Solution (1 of 2)}

The solution may be
formally written as the sum of the integrals,
\begin{align*}
u(x, t)
	= {} & \int_{0}^{t} e^{-\tau} G_{\xi}(x, t; 0, \tau) \, d\tau +
\int_{0}^{\infty} (\cos^{2} \xi) G(x, t; \xi, 0) \, d\xi	\\
	&+ \int_{0}^{t} \int_{0}^{\infty} (1 + \sin (\xi \tau))
G(x, t; \xi, \tau) \, d\xi \, d\tau	.
\end{align*}

\end{frame}
%%

\begin{frame}\frametitle{Solution (2 of 2)}

\begin{center}
\resizebox{1.00\textwidth}{!}{\includegraphics{semiinfiniteheat}}
\end{center}

\end{frame}
%%

%\begin{frame}\frametitle{Homework}

%\begin{itemize}
%\item Read Section $x.y$
%\item Exercises: 
%\end{itemize}

%\end{frame}
%%

%%%
\end{document}

%%%%
%%%% EOF
%%%%
