% This is a sample file for the Undergraduate Faculty Program at
% PCMI, containing one lecture 
%
%   The Wave Equation and Separation of Variables
%
%  from the Park City Lectures.
%
% The sample file illustrates the use of epsf.tex to include postscript 
% graphics, as well as various "AmS-LaTeX" constructions from the amsmath
% package (which is automatically loaded by the pcms-l document class).
% To run this file you need the files 
%
%        pcms-l.cls and pcmslmod.tex
%


\documentclass[lecture,12pt,]{pcms-l}
\input pcmslmod.tex  % v.1.2
%\input epsf.tex

%\usepackage{amssymb} % this command would have loaded all the extra symbols,



% authors should not define these, they will be defined by the volume editors
%\def\currentvolume{3}
%\def\currentyear{1993}


% EQUATION NUMBERING AND THEOREM SETUP

\numberwithin{section}{chapter}
\numberwithin{equation}{chapter}

\theoremstyle{plain}
\newtheorem{theorem}[equation]{Theorem}
\newtheorem{lemma}[equation]{Lemma}

\theoremstyle{definition}
\newtheorem{definition}[equation]{Definition}

\newtheorem{exercise}{Exercise}
\newtheorem{problem}{Problem}
\newtheorem*{remark}{Remark}

% Set enumerate to use letters, not numbers for problem parts.

\renewcommand{\theenumi}{\alph{enumi}}
\renewcommand{\labelenumi}{(\theenumi)}

% AUTHOR-DEFINED MACROS:

\newcommand{\cA}{\mathcal{A}}
\newcommand{\cB}{\mathcal{B}}
\newcommand{\C}{\mathbb{C}}
\newcommand{\cC}{\mathcal{C}}
\newcommand{\cD}{\mathcal{D}}

\begin{document}

\mainmatter
\setcounter{page}{1}

%\LogoOn

