%%%%		-*- 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/05/2025
%%%%
%%%% Purpose:   Heat Equation in a Sphere
%%%%

\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 in a Sphere}
\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 use spherical coordinates to model the diffusion of heat energy
  throughout a sphere,
\item use separation of variables to determine a product solution to
  the hear equation in a sphere, and
\item use the orthogonality properties of eigenfunctions to determine
  the series coefficients for a solution to the initial boundary value problem.
\end{itemize}

\end{frame}
%%

\begin{frame}\frametitle{Mathematical Model}

Consider a solid sphere of radius $a$ constructed of a homogeneous
material.
The surface of the sphere is kept at temperature $0$ and at time $t =
0$ the initial distribution of temperature within the sphere is
described by the function $f(\rho, \varphi, \theta)$ where $(\rho,
\varphi, \theta)$ are the spherical coordinates.
If $u(\rho, \varphi, \theta, t)$ denotes the temperature in the sphere
at time $t$, then an initial boundary value problem which models this
situation can be written as,
\begin{align*}
%\label{eq:apps:heatspherepde}
u_{t}
	&= \kappa \Delta u
\mbox{ for $0 \le \rho < a$, $0 < \varphi < \pi$, $-\pi < \theta <
              \pi$, $t > 0$}	\\
%\label{eq:apps:heatspherebc}
u(a, \varphi, \theta, t)
	&= 0
\mbox{ for $0 < \varphi < \pi$, $-\pi < \theta < \pi$, $t > 0$}	\\
%\label{eq:apps:heatsphereic}
u(\rho, \varphi, \theta, 0)
	&= f(\rho, \varphi, \theta)
\mbox{ for $0 \le \rho < a$, $0 < \varphi < \pi$, $-\pi < \theta <
              \pi$.}
\end{align*}

\end{frame}
%%

\begin{frame}\frametitle{Separation of Variables (1 of 2)}

Assume a product solution of the form $u(\rho, \varphi, \theta, t) =
T(t) R(\rho) F(\varphi, \theta)$ exists for the partial differential
equation.
The variables can be
separated as follows:
\begin{align*}
T'(t) R(\rho) F(\varphi, \theta)
	= {} & \kappa T(t) R''(\rho) F(\varphi, \theta) +
