%%%%		-*- 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:      02/12/2025
%%%%
%%%% Purpose:   Heat Equation on a Rectangular Domain
%%%%

\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{Heat Equation on a Rectangular Domain}
\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 learn:
\begin{itemize}
\item to find the eigenfunctions and eigenvalues for common boundary
  value problems on a rectangular domain,
\item to use a double Fourier series to express the solution to an
  initial, boundary value problem for the heat equation on a
  rectangular domain.
\end{itemize}

\end{frame}
%%

\begin{frame}\frametitle{Geometry of the Domain}

Consider the two-dimensional heat equation and its initial conditions
on the rectangle below.
\begin{align*}
u_{t}
	&= \kappa (u_{xx} + u_{yy})
\mbox{ for $(x, y) \in (0, L) \times (0, M)$, $t > 0$}	\\
u(x, y, 0)
	&= f(x, y)
\mbox{ for $(x, y) \in [0, L] \times [0, M]$.}
\end{align*}
\begin{center}
\resizebox{0.80\textwidth}{!}{\includegraphics{Rect}}
\end{center}

\end{frame}
%%

\begin{frame}\frametitle{Separation of Variables}

The method of separation of variables will be used to find the
eigenfunctions and eigenvalues corresponding to the boundary
conditions imposed on the rectangle.

\vspace*{0.10in}