\lectureseries[An Introduction to PDE's]{An Introduction to Partial Differential Equations in the Undergraduate Curriculum}


\auth[M. Vajiac \& J. Tolosa]{M. Vajiac \& J. Tolosa} 

%\address{Chapman University}
%\email{mbvajiac@chapman.edu}

%The following items will become first page footnotes; they are optional.
%\date{\today}
%\setaddress


% the following hack starts the lecture numbering at 1
\setcounter{lecture}{6}
\setcounter{chapter}{6}

\lecture{The Wave Equation}

\section{Outline of Lecture}
\begin{itemize}
\item{Examples of Wave Equations in Various Settings}
\item{Dirichlet Problem and Separation of variables revisited}
\item{Galerkin Method}
\item{The plucked string as an example of SOV}
\item{Uniqueness of the solution of the well posed problem}
\item{Cauchy Problem for the infinite string}
\end{itemize}

\vskip 2 in
\begin{center}
Figure 7.1: The Vibrating Membrane \\
 (draw your own figure).
\end{center}

\vfill
\eject

\section{Examples of Wave Equations in Various Settings}

As we have seen before the "classical" one-dimensional wave equation has the form:

\begin{equation}
u_{tt}=c^2u_{xx},
\label{wave}
\end{equation}

where $u=u(x,t)$ can be thought of as the vertical displacement of the vibration
of a string.

The string can be fixed at both ends, or just at one end, or we can think of an "infinite"
string, that is not bound at any end. Each will yield different boundary conditions 
for the well-posed wave equation.
We can also consider the case where the string is "pushed" with an external force
$h(x,t),$ or where we take under consideration the friction coefficient from the air 
that the string displaces. These two equations will be called "forced'' and "damped"
respectively.
In the "forced" case, the wave equation is:
$$
u_{tt}=c^2u_{xx}+h(x,t),
$$
where an example of the acting force is the gravitational force.
In the "damped" case the equation will look like:
$$
u_{tt}+ku_{t}=c^2u_{xx},
$$
where $k$ can be the friction coefficient.

If we have more than one spatial dimension (a membrane for example), the wave 
equation will look a bit different. In the case of the vibrating membrane we
have two spatial variables and the wave equation will look like:
$$
u_{tt}=c^2(u_{xx}+u_{yy}).
$$
For $n-$dimensions (whatever THAT means...) the n-wave equation will be:
$$
u_{tt}=c^2(u_{x_1x_1}+u_{x_2x_2}+\dots +u_{x_nx_n}).
$$
The initial conditions for the one-dimensional wave equation will be:
$$u(x,0)=f(x),u_t(x,0)=g(x).$$

For the finite string the boundary conditions will be:
$$u(0,t)=A(t),u(L,t)=B(t).$$


\vfill
\eject

\section{Dirichlet Problem and Separation of Variables}

If we tie the string at both ends we can have the following
boundary conditions:

\begin{eqnarray*}
u(0,t)=A(t),u(L,t)=B(t),
\end{eqnarray*}
where $A,B$ are $\cC^1$ piecewise functions. For example, we can have a sinusoidal
function at one end and a Heaviside function at the other. 

When the boundary values $A$ and $B$ are $0$ we obtain the {\bf Dirichlet Problem}
for the wave equation:
\begin{eqnarray*}
u_{tt}=c^2u_{xx},\quad & 0<x < L, t>0 \quad  & {\bf \rm DE} \\
u(0,t)=0,u(L,t)=0,\quad & t>0 & {\bf \rm BC} \\
u(x,0)=f(x),u_t(x,0)=g(x)& 0 < x < L &  {\bf \rm IC}.
\end{eqnarray*}
As you have seen in Lecture 5 for the diffusion equation, the method of separating
the variables is a very convenient way to obtain solutions for PDEs.
In the case of the Dirichlet Problem we will quickly review the 
method.

\begin{theorem}
A solution of the problem:
\begin{eqnarray*}
u_{tt}=c^2u_{xx},\quad & 0<x < L, t>0 \quad  & {\bf \rm DE} \\
u(0,t)=0,u(L,t)=0,\quad & t>0 & {\bf \rm BC} \\
u(x,0)=f(x),u_t(x,0)=g(x)& 0 < x < L &  {\bf \rm IC}.
\end{eqnarray*}
is given by:
$$
u(x,t)=\sum_{n=1}^N\left[\frac{L}{n\pi c}\bar{A}_n\sin(\frac{n\pi ct}{L})+
B_n\cos(\frac{n\pi ct}{L})\right]\sin(\frac{n\pi x}{L}),
$$
where:
$f(x)=\sum_{n=1}^NB_n \sin(\frac{n\pi x}{L}),$ and 
$g(x)=\sum_{n=1}^N\bar{A}_n \sin(\frac{n\pi x}{L}).$
The coefficients $\bar{A}_n$ and $B_n$ are given by:
$B_n=\frac{2}{L}\int_0^L f(x)\sin(\frac{n\pi x}{L}),$ 
$\bar{A}_n=\frac{2}{L}\int_0^L g(x)\sin(\frac{n\pi x}{L}).$
\end{theorem}
\begin{proof}
We will use the method of separation of variables, namely think of the solution
$u(x,t)$ as a product of a function that depends only on the variable $t$ and of a function 
that depends only on the variable $x$.

Let $u(x,t)=X(x)T(t)$ and substitute in the equation $u_{tt}=c^2u_{xx},$ to obtain:
$$
X(x)\ddot{T}(t)=c^2\ddot{X}(x)T(t),
$$
or $\frac{\ddot{T}(t)}{c^2T(t)}=\frac{\ddot{X}(x)}{X(x)},$ thus the equality is one of functions
of different variables, so both quotients have to be constant.

Say $\frac{\ddot{T}(t)}{c^2T(t)}=\frac{\ddot{X}(x)}{X(x)}=\pm\lambda^2,$ then we can 
solve each ordinary differential equation separately.
We have the following three cases: $-\lambda^2,$  $\lambda^2,$ and  $\lambda=0.$ 

{\bf Case 1} When the constant is $-\lambda^2,$ then the solutions for $\frac{\ddot{X}(x)}{X(x)}=-\lambda^2,$  
are: $X(x)=c_1\sin(\lambda x)+c_2\cos(\lambda x),$ and the solutions for $\frac{\ddot{T}(t)}{c^2T(t)}=-\lambda^2,$
are: $T(t)=d_1\sin(\lambda ct)+d_2\cos(\lambda ct).$
Then $u(x,t)=(d_1\sin(\lambda ct)+d_2\cos(\lambda ct))(c_1\sin(\lambda x)+c_2\cos(\lambda x)).$

{\bf Case 2} When the constant is $\lambda^2,$ then the solutions for $\frac{\ddot{X}(x)}{X(x)}=\lambda^2,$ 
are: $X(x)=c_1e^{\lambda x}+c_2e^{-\lambda x},$ and the solutions for $\frac{\ddot{T}(t)}{c^2T(t)}=\lambda^2,$ are $\pm c\lambda,$
are $T(t)=d_1e^{\lambda ct}+d_2e^{-\lambda ct}.$
Then $u(x,t)=(d_1e^{\lambda ct}+d_2e^{-\lambda ct})(c_1e^{\lambda x}+c_2e^{-\lambda x}).$

{\bf Case 3} When the constant is $0,$ then the equations become $\ddot{X}(x)=\ddot{T}(t)=0,$ and 
$X(x)=c_1x+c_2,$ and $T(t)=d_1t+d_2.$
Then $u(x,t)=(d_1t+d_2)(c_1x+c_2).$

Let's take a look at the boundary conditions: $u(0,t)=0,u(L,t)=0.$ The only solution
for $u(x,t)$ that can satisfy them is $u(x,t)=(d_1\sin(\lambda ct)+d_2\cos(\lambda ct))(c_1\sin(\lambda x)+c_2\cos(\lambda x)),$
and the boundary conditions translate into:
\begin{eqnarray*}
(d_1\sin(\lambda ct)+d_2\cos(\lambda ct))(c_1\sin(0)+c_2\cos(0))&=&0\\
(d_1\sin(\lambda ct)+d_2\cos(\lambda ct))(c_1\sin(\lambda L)+c_2\cos(\lambda L))&=&0,\quad \forall t>0,
\end{eqnarray*}
namely:
\begin{eqnarray*}
c_2&=&0\\
c_1\sin(\lambda L)&=&0.
\end{eqnarray*}
From the last condition we obtain $\lambda=\frac{\pi n}{L},$ and 
$$
u(x,t)=\sum_{n=1}^\infty\left[d_{1n}\sin(\frac{\pi n}{L}ct)+d_{2n}\cos(\frac{\pi n}{L}ct)\right]c_n\sin(\frac{\pi n}{L}x).
$$
The only conditions left to check are the initial conditions: 
\begin{eqnarray*}
u(x,0)&=&f(x)=\sum_{n=1}^NB_n\sin(\frac{n\pi x}{L}),\\
u_t(x,0)&=&g(x)=\sum_{n=1}^N\bar{A}_n\sin(\frac{n\pi x}{L}).
\end{eqnarray*}
Then $u(x,t)=\sum_{n=1}^N\left[\frac{L}{n\pi c}\bar{A}_n\sin(\frac{n\pi ct}{L})+
B_n\cos(\frac{n\pi ct}{L})\right]\sin(\frac{n\pi x}{L}),$

\end{proof}


\begin{remark}
In the more general case for the Dirichlet Problem, when initial conditions
(IC) change to more general homogeneous conditions:
$k_1u(x,0)+k_2u_x(x,0)=0,$ we can solve the problem 
in the same manner, using separation of variables.
\end{remark}

\begin{exercise}
Check that {\bf Case 1} is the only one that verifies the boundary conditions
in the proof above. 
\end{exercise}
\begin{exercise}
Check that the solution found above verifies the initial conditions. 
\end{exercise}

\begin{exercise}
A string of length $\pi$ is held fixed at both endpoints. Its initial position is 
$ f(x)= \sin(x)$ and its initial velocity is $g(x) = \cos x$. Assuming that $c=1$, 
find the position of the string $u(x,t)$ for every $x \in \left[0, \pi\right]$ and for every 
$t > 0$. Find an approximate value for $u(x,t)$ by adding several terms of the series. Animate the approximation and draw a $3D$ plot.

{\bf Note.} Use Maple carefully, there might be some tricky answers. 
Finally, use Maple to check that your (approximate) solution satisfies the PDE, the boundary conditions, and the initial conditions (at least approximately). 
\end{exercise}


\begin{exercise}
Solve the following problem for the string equation: 
$$ \hbox{PDE} \qquad  u_{tt} = u_{xx} , $$ 
$$ \hbox{BC} \qquad  u(0, t) = 0, \quad u_x(\pi, t) = 0  
    \quad \hbox{for every $t>0$;}  $$ 
$$ \hbox{IC} \qquad u(x, 0) = \sin(x), \quad u_t(x, 0) = 0, 
     \quad \hbox{for every $x \in \left[0, \pi\right].$}$$ 
 
Notice the change in the boundary conditions. 
This will lead to different eigenvalues and eigenfunctions. 

Use Maple to animate the solution you found, to draw a $3D$ plot, 
and to check that the solution satisfies the conditions of the problem. 
\end{exercise}


\vfill
\eject



\section{Galerkin Method for the "Damped" Wave Equation}
The "damped" wave equation looks like:
\begin{eqnarray*}
u_{tt}+\nu u_{t}=c^2u_{xx},\quad 0<x<L, t>0 & {\bf\rm DE}\\
u(0,t)=0,u(L,t)=0,\quad & t>0 & {\bf \rm BC} \\
u(x,0)=f(x),u_t(x,0)=g(x)& 0 < x < L . &  {\bf \rm IC}.
\end{eqnarray*}

From our previous discussion, we know that the solution will have the form:
$$
u(x,t)=\sum_{n=1}^N f_n(t)\sin(\frac{n\pi x}{L}).
$$
Plugging into the equation, we obtain the following equations for $f_n:$
$$
\ddot{f_n}+\nu\dot{f_n}+(\alpha_n)^2f_n=0,
$$
where $\alpha_n=\frac{cn\pi}{L}$
with eigenvalues:
$$
\displaystyle{{\lambda_n}_{12}=\frac{\nu}{2}\pm\sqrt{(\frac{\nu}{2})^2-(\alpha_n)^2}},
$$
i.e.$\displaystyle{\lambda_n}_{12}=\frac{\nu}{2} \pm  i\omega_n,$
where: $\omega_n=\sqrt{((\alpha_n)^2-\frac{\nu}{2})^2}.$

So, if the friction coefficient $\nu$ is small enough, then we will have:
$$
\displaystyle f_n(t)=e^{-\frac{\nu}{2}t}(c_n\cos(\omega_nt)+d_n\sin(\omega_nt)),
$$
and
$$
\displaystyle u(x,t)=\sum_{n=1}^\infty e^{-\frac{\nu}{2}t}(c_n\cos(\omega_nt)+d_n\sin(\omega_nt))\sin(\frac{n\pi x}{L}),
$$
We input the initial conditions:
\begin{eqnarray*}
u(x,0)=f(x)=\sum_{n=1}^\infty c_n\sin(\frac{n\pi x}{L}),
u_t(x,0)=g(x)=\sum_{n=1}^\infty (\omega_n d_n-\frac{\nu}{2}c_n)\sin(\frac{n\pi x}{L})
\end{eqnarray*}
Then $c_n$ is the $n-$th Fourier coefficient for $f,$ and $\omega_n d_n-\frac{\nu}{2}c_n$
is the $n-$th Fourier coefficient for $g,$ so EUREKA! The problem has been SOLVED:

\begin{eqnarray*}
c_n&=&\frac{2}{l}\int_0^Lf(x)\sin(\frac{n\pi x}{L})dx  \\
\omega_n d_n-\frac{\nu}{2}c_n&=&\frac{2}{l}\int_0^Lg(x)\sin(\frac{n\pi x}{L})dx\\
d_n&=&\frac{2}{\omega l}\int_0^L\left[\frac{\nu}{2}f(x)+g(x)\right]\sin(\frac{n\pi x}{L})dx.
\end{eqnarray*}


\vfill
\eject



\section{The Example of the Plucked String}
The {\bf plucked string} refers to the initial condition for the Dirichlet problem
, where $f(x)$ looks like a "plucked string", namely:

\begin{eqnarray*}
u_{tt}=c^2u_{xx},\quad & 0<x < L, t>0 \quad  & {\bf \rm DE} \\
u(0,t)=0,u(L,t)=0,\quad & t>0 & {\bf \rm BC} \\
u(x,0)=f(x),u_t(x,0)=0& 0 < x < L  &  {\bf \rm IC},
\end{eqnarray*}

where
 
\begin{eqnarray*}
f(x)=\begin{cases}\displaystyle\frac{u_0}{x_0}x, \quad & 0\le x\le x_0\\
     u_0\frac{x-L}{x_0-L}, \quad & x_0\le x\le L
\end{cases}
\end{eqnarray*}


\vskip 3 in

\begin{center}
Figure 7.: The initial condition for the "Plucked string" wave.\\
 (draw your own figure).
\end{center}
The behaviour of the solutions is exemplified in the Maple animations.


Let's find a formal solution to the "plucked string" equation. In order to do this
we need to find $B_n,$ the Fourier sine coefficients of $f(x).$
\begin{eqnarray*}
B_n&=&\displaystyle\int_0^Lf(x)sin(\frac{n\pi x}{L})dx\\
&=&\frac{2}{L}f(x)(\frac{-L}{n\pi})\cos(\frac{n\pi x}{L})|_0^L+
\frac{2}{L}\frac{L}{n\pi}\int_0^Lf'(x)\cos(\frac{n\pi x}{L})dx.
\end{eqnarray*}

We have that:
\begin{eqnarray*}
\dot{f}(x)=\begin{cases}\displaystyle\frac{u_0}{x_0}, \quad & 0\le x\le x_0\\
     \frac{u_0}{x_0-L}, \quad & x_0\le x\le L,
\end{cases}
\end{eqnarray*}
and $f(0)=f(L)=0,$ thus:
\begin{eqnarray*}
B_n &=&\displaystyle\frac{2}{L}(\frac{L}{n\pi})\int_0^{x_0}\frac{u_0}{x_0}\cos(\frac{n\pi x}{L})dx+
\frac{2}{L}(\frac{L}{n\pi})\int_{x_0}^L\frac{u_0}{x_0-L}\cos(\frac{n\pi x}{L})dx\\
 &=&\frac{2}{L}(\frac{L}{n\pi})^2(\frac{u_0}{x_0}\sin(\frac{n\pi x_0}{L})-\frac{u_0}{x_0-L}\sin(\frac{n\pi x_0}{L}))\\
 &=&\frac{2L^2u_0}{\pi^2x_0(L-x_0)}\frac{1}{n^2}\sin(\frac{n\pi x_0}{L}).
\end{eqnarray*}
Now we can write the formal solution to the plucked string equation:
\begin{eqnarray*}
u(x,t)=\frac{2L^2u_0}{\pi^2x_0(L-x_0)}\sum_{n=1}^\infty\frac{1}{n^2}\sin(\frac{n\pi x_0}{L})
\cos(\frac{n\pi ct}{L})\sin(\frac{n\pi x}{L}).
\end{eqnarray*}


\subsection{Musical instruments}
 
Many instruments produce sound by making strings vibrate; such are the harp, 
the piano, the harpsichord, 
the guitar, the violin, and others. Strings are kept fixed at the endpoints, 
but they way the instruments are played create different initial conditions. 
In instruments like the guitar, the string is plucked; this produces an 
initial perturbation with no initial velocity. In the piano, on the other hand, 
the string is hit, which creates an initial velocity but no initial perturbation 
from the initial position. 
 
The oscillations of the string are described by  
% 
$$ 
u(x, t) = \sum_{n=1}^{\infty} (A_n \cos \omega_n t + B_n \sin \omega_n t) \sin \lambda_n t, 
$$ 
% 
where 
% 
$$ 
\lambda_n = {n \frac{\pi}{L}} \qquad \hbox{ and } \qquad \omega_n = c\lambda_n = {c n\frac{\pi}{L}}. 
$$ 
 
The sound we hear is thus a combination of the main harmonic sounds (eigenfunctions)  
 
$$ 
u_n(x, t) = (A_n \cos \omega_n t + B_n \sin \omega_n t) \sin \lambda_n t.
$$ 
 
The contribution of each particular harmonic is measured by its {\it energy}, 
which turns out to be equal to:
$$ 
E_n = {\frac{\omega_n^2 M}{4}} (A_n^2 + B_n^2),
$$ 
where $M = DL $ is the total mass of the string (recall that $D$ was the density). 
 
For the plucked string (Section 7.5), the energy is given by:  
$$ 
E_n = {\frac{M u_0^2L^2c^2}{n^2\pi^2 x_0^2(L-x_0)^2}} \sin^2 {\frac{\pi n x_0}{L}}.
$$ 
 
The energy decreases as $n^{-2}$, so only the main tone $u_1$ and a few other 
harmonics are audible. 
 
On the other hand, if we hit the string with a flat hammer of length $2\delta$ 
with center at $x_0$ and producing an initial velocity $v_0$, the energy of 
the $n$th harmonic is 
 
$$ 
E_n = {\frac{4M V_0^2}{n^2} \pi^2} \sin^2 {\frac{\pi n x_0}{L}}\sin^2 {\frac{\pi n \delta}{L}}, 
$$ 
 
and the energy again decreases as $n^{-2}$. However, if the hammer is sufficiently 
narrow, letting $\delta$ tend to zero (the blade of a knife), we get the model of 
a string getting an impulse concentrated at a point $x_0$. 
The corresponding energy is: 
$$
E_n = {\frac{v_0^2}{L}} \sin^2 {\frac{\pi n x_0}{L}}.
$$ 
 
Thus, for a very narrow hammer the energies of all harmonics are of the same 
order and the generated sound will be saturated with harmonics. This can be 
checked experimentally, by hitting a string with the blade of a knife. The 
sound will have a metallic quality. 
 
Not all harmonics are desirable. The first ones, $u_2$ up to $u_6$, sound 
well together with the main harmonic $u_1$. However, the $7$th and the first 
harmonics sounding together produce a sense of dissonance.  
 
There are several ways to try to ``kill'' those harmonics by percussion 
(as in the piano). 


{\bf a).} The position of the hammer. The presence of the factor 
$\displaystyle \sin{\frac{\pi n x_0}{L}}$ 
shows that by choosing the center $x_0$ of the hammer at the node of the 
undesired harmonic we may make it disappear (make the corresponding $A_n$ and 
$B_n$ be equal to zero).  
In modern pianos the position of the hammer is chosen near the nodes of the 
$7$th and the $8$th harmonics, to ``kill'' them. 
 
