%%%%		-*- 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/18/2025
%%%%
%%%% Purpose:   Nonhomogeneous Wave Equation
%%%%

\documentclass[10pt]{beamer}
\usepackage{bbm}
\usepackage{mathtools}

\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{Nonhomogeneous Wave Equation}
\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{}

\end{frame}
%%

\begin{frame}\frametitle{Objectives}

In this lesson we will:
\begin{itemize}
\item extend Duhamel's principle to the wave equation, and
\item solve a nonhomogeneous wave equation using this method.
\end{itemize}

\end{frame}
%%

\begin{frame}\frametitle{Unbounded String}

Consider a vibrating string initially at rest in its equilibrium
position,
%\label{eq:NH:wave}
\begin{align*}
u_{tt}
	&= c^{2} u_{xx} + g(x, t)
\mbox{ for $-\infty < x < \infty$ and $t > 0$}	\\
u(x, 0)
	&= u_{t}(x, 0) = 0
\mbox{ for $-\infty < x < \infty$.}
\end{align*}
The nonhomogeneous term $g(x, t)$ can be interpreted as the
acceleration of the string at position $x$ at time $t$ and thus is
sometimes referred to as the
\textbf{applied acceleration}.

\end{frame}
%%

\begin{frame}\frametitle{Motivation of Duhamel's Principle}

\begin{itemize}
\item Let $\{ s_{i} \}_{i=0}^{n}$ be a partition of the
interval $[0, T]$ such that
\[
0
	= s_{0} \le s_{1} \le \cdots \le s_{i-1} \le s_{i} \le \cdots \le s_{n}
	= T	.
\]
\item For $i = 1, \ldots, n$ define $\Delta s_{i} = s_{i} - s_{i-1}$ and
define the support functions $\mathbbm{1}_{i}(t)$ as before.
\item Suppose at time $t = s_{i-1}$ the applied acceleration is turned
on and it is turned off at $t = s_{i}$.
\end{itemize}
The initial boundary value problem for the infinitely long string with
external acceleration applied only during $[s_{i-1}, s_{i})$ is
%\label{eq:NH:waveswitched}
\begin{align*}
u_{tt}
	&= c^{2} u_{xx} + \mathbbm{1}_{i}(t) g(x, t)
\mbox{ for $-\infty < x < \infty$ and $t > 0$}	\\
u(x, 0)
	&= u_{t}(x, 0) = 0
\mbox{ for $-\infty < x < \infty$.}
\end{align*}
If $u_{i}(x, t)$ is the solution to the corresponding initial value
problem for $i = 1, \ldots, n$,
then $\sum_{i=1}^{n} u_{i}(x, t) = u(x, t)$, the solution to
the initial value problem for $0 \le t \le T$.

\end{frame}
%%

\begin{frame}\frametitle{Motivation of Duhamel's Principle}

\begin{itemize}
\item The solution $u_{i}(x, t) = 0$
for $0 \le t < s_{i-1}$.
\item If $\Delta s_{i}$ is small then during $[s_{i-1}, s_{i})$ the external
force accelerates the string to a velocity of approximately
$g(x, s_{i-1}) \Delta s_{i}$.
\item The external force displaces the string by an approximate amount
$g(x, s_{i-1}) (\Delta s_{i})^{2}/2$ which can be ignored if
$\Delta s_{i}$ is small.
\end{itemize}
Thus for $t \ge s_{i}$ the contribution to the
displacement of the string $u_{i}(x, t)$ can
be approximated by the solution to the following initial value problem:
\begin{align*}
u_{tt}
	&= c^{2} u_{xx}
\mbox{ for $-\infty < x < \infty$ and $t > s_{i}$}	\\
u(x, s_{i})
	&= 0
\mbox{ for $-\infty < x < \infty$}	\\
u_{t}(x, s_{i})
	&= g(x, s_{i-1}) \Delta s_{i}
\mbox{ for $-\infty < x < \infty$.}
\end{align*}

\end{frame}
%%

\begin{frame}\frametitle{Motivation for Duhamel's Principle}

For $t > s_{i}$ the displacement $u_{i}(x, t) \approx v(x, t) \Delta s_{i}$, where
$v(x, t)$ solves the initial value problem:
%\label{eq:NH:waveparameters}
\begin{align*}
v_{tt}
	&= c^{2} v_{xx}
\mbox{ for $-\infty < x < \infty$ and $t > s_{i}$}	\\
v(x, s_{i}; s_{i-1})
	&= 0
\mbox{ for $-\infty < x < \infty$}	\\
v_{t}(x, s_{i}; s_{i-1})
	&= g(x, s_{i-1})
\mbox{ for $-\infty < x < \infty$.}
\end{align*}
To indicate the dependence of $v(x, t)$ on $s$, the solution
will be denoted as $v(x, s_{i}; s_{i-1})$.
Using the Riemann sum argument as in the case of the nonhomogeneous
heat equation yields
\[
u(x, T)
	= \int_{0}^{T} v(x, T; s) \, ds	.
\]

\end{frame}
%%

\begin{frame}\frametitle{Motivation for Duhamel's Principle}

$T$ is arbitrary it can be replaced by any $t > 0$.
As the norm of the partition approaches zero, $v(x, t; s)$ solves the
following initial value problem:
%\label{eq:NH:waveaux}
\begin{align*}
v_{tt}
	&= c^{2} v_{xx}
\mbox{ for $-\infty < x < \infty$ and $t > s$}	\\
v(x, s; s)
	&= 0
\mbox{ for $-\infty < x < \infty$}	\\
v_{t}(x, s; s)
	&= g(x, s)
\mbox{ for $-\infty < x < \infty$.}
\end{align*}
Define $\hat{v}(x, t-s; s) = v(x, t; s)$, where $\hat{v}$ solves the
initial value problem:
%\label{eq:NH:waveaux0}
\begin{align*}
\hat{v}_{tt}
	&= c^{2} \hat{v}_{xx}
\mbox{ for $-\infty < x < \infty$ and $t > 0$}	\\
\hat{v}(x, 0; s)
	&= 0
\mbox{ for $-\infty < x < \infty$}	\\
\hat{v}_{t}(x, 0; s)
	&= g(x, s)
\mbox{ for $-\infty < x < \infty$.}
\end{align*}

\end{frame}
%%

\begin{frame}\frametitle{Main Result}

%\label{eq:NH:wave}
\begin{align*}
u_{tt}
	&= c^{2} u_{xx} + g(x, t)
\mbox{ for $-\infty < x < \infty$ and $t > 0$}	\\
u(x, 0)
	&= u_{t}(x, 0) = 0
\mbox{ for $-\infty < x < \infty$.}
\end{align*}
\begin{theorem}
%\label{thm:NH:DuhamelWave}
Suppose $g(x, t) \in \mathcal{C}^{1}(\mathbb{R} \times (0,\infty))$, then
\[
%\label{eq:NH:Waveunboundedsoln}
u(x, t)
	= \frac{1}{2 c} \int_{0}^{t} \int_{x - c (t-s)}^{x + c (t-s)}
g(r, s) \, dr \, ds
\]
solves the initial value problem.
\end{theorem}

\end{frame}
%%

\begin{frame}\frametitle{Example}

Use Duhamel's principle to find the solution to the following initial
value problem:
\begin{align*}
u_{tt}
	&= c^{2} u_{xx} + e^{-(x-t)}
\mbox{ for $-\infty < x < \infty$ and $t > 0$}	\\
u(x, 0)
	&= \sin x
\mbox{ for $-\infty < x < \infty$}	\\
u_{t}(x, 0)
	&= \cos x
\mbox{ for $-\infty < x < \infty$.}
\end{align*}

\end{frame}
%%

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

Using d'Alembert's approach,
\begin{align*}
u_{tt}
	&= c^{2} u_{xx}
\mbox{ for $-\infty < x < \infty$ and $t > 0$}	\\
u(x, 0)
	&= \sin x
\mbox{ for $-\infty < x < \infty$}	\\
u_{t}(x, 0)
	&= \cos x
\mbox{ for $-\infty < x < \infty$,}
\end{align*}
is solved by
\begin{align*}
u_{1}(x, t)
	&= \frac{1}{2} \left( \sin (x + c t) + \sin (x - c t) \right) +
\frac{1}{2 c} \int_{x-c t}^{x+ c t} \cos s \, ds	\\
	&= \frac{1}{2} \left( \sin (x + c t) + \sin (x - c t) \right) +
\frac{1}{2 c} \left( \sin (x + c t) - \sin (x - c t) \right)	.
\end{align*}

\end{frame}
%%

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

According to the previous theorem, the solution
to the nonhomogeneous initial value problem:
\begin{align*}
u_{tt}
	&= c^{2} u_{xx} + e^{-(x-t)}
\mbox{ for $-\infty < x < \infty$ and $t > 0$}	\\
u(x, 0)
	&= 0
\mbox{ for $-\infty < x < \infty$}	\\
u_{t}(x, 0)
	&= 0
\mbox{ for $-\infty < x < \infty$,}
\end{align*}
can be written as the double integral,
\begin{align*}
u_{2}(x, t)
	&= \frac{1}{2 c} \int_{0}^{t} \int_{x - c (t-s)}^{x + c (t-s)}
e^{-(r-s)} \, dr \, ds	\\
	&= \frac{1}{2 c} \int_{0}^{t}
\left(
e^{-(x - c t)} e^{(1-c) s} - e^{-(x + c t)} e^{(c+1) s}
\right) \, ds	\\
	&= \frac{1}{2 c} \left(
e^{-(x - c t)} \frac{e^{(1-c) t} - 1}{1-c} -
e^{-(x + c t)} \frac{e^{(1+c) t} - 1}{1+c}
\right)	.
\end{align*}

\end{frame}
%%

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

\begin{align*}
u(x, t)
	= {} & \frac{1}{2} \left( \sin (x + c t) + \sin (x - c t) \right) +
\frac{1}{2 c} \left( \sin (x + c t) - \sin (x - c t) \right)	\\
	&+ \frac{1}{2 c} \left(
e^{-(x - c t)} \frac{e^{(1-c) t} - 1}{1-c} -
e^{-(x + c t)} \frac{e^{(1+c) t} - 1}{1+c} \right)
\end{align*}

\end{frame}
%%

\begin{frame}\frametitle{Bounded Finite Length String}

%\label{eq:NH:wavefinite}
\begin{align*}
u_{tt}
	&= c^{2} u_{xx} + F(x, t)
\mbox{ for $0 < x < L$ and $t > 0$}	\\
u(0, t)
	&= \phi(t)
\mbox{ and } u(L, t) = \psi(t)
\mbox{ for $t > 0$}	\\
u(x, 0)
	&= f(x)
\mbox{ and } u_{t}(x, 0) = g(x)
\mbox{ for $0 < x < L$.}
\end{align*}
The reference function defined as
\[
u_{1}(x, t)
	= \left( \psi(t) - \phi(t) \right) \frac{x}{L} + \phi(t)
\]
agrees with the nonhomogeneous boundary conditions
at $x = 0$ and $x = L$.

\end{frame}
%%

\begin{frame}\frametitle{Decomposing the Solution}

The solution to the nonhomogeneous equation is
$u(x, t) = u_{1}(x, t) + v(x, t)$ where $v(x, t)$ satisfies the following
initial boundary value problem:
%\label{eq:NH:wavezeroBC}
\begin{align*}
v_{tt}
	= {} & c^{2} v_{xx} + F(x, t)	\\
	&- \left( \psi''(t) - \phi''(t)
\right) \frac{x}{L} - \phi''(t)
\mbox{ for $0 < x < L$, $t > 0$}	\\
v(0, t)
	= {} & v(L, t)
	= 0
\mbox{ for $t > 0$}	\\
v(x, 0)
	= {} & f(x) - \left( \psi(0) - \phi(0) \right) \frac{x}{L} - \phi(0)
\mbox{ for $0 < x < L$}	\\
v_{t}(x, 0)
	= {} & g(x) - \left( \psi'(0) - \phi'(0) \right) \frac{x}{L} - \phi'(0)
\mbox{ for $0 < x < L$.}
\end{align*}

\end{frame}
%%

\begin{frame}\frametitle{Decomposing the Solution}

Let $v(x, t) = v_{1}(x, t) + v_{2}(x, t)$ where
%\label{eq:NH:wavehomozeroBC}
\begin{align*}
(v_{1})_{tt}
	&= c^{2} (v_{1})_{xx}
\mbox{ for $0 < x < L$ and $t > 0$}	\\
v_{1}(0, t)
	&= v_{1}(L, t) = 0
\mbox{ for $t > 0$}	\\
v_{1}(x, 0)
	&= f(x) - \left( \psi(0) - \phi(0) \right) \frac{x}{L} - \phi(0)
\mbox{ for $0 < x < L$}	\\
(v_{1})_{t}(x, 0)
	&= g(x) - \left( \psi'(0) - \phi'(0) \right) \frac{x}{L} - \phi'(0)
\mbox{ for $0 < x < L$,}
\end{align*}
and
%\label{eq:NH:wavenonhomozeroBC}
\begin{align*}
(v_{2})_{tt}
	= {} & c^{2} (v_{2})_{xx} + F(x, t)	\\
	&- \left( \psi''(t) - \phi''(t) \right) \frac{x}{L} - \phi''(t)
\mbox{ for $x \in (0,L)$, $t > 0$}	\\
v_{2}(0, t)
	= {} & v_{2}(L, t) = 0
\mbox{ for $t > 0$}	\\
v_{2}(x, 0)
	= {} & (v_{2})_{t}(x, 0) = 0
\mbox{ for $0 < x < L$.}
\end{align*}

\end{frame}
%%

\begin{frame}\frametitle{Decomposing the Solution}

\begin{itemize}
\item Solution $v_{1}(x, t)$ can be found using a Fourier series or
  d'Alembert's approach.
\item Solution $v_{2}(x, t)$ can be found using Duhamel's principle where
\[
v_{2}(x, t)
	= \int_{0}^{t} \hat{v}(x, t - s; s) \, ds
\]
\end{itemize}
Function $\hat{v}(x, t; s)$ solves the auxiliary problem:
%\label{eq:NH:wavefiniteaux}
\begin{align*}
\hat{v}_{tt}
	&= c^{2} \hat{v}_{xx}
\mbox{ for $0 < x < L$ and $t > 0$}	\\
\hat{v}(0, t; s)
	&= \hat{v}(L, t; s)
	= 0
\mbox{ for $t > 0$}	\\
\hat{v}(x, 0; s)
	&= 0
\mbox{ for $0 < x < L$}	\\
\hat{v}_{t}(x, 0; s)
	&= F(x, s) - \left( \psi''(s) - \phi''(s)
\right) \frac{x}{L} - \phi''(s)
\mbox{ for $0 < x < L$.}
\end{align*}

\end{frame}
%%

\begin{frame}\frametitle{Example}

Use Duhamel's principle to find the solution to the initial boundary
value problem:
%\label{eq:wave:example07ibvp}
\begin{align*}
u_{tt}
	&= c^{2} u_{xx}
\mbox{ for $0 < x < L$ and $t > 0$}	\\
u(0, t)
	&= 0
\mbox{ and }
u(L, t)
	= \sin (\omega t)
\mbox{ for $t > 0$}	\\
u(x, 0)
	&= u_{t}(x, 0) = 0
\mbox{ for $0 < x < L$.}
\end{align*}


\end{frame}
%%

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

The reference function is
$u_{1}(x, t) = (x/L) \sin (\omega t)$
and thus if $u(x, t) = v(x, t) + u_{1}(x, t)$, then $v(x, t)$ solves the
following initial boundary value problem:
\begin{align*}
v_{tt}
	&= c^{2} v_{xx} + \frac{\omega^{2} x}{L} \sin (\omega t)
\mbox{ for $0 < x < L$ and $t > 0$}	\\
v(0, t)
	&= v(L, t)
	= 0
\mbox{ for $t > 0$}	\\
v(x, 0)
	&= 0
\mbox{ and } v_{t}(x, 0) = -\frac{\omega x}{L}
\mbox{ for $0 < x < L$.}
\end{align*}

\end{frame}
%%

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

The solution to the homogeneous portion of the initial boundary value
problem
\begin{align*}
v_{tt}
	&= c^{2} v_{xx}
\mbox{ for $0 < x < L$ and $t > 0$}	\\
v(0, t)
	&= v(L, t)
	= 0
\mbox{ for $t > 0$}	\\
v(x, 0)
	&= 0
\mbox{ and } v_{t}(x, 0) = -\frac{\omega x}{L}
\mbox{ for $0 < x < L$.}
\end{align*}
was found to be
\[
v_{1}(x, t)
	= \frac{2 \omega L}{c \pi^{2}} \sum_{n=1}^{\infty}
\frac{(-1)^{n}}{n^{2}} \sin \frac{n \pi c \, t}{L} \sin \frac{n \pi \, x}{L}	.
\]

\end{frame}
%%

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

The auxiliary problem is
\begin{align*}
\hat{v}_{tt}
	&= c^{2} \hat{v}_{xx}
\mbox{ for $0 < x < L$ and $t > 0$}	\\
\hat{v}(0, t; s)
	&= \hat{v}(L, t; s)
	= 0
\mbox{ for $t > 0$}	\\
\hat{v}(x, 0; s)
	&= 0
\mbox{ for $0 < x < L$}	\\
\hat{v}_{t}(x, 0; s)
	&= \frac{\omega^{2} x}{L} \sin (\omega s)
\mbox{ for $0 < x < L$.}
\end{align*}
The solution can be written as the Fourier series,
\[
\hat{v}(x, t; s)
	= \sum_{n=1}^{\infty} a_{n} \sin \frac{n \pi c t}{L} \sin \frac{n
  \pi x}{L}
\]
where
\[
a_{n}
	= \frac{2 (-1)^{n+1} L \omega^{2}}{n^{2} \pi^{2} c} \sin (\omega s)	.
\]

\end{frame}
%%

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

According to Duhamel's principle the solution
$v_{2}(x, t) = \int_{0}^{t} \hat{v}(x, t-s; s) \, ds$.
Assuming the Fourier series can be integrated term by term, then
\[
\int_{0}^{t} a_{n} \sin \frac{n \pi c (t-s)}{L} \sin \frac{n \pi
  x}{L} \, ds
	=
b_{n} \sin \frac{n \pi x}{L}
\int_{0}^{t} \sin (\omega s) \sin \frac{n \pi c (t-s)}{L} \, ds
\]
where for $n \in \mathbb{N}$,
$b_{n} = 2 (-1)^{n+1} L \omega^{2}/(n^{2} \pi^{2} c)$.

\begin{align*}
\lefteqn{%
\int_{0}^{t} \sin (\omega s) \sin \frac{n \pi c (t-s)}{L} \, ds}	\\
	&= \left\{ \begin{array}{rl}
\displaystyle
\frac{L^{2} \omega \sin (c n \pi \, t/L) - c L n \pi \sin (\omega
          t)}{(L \omega)^{2} - (c n \pi)^{2}}
	& \mbox{if $n \ne \omega L/(c \pi)$,}	\\
\displaystyle
\frac{\sin (\omega t)}{2 \omega} - \frac{t}{2} \cos (\omega t)
	& \mbox{if $n = \omega L/(c \pi)$.}
\end{array} \right.
\end{align*}

\end{frame}
%%

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

If there exists no $N \in \mathbb{N}$ such that $N = \omega L/(c \pi)$
then
\[
v_{2}(x, t)
	= \sum_{n=1}^{\infty} b_{n} \frac{L^{2} \omega \sin (c n \pi
          \, t/L) - c L n \pi \sin (\omega t)}{(L \omega)^{2} - (c n
          \pi)^{2}} \sin \frac{n \pi x}{L}	.
\]
If there exists $N \in \mathbb{N}$ for which $N =
\omega L/(c \pi)$ then
\begin{align*}
v_{2}(x, t)
	= {} & b_{N} \left( \frac{\sin (\omega t)}{2 \omega} - \frac{t}{2} \cos
              (\omega t) \right) \sin \frac{\omega x}{c}	\\
	&+ \sum_{\mathclap{n=1, n \ne N}}^{\infty} b_{n} \frac{L^{2} \omega \sin
              (c n \pi \, t/L) - c L n \pi \sin (\omega t)}{(L
              \omega)^{2} - (c n \pi)^{2}} \sin \frac{n \pi x}{L}              .
\end{align*}
The solution to the original IBVP is
\begin{align*}
u(x, t)
	= {} & v_{2}(x, t) + \frac{x}{L} \sin (\omega t)	\\
	&+ \frac{2 \omega L}{c \pi^{2}} \sum_{n=1}^{\infty}
\frac{(-1)^{n}}{n^{2}} \sin \frac{n \pi c \, t}{L} \sin \frac{n \pi \, x}{L}	.
\end{align*}

\end{frame}
%%

%\begin{frame}\frametitle{Homework}

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

%\end{frame}
%%

%%%
\end{document}

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