\uncover<2->{%
Suppose $u(x, y, t) = X(x) Y(y) T(t)$ then
\begin{align*}
X(x) Y(y) T'(t)
	&= \kappa (X''(x) Y(y) T(t) + X(x) Y''(y) T(t))
\mbox{ or }	\\
\frac{T'(t)}{\kappa T(t)} 
	&= \frac{X''(x)}{X(x)} + \frac{Y''(y)}{Y(y)}
	= \alpha
\end{align*}
The expression $\alpha$ must be a constant (why?).
}

\end{frame}
%%

\begin{frame}\frametitle{Time-independent Portion of Solution}

\begin{align*}
\frac{X''(x)}{X(x)} + \frac{Y''(y)}{Y(y)}
	&= \alpha	\\
\frac{X''(x)}{X(x)}
	&= \alpha - \frac{Y''(y)}{Y(y)}
	= \beta	.
\end{align*}

\begin{itemize}
\item $\beta$ must be a constant. 
\item The constants $\alpha$ and $\beta$ are further restricted by the
boundary conditions imposed at the edges of rectangle $R$.
\end{itemize}

\end{frame}
%%

\begin{frame}\frametitle{Dirichlet Boundary Conditions}

Suppose the boundary conditions on all four sides of the rectangle are
of homogeneous Dirichlet type.
\begin{align*}
u(0, y, t)
	&= u(L, y, t)
	= 0	\\
u(x, 0, t)
	&= u(x, M, t)
	= 0
\end{align*}
for $0 \le y \le M$, $0 \le x \le L$, and $t \ge 0$.

\vspace*{0.10in}

The nonzero solutions to the boundary value problem,
\begin{align*}
X''(x) - \beta X(x)
	&= 0	\\
X(0)
	&= X(L)
	= 0
\end{align*}
exist only when $\beta = -\sigma_{n}^{2}$ where $\sigma_{n} = n \pi/L$,
$n \in \mathbb{N}$.
The nontrivial solutions corresponding to $-\sigma_{n}^{2}$ are
nonzero constant multiples of 
\[
X_{n}(x) = \sin \left( \frac{n \pi x}{L} \right)	.
\]

\end{frame}
%%

\begin{frame}\frametitle{Finding the $y$-dependent Factor}

\begin{align*}
\alpha - \frac{Y''(y)}{Y(y)}
	&= \beta = -\left( \frac{n \pi}{L} \right)^{2}	\\
Y''(y) - \left[ \alpha + \left( \frac{n \pi}{L} \right)^{2} \right] Y(y)
	&= 0
\end{align*}
Nonzero solutions satisfying the homogeneous Dirichlet boundary
conditions exist when 
\[
\alpha
	= -\pi^{2} \left[ \left( \frac{m}{M} \right)^{2} + \left(
\frac{n}{L} \right)^{2} \right]
\]
and are nonzero constant multiples of 
\[
Y_{m}(y) = \sin \left( \frac{m \pi y}{M} \right)
\]
for $m = 1, 2, \ldots$ and $n = 1, 2, \ldots$.

\end{frame}
%%

\begin{frame}\frametitle{Summary of Product Solution So Far}

The functions
\[
X_{n}(x) Y_{m}(y)
	= \sin \left( \frac{n \pi x}{L} \right) \sin \left( \frac{m \pi y}{M} \right)
\]
will be called the eigenfunctions of the
boundary value problem and the constants
\[
\lambda_{m, n}
	= \pi^{2} \left[ \left( \frac{m}{M} \right)^{2} + \left(
\frac{n}{L} \right)^{2} \right]
\]
for $m, n \in \mathbb{N}$ will be their corresponding
eigenvalues.

\end{frame}
%%

\begin{frame}\frametitle{Finding the $t$-dependent Factor}

\begin{align*}
\frac{T'(t)}{\kappa T(t)}
	&= \alpha	\\
T'(t)
	&= -\kappa \pi^{2} \left[ \left( \frac{m}{M} \right)^{2} + \left(
   \frac{n}{L} \right)^{2} \right] T(t)	\\
T_{m, n}(t) = e^{-\kappa \pi^{2} \left[ \left( \frac{m}{M} \right)^{2} + \left(
   \frac{n}{L} \right)^{2} \right] t}
\end{align*}
for $m, n \in \mathbb{N}$.

\vspace*{0.10in}

\uncover<2->{%
The product solutions take the form,
\[
u_{m, n}(x, y, t)
	= e^{-\kappa  \pi^{2} \left[ \left( \frac{m}{M} \right)^{2} + \left(
   \frac{n}{L} \right)^{2} \right] t} \sin \left( \frac{n \pi x}{L}
        \right) \sin \left( \frac{m \pi y}{M}
        \right)	.
\]
}

\end{frame}
%%

\begin{frame}\frametitle{Double Fourier Series}

Using the principle of superposition, the general solution to this
initial boundary value problem can be expressed as
\[
u(x, y, t)
	= \sum_{m=1}^{\infty} \sum_{n=1}^{\infty}
a_{m, n} e^{-\kappa \pi^{2} \left[ \left( \frac{m}{M} \right)^{2} + \left(
   \frac{n}{L} \right)^{2} \right] t} \sin \left(
\frac{n \pi x}{L} \right) \sin \left( \frac{m \pi y}{M}
\right)	,
\]
where the coefficients $a_{m, n}$ must be selected so that the
solution satisfies the initial condition.

\end{frame}
%%

\begin{frame}\frametitle{Satisfying the Initial Conditions}

\[
u(x, y, 0)
	= \sum_{m=1}^{\infty} \sum_{n=1}^{\infty} a_{m, n} \sin \left(
\frac{n \pi x}{L} \right) \sin \left( \frac{m \pi y}{M}
\right)
	= f(x, y)
\]
Since the eigenfunctions are orthogonal on $R$, then
\[
a_{m, n}
	= \frac{4}{L M} \int_{0}^{M} \int_{0}^{L}
f(x, y) \sin \left( \frac{m \pi y}{M} \right)
\sin \left( \frac{n \pi x}{L} \right) \, dx \, dy	,
\]
provided the integrals exist.

\end{frame}
%%

\begin{frame}\frametitle{Example}

Find the solution to the initial boundary value problem:
\begin{align*}
u_{t}
	&= u_{xx} + u_{yy}
\mbox{ for $(x, y) \in (0, 1) \times (0, 2)$ and $t > 0$}	\\
u(0, y, t)
	&= u(1, y, t) = 0
\mbox{ for $0 < y < 2$ and $t > 0$}	\\
u(x, 0, t)
	&= u(x, 2, t) = 0
\mbox{ for $0 < x < 1$ and $t > 0$}	\\
u(x, y, 0)
	&= 1000 x (1-x) \sin (2 \pi y)
\mbox{ for $(x, y) \in [0, 1] \times [0, 2]$.}
\end{align*}

\end{frame}
%%

\begin{frame}<handout:0>\frametitle{Solution (1 of 2)}

In this example $\kappa = 1$, $L = 1$, and $M = 2$ and the boundary
conditions are of the homogeneous Dirichlet type.
\[
a_{m, n}
	= \frac{4}{(1)(2)} \int_{0}^{2} \int_{0}^{1} 1000 x (1-x) \sin (2
\pi y) \sin (n \pi x) \sin \left( \frac{m \pi y}{2} \right) \, dx \, dy
\]
By the orthogonality property of the sine functions $a_{m, n} = 0$ for
$m \ne 4$.
\begin{align*}
a_{4, n}
	&= 2000 \int_{0}^{2} \int_{0}^{1} x (1-x) \sin^{2} (2 \pi y) \sin (n
\pi x) \, dx \, dy	\\
	&= 2000 \int_{0}^{1} x (1 - x) \sin (n \pi x) \left[ \int_{0}^{2} \sin^{2}
(2 \pi y) \, dy \right] \, dx	\\
	&= 2000 \int_{0}^{1} x (1 - x) \sin (n \pi x) \, dx	\\
	&= \left\{ \begin{array}{rl}
\frac{8000}{n^{3} \pi^{3}}	& \mbox{for $n$ odd,}	\\
0	& \mbox{for $n$ even.}
\end{array} \right.
\end{align*}

\end{frame}
%%

\begin{frame}<handout:0>\frametitle{Solution (2 of 2)}

\[
u(x, y, t)
	\sim \frac{8000}{\pi^{3}} \sin (2 \pi y)
\sum_{n=1}^{\infty}
\frac{e^{-\pi^{2} ((2n-1)^{2} + 4) t}}{(2n-1)^{3}} \sin ((2n-1) \pi x)	.
\]
\begin{center}
\resizebox{1.00\textwidth}{!}{\includegraphics{FSS2D}}
\end{center}

\end{frame}
%%

\begin{frame}\frametitle{Mixed Dirichlet/Neumann Boundary Conditions}

Suppose the boundary conditions are of homogeneous Dirichlet type on a
set of opposing boundaries and of homogeneous Neumann type on the
other set of opposing boundaries.
\begin{align*}
u(0, y, t)
	&= u(L, y, t)
	= 0	\\
u_{y}(x, 0, t)
	&= u_{y}(x, M, t)
	= 0
\end{align*}
for $0 \le y \le M$, $0 \le x \le L$, and $t \ge 0$.

\vspace*{0.10in}

The nonzero solutions to the boundary value problem,
\begin{align*}
X''(x) - \beta X(x)
	&= 0	\\
X(0)
	&= X(L)
	= 0
\end{align*}
exist only when $\beta = -\sigma_{n}^{2}$ where $\sigma_{n} = n \pi/L$,
$n \in \mathbb{N}$.
The nontrivial solutions corresponding to $-\sigma_{n}^{2}$ are
nonzero constant multiples of 
\[
X_{n}(x) = \sin \left( \frac{n \pi x}{L} \right)	.
\]

\end{frame}
%%

\begin{frame}\frametitle{Finding the $y$-dependent Factor}

\begin{align*}
\alpha - \frac{Y''(y)}{Y(y)}
	&= \beta = -\left( \frac{n \pi}{L} \right)^{2}	\\
Y''(y) - \left[ \alpha + \left( \frac{n \pi}{L} \right)^{2} \right] Y(y)
	&= 0
\end{align*}
Nonzero solutions satisfying the homogeneous Neumann boundary
conditions exist when 
\[
\alpha
	= -\pi^{2} \left[ \left( \frac{m}{M} \right)^{2} + \left(
\frac{n}{L} \right)^{2} \right]
\]
and are nonzero constant multiples of 
\[
Y_{m}(y) = \cos \left( \frac{m \pi y}{M} \right)
\]
for $m = 0, 1, 2, \ldots$ and $n = 1, 2, \ldots$.

\end{frame}
%%

\begin{frame}\frametitle{Summary of Product Solution So Far}

The functions
\[
X_{n}(x) Y_{m}(y)
	= \sin \left( \frac{n \pi x}{L} \right) \cos \left( \frac{m \pi y}{M} \right)
\]
will be called the eigenfunctions of the
boundary value problem and the constants
\[
\lambda_{m, n}
	= \pi^{2} \left[ \left( \frac{m}{M} \right)^{2} + \left(
\frac{n}{L} \right)^{2} \right]
\]
for $m \in \mathbb{N} \cup \{ 0 \}$, $n \in \mathbb{N}$ will be their corresponding
eigenvalues.

\end{frame}
%%

\begin{frame}\frametitle{Finding the $t$-dependent Factor}

\begin{align*}
\frac{T'(t)}{\kappa T(t)}
	&= \alpha	\\
T'(t)
	&= -\kappa \pi^{2} \left[ \left( \frac{m}{M} \right)^{2} + \left(
   \frac{n}{L} \right)^{2} \right] T(t)	\\
T_{m, n}(t) = e^{-\kappa \pi^{2} \left[ \left( \frac{m}{M} \right)^{2} + \left(
   \frac{n}{L} \right)^{2} \right] t}
\end{align*}
for $m \in \mathbb{N} \cup \{ 0 \}$, $n \in \mathbb{N}$.

\vspace*{0.10in}

\uncover<2->{%
The product solutions take the form,
\[
u_{m, n}(x, y, t)
	= e^{-\kappa  \pi^{2} \left[ \left( \frac{m}{M} \right)^{2} + \left(
   \frac{n}{L} \right)^{2} \right] t} \sin \left( \frac{n \pi x}{L}
        \right) \cos \left( \frac{m \pi y}{M}
        \right)	.
\]
}

\end{frame}
%%

\begin{frame}\frametitle{Double Fourier Series}

Using the principle of superposition, the general solution to this
initial boundary value problem can be expressed as
\[
u(x, y, t)
	= \sum_{m=0}^{\infty} \sum_{n=1}^{\infty}
a_{m, n} e^{-\kappa \pi^{2} \left[ \left( \frac{m}{M} \right)^{2} + \left(
   \frac{n}{L} \right)^{2} \right] t} \sin \left(
\frac{n \pi x}{L} \right) \cos \left( \frac{m \pi y}{M}
\right)	,
\]
where the coefficients $a_{m, n}$ must be selected so that the
solution satisfies the initial condition.

\end{frame}
%%

\begin{frame}\frametitle{Satisfying the Initial Conditions}

\[
u(x, y, 0)
	= \sum_{m=0}^{\infty} \sum_{n=1}^{\infty} a_{m, n} \sin \left(
\frac{n \pi x}{L} \right) \cos \left( \frac{m \pi y}{M}
\right)
	= f(x, y)
\]
Since the eigenfunctions are orthogonal on $R$, then
\[
a_{m, n}
	= \frac{4}{L M} \int_{0}^{M} \int_{0}^{L}
f(x, y) \cos \left( \frac{m \pi y}{M} \right)
\sin \left( \frac{n \pi x}{L} \right) \, dx \, dy	,
\]
provided the integrals exist.

\end{frame}
%%

\begin{frame}\frametitle{Example}

Find the solution to the initial boundary value problem:
\begin{align*}
u_{t}
	&= u_{xx} + u_{yy}
\mbox{ for $(x, y) \in (0, 1) \times (0, 1)$ and $t > 0$}	\\
u(0, y, t)
	&= 0
\mbox{ and } u(1, y, t) = 0
\mbox{ for $0 < y < 1$ and $t > 0$}	\\
u_{y}(x, 0, t)
	&= u_{y}(x,1,t) = 0
\mbox{ for $0 < x < 1$ and $t > 0$}	\\
u(x, y, 0)
	&= (1 + 4 x) + \sin (\pi x) \cos (2 \pi y)
\mbox{ for $(x, y) \in [0, 1] \times [0, 1]$.}
\end{align*}

\end{frame}
%%

\begin{frame}<handout:0>\frametitle{Solution (1 of 2)}

In this example $\kappa = 1$, $L = 1$, and $M = 1$.

\vspace*{0.10in}

The double series solution for the initial boundary value
problem will resemble
\[
u(x, y, t)
	= \sum_{m=0}^{\infty} \sum_{n=1}^{\infty} a_{m, n} e^{-\pi^{2}
(m^{2} + n^{2}) t} \sin (n \pi x) \cos (m \pi y)	.
\]

\end{frame}
%%

\begin{frame}<handout:0>\frametitle{Solution (2 of 2)}

When $t = 0$ and $m = 0$,
\[
a_{0, n}
	= 2 \int_{0}^{1} \int_{0}^{1} \sin (\pi x) \cos (2 \pi y) \sin (n \pi x)
\, dy \, dx
	= 0	.
\]
\uncover<2->{%
When $t = 0$ and $m \in \mathbb{N}$, then
\[
a_{m, n}
	= 4 \int_{0}^{1} \int_{0}^{1} \left[ \sin (\pi x) \cos (2 \pi y) \right]
\cos (m \pi y) \sin (n \pi x) \, dy \, dx
	= 0	.
\]
except for the case where $n = 1$ and $m = 2$.
\[
a_{2, 1}
	= 4 \int_{0}^{1} \int_{0}^{1} \sin^{2} (\pi x) \cos^{2} (2 \pi y) \, dy \, dx
	= 1
\]
The solution can be written concisely as
\[
u(x, y, t)
	= e^{-5 \pi^{2} t} \sin( \pi x ) \cos (2 \pi y)	.
\]
}

\end{frame}
%%

\begin{frame}<handout:0>\frametitle{Solution (3 of 3)}

\begin{center}
\resizebox{0.75\textwidth}{!}{\includegraphics{FSN2D}}
\end{center}

\end{frame}
%%

%\begin{frame}\frametitle{Homework}

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

%\end{frame}
%%

%%%
\end{document}

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