{\bf b).} The shape of the hammer. In modern pianos the hammers are 
not flat, but rather round. One can model this situation by choosing the 
initial velocity to be, say, a parabola on the interval 
$\left[x_0-\delta, x_0+\delta\right]$, instead of a horizontal line. Older pianos, which 
had flatter and narrower hammers, produced a more piercing, shrilled sound. 
 
{\bf c).} The rigidity of the hammer. If instead of being rigid the 
hammer is softer. In this case the motion is not described by its initial 
position and velocity, but rather by a short-time acting force, which varies 
in time.

\begin{exercise}
Find the solution $u(x,t)$ of the string equation if $l = \pi$, $c=1$, 
when both endpoints are fixed, the initial velocity is zero, and $u(x, t)$ 
is the following piecewise linear function: 
\end{exercise}


\vfill
\eject

\section{Uniqueness of the solution to the wave equation}

\begin{theorem}
Let $u_1(x,t)$ and $u_2(x,t)$ be two solutions of the problem:
\begin{eqnarray*}
u_{tt}=c^2u_{xx},\quad & 0<x < L, t>0 \quad  & {\bf \rm DE} \\
u(0,t)=A(t),u(L,t)=B(t),\quad & t>0 & {\bf \rm BC} \\
u(x,0)=f(x),u_t(x,0)=g(x)& 0 < x < L . &  {\bf \rm IC},
\end{eqnarray*}
where $A,B,f,g$ are $\cC^1$ piecewise continuous.
Then $u_1(x,t)=u_2(x,t)$ for all points in the domain.
\end{theorem}
\begin{proof}
Let $v(x,t)=u_1(x,t)-u_2(x,t),$ then $v$ satisfies the wave equation with initial
conditions: $u(x,0)=u_t(x,0)=0,$ and boundary conditions $u(0,t)=u(L,t)=0.$
Our goal is to prove that $v(x,t)=0\quad\forall x,t.$

