%%%%		-*- 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:   Steady-State Temperature 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{Steady-State Temperature 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 learn:
\begin{itemize}
\item to solve Laplace's equation in spherical coordinates, and
\item describe the steady-state temperature distribution in a sphere.
\end{itemize}

\end{frame}
%%

\begin{frame}\frametitle{Laplace's Equation in Spherical Coordinates}

\[
%\label{eq:spc:laplacianspherical}
\frac{\partial^{2} u}{\partial \rho^{2}} +
\frac{2}{\rho} \frac{\partial u}{\partial \rho} +
\frac{1}{\rho^{2}} \left(
\frac{\partial^{2} u}{\partial \varphi^{2}} +
\cot \varphi \frac{\partial u}{\partial \varphi} +
\csc^{2} \varphi \frac{\partial^{2} u}{\partial \theta^{2}}
\right)
	= 0
\]
The solutions to this equation should be
\begin{itemize}
\item bounded as $\rho \to 0^{+}$,
\item $2 \pi$-periodic in variable $\theta$, and
\item bounded as $\varphi \to 0^{+}$ and $\varphi \to \pi^{-}$.
\end{itemize}

\uncover<2->{%
Assuming a product solution of the form $u(\rho, \varphi, \theta) =
R(\rho) \Theta(\theta) \Phi(\varphi)$ we have shown
that $\Theta(\theta) \Phi(\varphi) =
Y_{n}^{m}(\varphi, \theta)$ for $n = 0, 1, 2, \ldots$ and $m = -n,
-n+1, \ldots, n$, the spherical harmonic functions.

\vspace*{0.10in}

\uncover<3->{%
The radially
dependent factor of the solution must satisfy the ordinary
differential equation,
\begin{align*}
\rho^{2} \frac{R''(\rho)}{R(\rho)} + 2 \rho \frac{R'(\rho)}{R(\rho)}
	&= n (n+1)	\\
\rho^{2} R''(\rho) + 2 \rho R'(\rho) - n (n+1) R(\rho)
	&= 0	.
\end{align*}
This is Euler's equation\index{Euler's equation} which
has general solution $R_{n}(\rho) = a_{n} \rho^{n} + b_{n} \rho^{-1-n}$.
}
}

\end{frame}
%%

\begin{frame}\frametitle{Solutions Inside/Outside a Sphere}

Solutions to Laplace's equation within a sphere are product
solutions of the form
\[
u_{n, m}(\rho, \varphi, \theta)
	= a_{n, m} \rho^{n} Y_{n}^{m}(\varphi, \theta)
\]
while solutions outside a sphere (which should be bounded as $\rho \to
\infty$ take the form
\[
v_{n, m}(\rho, \varphi, \theta)
	= b_{n, m} \rho^{-1-n} Y_{n}^{m}(\varphi, \theta)	.
\]
The superposition principle permits a sum of these product solutions
to solve Laplaces's equation and the orthogonality properties of the
factors coupled with a boundary condition allow the coefficients
$a_{n, m}$ or $b_{n, m}$ to be determined.

\end{frame}
%%

\begin{frame}\frametitle{Example}

Consider a solid spherical shell of radius $1$ whose center lies at the
origin of a three-dimensional coordinate system and for which the
temperature of the surface of the northern hemisphere is kept at
$100$C and the temperature of the surface of the southern hemisphere is $0$C.
Find an expression for the steady-state temperature distribution
within the sphere.

\end{frame}
%%

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

This example can be summarized as finding the solution to
the following boundary value problem.
\begin{align*}
\Delta u
	&= 0 \mbox{ for $0 < \rho < 1$, $0 \le \varphi \le \pi$, $0 \le
   \theta < 2 \pi$}	\\
u(1, \varphi, \theta)
	&= \left\{ \begin{array}{rl}
100	& \mbox{for $0 \le \varphi \le \frac{\pi}{2}$, $0 \le \theta <
      2 \pi$}	\\
0	& \mbox{for $\frac{\pi}{2} < \varphi \le \pi$, $0 \le \theta <
      2 \pi$}
\end{array} \right.
\end{align*}
Since the boundary condition is invariant in the azimuthal angle
$\theta$, the solution to Laplace's equation should not depend on $\theta$.
This implies $m = 0$ in the spherical harmonic functions or
equivalently that
\[
u(\rho, \varphi, \theta)
	= u(\rho, \varphi)
	= \sum_{n=0}^{\infty} a_{n} \rho^{n} Y_{n}^{0}(\varphi, \theta)
	= \sum_{n=0}^{\infty} a_{n} \rho^{n} P_{n}(cos \varphi)
\]
where $P_{n}(x)$ is the $n$th Legendre polynomial.

\end{frame}
%%

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

The boundary condition $u(1, \varphi)$ determines the values of the
series coefficients $a_{n}$,
\[
u(1, \varphi)
	= \sum_{n=0}^{\infty} a_{n} P_{n}(\cos \varphi)
	= \left\{ \begin{array}{rl}
100 & \mbox{for $0 \le \varphi \le \pi/2$,}	\\
0 & \mbox{for $\pi/2 < \varphi \le \pi$.}
\end{array} \right.
\]
Multiply both sides of the equation by $P_{m}(\cos \varphi) \sin \varphi$ and
integrate from from $\varphi = 0$ to $\varphi = \pi$.
\begin{align*}
\sum_{n=0}^{\infty} a_{n} \int_{0}^{\pi} P_{n}(\cos \varphi) P_{m}(\cos
  \varphi) \sin \varphi \, d\varphi
	&= 100 \int_{0}^{\pi/2} P_{m}(\cos \varphi) \sin \varphi \, d\varphi  \\
\sum_{n=0}^{\infty} a_{n} \int_{-1}^{1} P_{n}(x) P_{m}(x) \, dx
	&= 100 \int_{0}^{1} P_{m}(x) \, dx
\end{align*}

\end{frame}
%%

\begin{frame}\frametitle{Solution (3 of 4)}

\[
\sum_{n=0}^{\infty} a_{n} \int_{-1}^{1} P_{n}(x) P_{m}(x) \, dx
	= 100 \int_{0}^{1} P_{m}(x) \, dx
\]
The only nonzero term in the
infinite series on the left-hand side of the equation occurs when $m =
n$, thus
\[
\frac{2 a_{n}}{2n + 1}
	= 100 \int_{0}^{1} P_{n}(x) \, dx	.
\]
\uncover<2->{%
Evaluating the definite integral reveals $a_{0} = 50$, $a_{2n} = 0$
for $n \in \mathbb{N}$, and
\[
a_{2n-1}
	= \frac{50 (-1)^{n} (4n-1) (2n)!}{2^{2 n} (n!)^{2} (2n-1)}
\mbox{ for $n \in \mathbb{N}$.}
\]
The formal solution describing the temperature distribution
on the sphere is
\[
u(\rho, \varphi)
	= 50 - 50 \sum_{n=1}^{\infty} \frac{(-1)^{n} (2n)! (4n-1)}{2^{2n} (2n-1)
(n!)^{2}} \rho^{2n-1} P_{2n-1}(\cos \varphi)	.
\]
}

\end{frame}
%%

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

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

\end{frame}
%%

%\begin{frame}\frametitle{Homework}

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

%\end{frame}
%%

%%%
\end{document}

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