%%%%		-*- 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:      04/03/2025
%%%%
%%%% Purpose:   Discretization of Initial and Boundary Conditions
%%%%

\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{Discretization of Initial and Boundary Conditions}
\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 discrete approximations to Dirichlet, Neumann, and Robin
  boundary conditions, and
\item develop discrete approximations to initial conditions for
  initial boundary value problems.
\end{itemize}

\end{frame}
%%

\begin{frame}\frametitle{Initial Conditions}

Suppose the initial condition is described as
\[
u(x, 0)
	= f(x)
\mbox{ for $0 < x < L$.}
\]
The interval $[0, L]$ is partitioned into $N$ equally sized
subintervals of width $h = L/N$ with end points $x_{i} = i \, h$ for
$i = 0, 1, \ldots, N$.

\vspace*{0.10in}

Discretizing the initial condition is straight forward as $u_{i}^{0} =
u(i \, h, 0) = f(i \, h)$ for $i = 0, 1, \ldots, N$.

\end{frame}
%%

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

Suppose the initial conditions are described by the equations:
\begin{align*}
u(0, t)
	&= a(t)	\\
u(L, t)
	&= b(t)
\end{align*}
for $t > 0$.
The interval $[0, L]$ is partitioned into $N$ equally sized
subintervals of width $h = L/N$ with end points $x_{i} = i \, h$ for
$i = 0, 1, \ldots, N$.

\vspace*{0.10in}

The Dirichlet boundary conditions are handled by assigning
the known values at the endpoints of the interval, $u_{0}^{j} = u((0)
h, j \, k) = a(j \, k)$ and $u_{N}^{j} = u(N \, h, j \, k) = b(j \,
k)$ for $j \in \mathbb{N}$.

\end{frame}
%%

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

Suppose the boundary conditions are:
\begin{align*}
K_{0} u_{x}(0, t)
	&= \alpha (u(0, t) - a(t))	\\
K_{0} u_{x}(L, t)
	&= -\beta (u(L, t) - b(t))	,
\end{align*}
for $t > 0$
where $K_{0}$, $\alpha$, and $\beta$ are positive constants and $a(t)$
and $b(t)$ are known functions.

\vspace*{0.10in}

\uncover<2->{%
At $x = 0$ a forward difference formula for the partial derivative
with respect to $x$ is employed.
For $j \in \mathbb{N}$,
\[
K_{0} \frac{(u_{1}^{j} - u_{0}^{j})}{h}
	= \alpha (u_{0}^{j} - a(j \, k))	.
\]
At $x = L$ a backward difference formula is used, which when written as
\[
K_{0} \frac{(u_{N-1}^{j} - u_{N}^{j})}{h}
	= \beta (u_{N}^{j} - b(j \, k))	,
\]
eliminates the minus sign from the right-hand side of the boundary
condition.
These are $O(h)$ approximations to the boundary conditions.
}

\end{frame}
%%

\begin{frame}\frametitle{Fictitious Points}

If two fictitious points at $x = -h$ and $x = L+h$ are introduced, the
$O(h^{2})$ accurate centered difference formula can be used.
In this case the discretized Robin boundary conditions can be
expressed as
\begin{align*}
K_{0} \frac{(u_{1}^{j} - u_{-1}^{j})}{2h}
	&= \alpha (u_{0}^{j} - a(j \, k))	\\
K_{0} \frac{(u_{N+1}^{j} - u_{N-1}^{j})}{2h}
	&= -\beta (u_{N}^{j} - b(j \, k))
\end{align*}

\end{frame}
%%

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

Recall that as $\alpha \to 0$ and $\beta \to 0$ the Robin boundary
conditions asymptotically approach homogeneous Neumann boundary
conditions.

\end{frame}
%%

%\begin{frame}\frametitle{Homework}

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

%\end{frame}
%%

%%%
\end{document}

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