In order to accomplish this, define:
$$
H(t)=\displaystyle\int_0^L\left[c^2v_x(x,t)^2+v_t(x,t)^2\right]dx.
$$
We will prove that $H(t)=0$ first. Differentiating with respect to $t$ we obtain:
\begin{eqnarray*}
\dot{H}(t)&=&\displaystyle\int_0^L\left[c^2 2v_xv_{xt}+2v_tv_{tt}\right]dx\\
&=&2c^2\int_0^L\left[v_xv_{xt}+v_tv_{xx}\right]dx\\
&=&2c^2\int_0^L\frac{\delta}{\delta x}(v_xv_t)dx=2c^2\left[v_x(x,t)v_t(x,t)\right]_0^L\\
&=&2c^2(v_x(L,t)v_t(L,t)-v_x(0,t)v_t(0,t))=0.
\end{eqnarray*}
Since $\dot{H}(t)=0,$ $H(t)$ is constant, and as $H(0)=0,$ we conclude that $H(t)=0.$

Then $v_t(x,t)=0,$ and $v(x,t)=v(x,t)-v(x,0)=\int_0^Lv_t(x,t)dt=0.$
\end{proof}
\begin{remark} The energy integral of the string at time $t$ is:
$$
E(t)=\displaystyle\int_0^L\left[T_0u_x(x,t)^2+Du_t(x,t)^2\right]dx,
$$
where $D$ is the mass per unit length and $T_0$ is the constant tension when the string is straight.
We can see that the energy is proportional to $H$ if we construct $H$ using $u$ instead
of $v$. So the uniqueness proof comes from the conservation of energy for the unforced 
string.
\end{remark}