\frac{2 \kappa}{\rho} T(t) R'(\rho) F(\varphi, \theta)	\\
	&+ \frac{\kappa}{\rho^{2}} \left( T R F_{\varphi\varphi} +
\cot \varphi T R F_{\varphi} +
\csc^{2} \varphi T R F_{\theta\theta} \right)	\\
\frac{T'(t)}{\kappa T(t)}
	= {} & \frac{R''(\rho)}{R(\rho)} +
\frac{2}{\rho} \frac{R'(\rho)}{R(\rho)}
	+ \frac{1}{\rho^{2} F} \left( F_{\varphi\varphi} +
\cot \varphi F_{\varphi} + \csc^{2} \varphi F_{\theta\theta} \right)	.
\end{align*}
The left-hand side of the equation depends only on $t$ while the
right-hand side depends only on the spatial variables $(\rho, \varphi,
\theta)$.
Hence both sides are equal to a constant denoted as $-\lambda$.

\end{frame}
%%

\begin{frame}\frametitle{Separation of Variables (2 of 2)}

Working on the right-hand side of the last equation, the variables
can be further separated as
\begin{align*}
-\lambda
	&= \frac{R''(\rho)}{R(\rho)} +
\frac{2}{\rho} \frac{R'(\rho)}{R(\rho)} +
\frac{1}{\rho^{2} F(\varphi, \theta)} \left( F_{\varphi\varphi} +
\cot \varphi F_{\varphi} +
\csc^{2} \varphi F_{\theta\theta} \right)	\\
\frac{\Delta F(\varphi, \theta)}{F(\varphi, \theta)}
	&= -\lambda \rho^{2} - \frac{\rho^{2} R''(\rho)}{R(\rho)}
              - \frac{2 \rho R'(\rho)}{R(\rho)}	.
\end{align*}
The numerator on left-hand side of the last equation involves the
Laplacian operator applied to a function of $(\varphi, \theta)$.
The right-hand side depends only on $\rho$.
Again both sides must equal a constant.

\vspace*{0.10in}

The differential equation induced by the left-hand side of the last
equation has the spherical harmonic functions $Y_{n}^{m}(\varphi,
\theta)$ as solutions and eigenvalues $n (n+1)$ for $n = 0, 1, 2, \ldots$.

\end{frame}
%%

\begin{frame}\frametitle{Radial Factor of Solution}

The implied ordinary differential
equation involving the independent variable $\rho$ is
\[
\rho^{2} R''(\rho) + 2 \rho R'(\rho) + (\lambda \rho^{2} - n (n+1))
R(\rho)
	= 0	.
\]
Thinking ahead to the time-dependent portion of the product solution,
it is expected for $\lambda$ to be positive.
Based on prior exposure to the heat equation with homogeneous
Dirichlet boundary conditions and the physical intuition that, in the
absence of sources of heat energy within the sphere, the asymptotic
temperature distribution within the sphere should be zero.
Thus $T(t)$ should decay asymptotically to zero.
To clarify the notation, then replace $\lambda$ with $\nu^{2}$ where
$\nu > 0$.

\vspace*{0.10in}

Consider the differential equation now written as
\[
\rho^{2} R''(\rho) + 2 \rho R'(\rho) + (\nu^{2} \rho^{2} - n (n+1))
R(\rho)
	= 0	.
\]

\end{frame}
%%

\begin{frame}\frametitle{Finding the Radial Solution}

Make the change of variable $x = \nu \rho$, then
\[
x^{2} \frac{d^{2} R}{d x^{2}} + 2 x \frac{d R}{d x} + (x^{2} - n
(n+1)) R(x)
	= 0
\]
which is the spherical Bessel's equation.
The general solution to the spherical
Bessel's equation is
\[
R_{n}(x)
	= A_{n} j_{n}(x) + B_{n} y_{n}(x)	.
\]
However, since $y_{n}(x)$ is unbounded as $x \to 0^{+}$, the
coefficient $B_{n}$ must be chosen to be $0$.

\vspace*{0.10in}

Hence $R_{n}(\rho) = A_{n} j_{n}(\nu \rho)$.

\end{frame}
%%

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

The homogeneous Dirichlet boundary condition requires $R_{n}(a) = 0$
and thus $\nu a = \lambda_{n+1/2,q}$, the $q$th zero of the Bessel
function of the first kind of order $n+1/2$.

\vspace*{0.10in}

Finally the radial portion of the product solution may be expressed
as,
\[
R_{n, m}(\rho)
	= j_{n}( \lambda_{n+1/2,q} \rho/a )	.
\]

\vspace*{0.10in}

With $\lambda = \nu^{2} = \lambda_{n+1/2,q}^{2}$,
the time-dependent ordinary differential equation can be expressed as
\[
\frac{T'(t)}{\kappa T(t)}
	= -\left( \frac{\lambda_{n+1/2,q}}{a} \right)^{2}
\implies
T_{n, q}(t)
	= e^{-\kappa \lambda_{n+1/2,q}^{2} t/a^{2}}	.
\]

\end{frame}
%%

\begin{frame}\frametitle{Product Solution}

Multiplying the factors of the product solution produces
\[
u_{n, m, q}(\rho, \varphi, \theta, t)
	= j_{n}\left( \frac{\lambda_{n+1/2,q} \rho}{a} \right)
Y_{n}^{m}(\varphi, \theta) e^{-\kappa \lambda_{n+1/2,q}^{2} t/a^{2}}	.
\]

By the Principle of Superposition, a formal solution to the heat
equation on the sphere can be expressed as a triple infinite series,
\[
u(\rho,\varphi,\theta, t)
	= \sum_{n=0}^{\infty} \sum_{q=1}^{\infty} \sum_{m=-n}^{n} A_{n, m, q}
j_{n}\left( \frac{\lambda_{n+1/2,q} \rho}{a} \right)
Y_{n}^{m}(\varphi, \theta) e^{-\kappa \lambda_{n+1/2,q}^{2} t/a^{2}}	.
\]
The coefficients $A_{n, m, q}$ are determined by the initial temperature
distribution within the sphere.

\end{frame}
%%

\begin{frame}\frametitle{Initial Conditions}
\fontsize{9pt}{10.8}\selectfont

When $t = 0$,
\[
f(\rho, \varphi, \theta)
	= \sum_{n=0}^{\infty} \sum_{q=1}^{\infty} \sum_{m=-n}^{n} A_{n, m, q}
j_{n}\left( \frac{\lambda_{n+1/2,q} \rho}{a} \right)
Y_{n}^{m}(\varphi, \theta)	.
\]

Multiply by
$\overline{U_{n, m, q}(\rho,\varphi,\theta)} \rho^{2} \sin \varphi$ and
integrate over the sphere of radius $a$.
\[
A_{n, m, q}
	= \frac{2}{a^{3} \left( j_{n+1}(\lambda_{n+1/2,q}) \right)^{2}}
\int_{0}^{a} \int_{0}^{\pi} \int_{-\pi}^{\pi}
f(\rho, \varphi, \theta) \overline{U_{n, m, q}(\rho,\varphi,\theta)}
\rho^{2} \sin \varphi \, d\theta \, d\varphi \, d\rho
\]

\end{frame}
%%

\begin{frame}\frametitle{Example}

Find the temperature distribution within a sphere described by the
following initial boundary value problem.
\begin{align*}
%\label{eq:apps:heatspherepde}
u_{t}
	&= \kappa \Delta u
\mbox{ for $0 \le \rho < a$, $0 < \varphi < \pi$, $-\pi < \theta <
              \pi$, $t > 0$}	\\
%\label{eq:apps:heatspherebc}
u(a, \varphi, \theta, t)
	&= 0
\mbox{ for $0 < \varphi < \pi$, $-\pi < \theta < \pi$, $t > 0$}	\\
%\label{eq:apps:heatsphereic}
u(\rho, \varphi, \theta, 0)
	&= j_{2}\left( \frac{\lambda_{5/2, 1} \rho}{a} \right)
\left( P_{2}(\cos \varphi) + \sin (2 \theta) P_{2}^{2}(\cos \varphi) \right)	\\
	&\quad \mbox{ for $0 \le \rho < a$, $0 < \varphi < \pi$, $-\pi < \theta <
              \pi$.}
\end{align*}

\end{frame}
%%

\begin{frame}\frametitle{Solution}

Quite a great deal of work is saved if the initial condition is
written in the equivalent form
\[
f(\rho, \varphi, \theta)
	= j_{2}\left( \frac{\lambda_{5/2, 1} \rho}{a} \right)
\left( \sqrt{\frac{4 \pi}{5}} Y_{2}^{0}(\varphi, \theta) +
2 i \sqrt{\frac{6 \pi}{5}} (Y_{2}^{-2}(\varphi, \theta) -
Y_{2}^{2}(\varphi, \theta)) \right)	.
\]
Once the initial condition is expressed in terms of
eigenfunctions, the solution can be expressed as
\begin{align*}
u(\rho, \varphi, \theta, t)
	= {} & \sqrt{\frac{4 \pi}{5}} Y_{2}^{0}(\varphi, \theta)
A_{2, 0, 1} j_{2} \left( \frac{\lambda_{5/2, 1} \rho}{a} \right)
e^{-\kappa \lambda_{5/2, 1}^{2} t/a^{2}}	\\
	&+ 2 i \sqrt{\frac{6 \pi}{5}} Y_{2}^{-2}(\varphi, \theta)
A_{2, -2, 1} j_{2} \left( \frac{\lambda_{5/2, 1} \rho}{a} \right)
e^{-\kappa \lambda_{5/2, 1}^{2} t/a^{2}}	\\
	&- 2 i \sqrt{\frac{6 \pi}{5}} Y_{2}^{2}(\varphi, \theta)
A_{2, 2, 1} j_{2} \left( \frac{\lambda_{5/2, 1} \rho}{a} \right)
e^{-\kappa \lambda_{5/2, 1}^{2} t/a^{2}}	\\
	= {} & e^{-\kappa \lambda_{5/2, 1}^{2} t/a^{2}} f(\rho, \varphi, \theta)	.
\end{align*}

\end{frame}
%%

%\begin{frame}\frametitle{Homework}

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

%\end{frame}
%%

%%%
\end{document}

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