\vfill
\eject
\section{Cauchy Problem for the infinite string, D'Alembert's Solution}
When we have an infinite string, with no boundary, then we have the following
{\bf Cauchy Problem}:
\begin{eqnarray*}
u_{tt}=c^2u_{xx},\quad & 0<x < L, t>0 \quad  & {\bf \rm DE} \\
u(x,0)=f(x),u_t(x,0)=g(x)\quad & 0 < x < L . &  {\bf \rm IC}
\end{eqnarray*}

\begin{theorem}
The solution of the wave equation for the infinite string is:
$$
u(x,t)=\frac{1}{2}\left[f(x-ct)+f(x+ct)\right]+\frac{1}{2c}\int_{x-ct}^{x+ct}g(s)ds,
$$
when $f$ is $\cC^2$ and $g$ is $\cC^1.$
\end{theorem}
\begin{proof}
The wave equation can be written in the alternate form:
$$
(\frac{\delta^2}{\delta t^2}-c^2\frac{\delta^2}{\delta x^2})u(x,t)=0,
$$
and we can factor the "differential operator" 
$$
\displaystyle (\frac{\delta^2}{\delta t^2}-c^2\frac{\delta^2}{\delta x^2})=
(\frac{\delta}{\delta t}-c\frac{\delta}{\delta x})(\frac{\delta}{\delta t}+c\frac{\delta}{\delta x})
$$
Now we will use this factorization to find the general solution to the wave equation.
Denote: $v(x,t)=(\frac{\delta}{\delta t}+c\frac{\delta}{\delta x})u(x,t),$ then the wave
equation becomes: $(\frac{\delta}{\delta t}-c\frac{\delta}{\delta x})v(x,t)=0.$ 
We know that the last equation has solutions of the form: $v(x,t)=F(x-ct),$ so the
wave equation becomes: 
$$
(\frac{\delta}{\delta t}+c\frac{\delta}{\delta x})u(x,t)=F(x-ct).
$$

To solve it, we make the change of variable: $w=x-ct,\, z=x+ct,$ and let
$U(w,z)=u(x,t),$ and we replace in the original equation to get:

\begin{eqnarray*}
u_t+cu_x&=&U_ww_t+U_zz_t+c(U_ww_x+U_zz_x)\\
&=&-cU_w+cU_z+cU_w+cU_z\\
&=&2cU_z=F(z).
\end{eqnarray*}
Thus, $\displaystyle U(w,z)=\int\frac{1}{2c}F(z)dz+G(w)=H(z)+G(w),$ or:
$$
u(x,t)=H(x+ct)+G(x-ct).
$$
We have obtain so far that the general solution is a superposition of waves traveling
in opposite direction with speed $c$.
We will use now the initial conditions:
\begin{eqnarray*}
f(x)=u(x,0)=H(x)+G(x)\\
g(x)=u_t(x,0)=\dot{H}(x)c-\dot{G}(x)c.
\end{eqnarray*}
We obtain:
\begin{eqnarray*}
H(x)+G(x)=f(x)\\
\displaystyle H(x)-G(x)=\frac{1}{c}\int_0^xg(s)ds+C,
\end{eqnarray*}
and
\begin{eqnarray*}
\displaystyle H(x)&=&\frac{1}{2}\left[f(x)+\frac{1}{c}\int_0^xg(s)ds+C\right]\\
\displaystyle G(x)&=&\frac{1}{2}\left[f(x)-\frac{1}{c}\int_0^xg(s)ds-C\right]\\
&=&\frac{1}{2}\left[f(x)+\frac{1}{c}\int_x^0g(s)ds-C\right].
\end{eqnarray*}
Then:
\begin{eqnarray*}
u(x,t)&=&H(x+ct)+G(x-ct)\\
&=&\frac{1}{2}\left[f(x+ct)+\frac{1}{c}\int_0^{x+ct}g(s)ds+C\right]+\frac{1}{2}\left[f(x-ct)+\frac{1}{c}\int_{x-ct}^0g(s)ds-C\right],\\
\end{eqnarray*}
which completes the proof.
\end{proof} 


\begin{exercise}
Show that odd/even initial conditions yield odd/even solutions.
\end{exercise}

\vskip 3 in

\begin{exercise}
Show that periodic initial conditions yield periodic solutions.
\end{exercise}



\begin{exercise}
Show that we can deduct the solution to the finite string problem from the solution
of the infinite string. You may need help on this one! 
\end{exercise}


%\begin{center}
%Figure 7.: \\
% (draw your own figure).
%\end{center}

\vfill
\eject

\section{Challenge Problems for Lecture 7}





\begin{problem}
A damped string of length $1$ has equation 
$$ u_{tt} = c^2 u_{xx} - \gamma u_t, $$ 
where $\gamma$ is a small damping coefficient. 
Find the solution $u(x,t)$ assuming that both endpoints are fixed, the initial condition is $x(1-x)$ and the initial velocity is zero. 
 
Plot and animate the solution for the case when 
$ c = \displaystyle{\frac{1}{4}}$ and $\gamma = \displaystyle{\frac{1}{5}}$. 
\end{problem}




\begin{problem}
Find the solution $u(x,y,t)$ of a square membrane with side $1$ fixed on the 
boundary, if the initial position is $u(x,y,0) = (x-x^2)(y-y^2)$ and the 
initial velocity is zero. 
 
Animate several eigenfunctions $u_{n,m}(x,y,t)$, say,  
$u_{1,1}$, $u_{1,2}$, $u_{3,5}$, assuming that $c=1$. 

\end{problem}



\begin{problem}
Solve the string equation $u_{tt} = c^2 u_{xx}$ for $L=1$, with the boundary 
conditions  $u(0, t) = 0$ and $u(1,t) = 1$, with zero initial velocity, 
assuming that the initial position is 
\begin{enumerate}
\item[(a)] $u(x,0) = \sin x$ (easier), 
\item[(b)] $u(x,0) = x^2$ (harder). 
\end{enumerate}
 
{\it Hint:\/} You cannot use the superposition principle, since the boundary condition at $x=1$ is not homogeneous. Try a change of coordinates first, $v(x,t) = u(x,t) + h(x)$, where $h(x)$ is a suitable (easy) function that would guarantee  
that $v$ also satisfies the string equation, now with homogeneous boundary conditions. 

\end{problem}

\begin{problem}
% Tikhonov ? Samarskii, pp. 120-121 
Solve the equation $u_{tt} = c^2 u_{xx} + \sin x$ 
For $0 \le x \le \pi$ and $t>0$, with the boundary conditions 
$u(0, t) = 1$, $u_t(\pi, t) = 2$,    and the initial conditions 
$u(x, 0) = f(x)$, $u_t(x, 0) = g(x)$. 
 
{\it Hint\/:} Make the change of coordinates $u(x,t) = y(x) + v(x,t)$, where 
$y(x)$ satisfies 
$$  c^2 y'' + \sin x = 0$$, $y(0) = 1$, and $y(\pi) = 2$.  
Find $y$.  

What will be the PDE for $v$? 

What are the (boundary and initial) conditions for $v$?
\end{problem}


\begin{problem}
% Articolo, p. 213 
Solve the string equation $u_{tt} = c^2 u_{xx}$ for $L=1$, with the boundary conditions 
$u(0,t)=0$ and $u_x(1,t) + u(1,t)=0$. This corresponds to the case when the left end is fixed and the right end is attached to an elastic hinge. The initial conditions are 
$u(x,0) = x - \displaystyle{\frac{2}{3}} x^2$ and $u_t(x,0) = x$. 
 
{\bf Note.} This exercise is hard! The eigenvalues $\lambda_n$ will be solutions of a transcendental equation.
\end{problem}

\begin{problem}
In the "damped" case, what happens if the friction coefficient is large, say that
you immerse your string in a high viscosity liquid? 
\end{problem}

\vfill


\end{document}






