Vibrating string : variable separation method

Sounds produced by vibrating strings clamped at two points can be modelled by $(1-D)$ wave equation. There are two ways of producing such sounds
  1. Produce by plucking the strings e.g. as in guitar $\rightarrow$ give initial displacement and no initial velocity.
  2. Produce by striking the strings e.g. as in harmonium, piano $\rightarrow$ give initial velocity and zero initial velocity.
A generic $(1-D)$ wave equation problem is solve

$\displaystyle u_{tt}-c^2u_{xx}$ $\displaystyle =0,~0<x<L,~t>0,$ (3.58)
$\displaystyle u(0,t)$ $\displaystyle =u(L,t)=0,$ (3.59)
$\displaystyle u(x,0)$ $\displaystyle =f(x),$ (3.60)
$\displaystyle u_t(x,0)$ $\displaystyle =g_0(x),$ (3.61)

There are two ways of solving this problem by method of separation of variables.

Method-I: Split the problem into following two separate BVPs each involving only one non-homogeneous BC

Problem A\begin{gather*}=
\begin{cases}
_{tt}-c^2u_{xx}=0, \\
u(0,t)=u(L,t)=0, \\
u(x,0...
...\\
u(0,t)=u(L,t)=0, \\
u(x,0)=0,\\
u_t(x,0)=g(x),\\
\end{cases}\end{gather*}    

here $0<x<L,~t>0$ and problem A is corresponding to guitar and problem B is corresponding to Piano. Solve each problem separately. Let $u_A(x,t)$ and $u_B(x,t)$ be the solutions of problem A and B. Then their sum

$\displaystyle u(x,t)=u_A(x,t)+u_B(x,t),$

will be the solution of the original problem given in Eq. ([*]) to Eq. ([*]) because
  1. $u_A$ and $u_A$ satisfies the equation $u_{tt}-c^2u_{xx}=0.$ By linearity $u(x,t)$ also satisfies given PDE.
  2. $u(0,t)=u_A(0,t)+u_B(0,t)=0$ and similarly $u(L,t)=0$
  3. $u(x,0)=u_A(0,t)+u_B(0,t)=f(x)$ and $u_t(x,o)=(u_A)_t(x,0)+(u_B)_t(x,0)=g(x).$
Solve each problem by method of separation of variable in the following steps.

Problem A
  1. Assume $u(x,t)=X(x)T(t).$
  2. Form the separated equations for $X(x)$ and $T(t).$
  3. Discuss the cases for $\lambda>0,$ $\lambda=0,$ $\lambda < 0,$ and show that only $\lambda<0$ allowed and $\lambda_n=\frac{n^2\pi^2}{L^2},~n=1,2,...$ then

    $\displaystyle X_n(x)=\sin(c\frac{n\pi}{L})x,$

    $\displaystyle T_n(t)=\cos(c\frac{n\pi}{L})t.$

    Therefore,

    $\displaystyle u_n(x,t)=A_n\sin(\frac{n\pi}{L}x)\cos(c\frac{n\pi}{L})t.$

    Then $u(x,t)=\sum_{n=1}^{\infty}u_n(x,t).$
  4. As in the previous cases show that $\{A_n\}$ can be found by using non-homogeneous initial conditions $u(x,0)=f(x)$ and show that

    $\displaystyle A_n=\frac{2}{L}\int_{0}^{L}f(x)\sin(\frac{n\pi}{L}x)dx.$

  5. Thus the required solution is

    $\displaystyle u_A(x,t)=\sum_{n=1}^{\infty}A_n \sin(\frac{n\pi}{L}x)\cos(c\frac{n\pi}{L}t),$

    where $\{A_n\}$ are as above.
Problem B
  1. Assume $u(x,t)=X(x)T(t).$
  2. Form the separated equations for $X(x)$ and $T(t).$
  3. Discuss the cases for $\lambda>0,$ $\lambda=0,$ $\lambda < 0,$ and show that only $\lambda<0$ allowed and $\lambda_n=\frac{n^2\pi^2}{L^2},~n=1,2,...$ then

    $\displaystyle X_n(x)=\sin(c\frac{n\pi}{L})x,$

    $\displaystyle T_n(t)=\cos(c\frac{n\pi}{L})t.$

    Therefore,

    $\displaystyle u_n(x,t)=B_n\sin(\frac{n\pi}{L}x)\sin(c\frac{n\pi}{L})t.$

    Then $u(x,t)=\sum_{n=1}^{\infty}u_n(x,t).$
  4. $\{B_n\}$ can be found by using non-homogeneous initial conditions $u_t(x,0)=g(x)$ and show that

    $\displaystyle B_n=\frac{2}{n\pi c}\int_{0}^{L}g(x)\sin(\frac{n\pi}{L}x)dx.$

  5. Thus the required solution is

    $\displaystyle u_B(x,t)=\sum_{n=1}^{\infty}B_n \sin(\frac{n\pi}{L}x)\sin(c\frac{n\pi}{L}t),$

    where $\{B_n\}$ are as above.

$\displaystyle u(x,t)=\sum_{n=1}^{\infty}\sin(\frac{n\pi}{L}x)\big[A_n\cos(c\frac{n\pi}{L}t)+B_n\sin(c\frac{n\pi}{L}t)\big]$

(Here is the effect of different boundary conditions in both cases.)
Method-II: Take the bull by born strategy. Here we directly solve the problem given in Eq. ([*]) to Eq. ([*]) without splitting it. Assume that the solution is of the form

$\displaystyle u(x,t)=X(x)T(t),$

Put it in given PDE, one gets

$\displaystyle \frac{X''}{X}=\frac{1 }{c^2}\frac{T''}{T}=\lambda,$

where $\lambda$ is a separation constant.
  1. If $\lambda >0 $ then

    $\displaystyle X''-\lambda X=0,$

    % latex2html id marker 7173
$ \therefore~X=c_1\exp(\sqrt{\lambda}x)+c_2\exp(-\sqrt{\lambda}x)$ and using boundary $X(0)=0$ and $X(L)=0.$ We get

    $\displaystyle c_1+c_2$ $\displaystyle = 0,$    
    $\displaystyle c_1\exp(\sqrt{\lambda}L)+c_2\exp(-\sqrt{\lambda}L)$ $\displaystyle =0.$    

    These linear system of equations in terms of $c_1$ and $c_2$ posses non-trivial solution iff

    $\displaystyle \begin{vmatrix}
1 & 1 \\
\exp(\sqrt{\lambda}L) & \exp(-\sqrt{\lambda}L)
\par
\end{vmatrix}=
0,
$

    which gives that $\sqrt{\lambda}L=0.$ But $L\neq 0,$ therefore, $\lambda =0.$ Which is not possible for this case.
  2. If $\lambda =0.$ Then $X''=0,$ which implies that $X=c_1 x+c_2$ and using boundary conditions, we will get trivial solution.
  3. If $\lambda<0.$ Then replace $\lambda$ by $-\lambda$ in separated equation as

    $\displaystyle \frac{X''}{X}=\frac{1 }{c^2}\frac{T''}{T}=-\lambda,$

    $\displaystyle X''+\lambda X=0,$

    $\displaystyle X=c_1 \cos(\sqrt{\lambda}x)+c_2\sin(\sqrt{\lambda}x).$

    Again using the boundary conditions given, one gets $c_2 \neq 0$ and

    $\displaystyle \lambda=\frac{n^2\pi^2}{L^2},$

    and corresponding eigen functions are

    $\displaystyle X_n=\sin(\frac{n\pi x}{L}).$

    The corresponding time-dependence is found as

    $\displaystyle \frac{T''}{c^2T}$ $\displaystyle =-\frac{n^2\pi^2}{L^2},$    
    % latex2html id marker 7220
$\displaystyle \therefore~T''+$ $\displaystyle \frac{n^2\pi^2}{L^2}c^2T=0,$    
    % latex2html id marker 7222
$\displaystyle \therefore~T_n=$ $\displaystyle T=\beta_n\cos(\frac{n\pi}{L}ct)+\gamma_n\sin(\frac{n\pi}{L}ct)$    

    And the combined solution is

    $\displaystyle u(x,t)=\sin(\frac{n\pi}{L}x)\big[\beta_n\cos(c\frac{n\pi}{L}t)+\gamma_n\sin(c\frac{n\pi}{L}t)\big],$

    By the principle of superposition of solutions

    $\displaystyle u(x,t)$ $\displaystyle =\sum_{n=1}^{\infty}u_n(x,t),$ (3.62)
    $\displaystyle u(x,t)$ $\displaystyle =\sum_{n=1}^{\infty}\sin(\frac{n\pi}{L}x)\big[\beta_n\cos(c\frac{n\pi}{L}t)+\gamma_n\sin(c\frac{n\pi}{L}t)\big],$ (3.63)

    where the constants $\{\beta_n\}$ and $\{\gamma_n\}$ can be found by using ICs. Given $u(x,0)=f(x)$

    $\displaystyle f(x)$ $\displaystyle =\sum_{n=1}^{\infty}\beta_n\sin(\frac{n\pi}{L}x),$ (3.64)
    $\displaystyle \beta_n$ $\displaystyle =\frac{2}{L}\int_{0}^{L}f(x)\sin(\frac{n\pi}{L}x),$ (3.65)
    $\displaystyle u_t(x,t)$ $\displaystyle =\sum_{n=1}^{\infty}\sin(\frac{n\pi}{L}x)\frac{n\pi}{L}c\big[-\beta_n\cos(c\frac{n\pi}{L}t)+\gamma_n\sin(c\frac{n\pi}{L}t)\big],$    
    $\displaystyle u_t(x,0)=g(x)$ $\displaystyle =\sum_{n=1}^{\infty}\sin(\frac{n\pi}{L}x)\frac{n\pi}{L}c\gamma_n,$    
    $\displaystyle \gamma_n$ $\displaystyle =\frac{2}{n\pi}\frac{1}{c}\int_{0}^{L}g(x)\sin(\frac{n\pi}{L}x)dx.$ (3.66)

    Thus the solution of problem Eq. ([*]) to Eq. ([*]) is given by Eq. ([*]), where $\{\beta_n\}$ is given by Eq. ([*]) and $\{\gamma_n\}$ is given by Eq. ([*]).

    Note: $u_n(x,t)$ are known as normal modes of vibrations and $w_n=\frac{n\pi}{L}c=\lambda_n c$ are known as normal frequencies.

Example 3.2.1   A string of length $L$ linear density $\rho$ and tension $T$ is set in motion by moving by moving its midpoint $x=\frac{L}{2}$ aside the distance $\frac{1}{2}bL$ and then releasing it form rest at time $t=0.$ Find the displacement $y(x,t).$ Given $a^2=\frac{T}{\rho}=$ velocity of oscillation.

Solution The corresponding BVP is

$\displaystyle y_{tt}$ $\displaystyle =a^2y_{xx}~0<x<L,~t>0,$ (3.67)
$\displaystyle y(0,t)$ $\displaystyle =y(L,t)=0,$ (3.68)
$\displaystyle y(x,0)$ $\displaystyle =f(x),$ (3.69)
$\displaystyle y_t(x,0)$ $\displaystyle =0=g(x),$ (3.70)

where

\begin{displaymath}f(x) =
\begin{cases}
bx &0\leq x \leq \frac{L}{2}\\
L-x& \frac{L}{2}\leq x \leq L
\end{cases}\end{displaymath} (3.71)

Figure:
\includegraphics[width=14cm, height=7.0cm]{imagebl2.pdf}
The general solution of wave propagation is given by

$\displaystyle y(x,t)=\sum_{n=1}^{\infty}\sin(\frac{n\pi}{L}x)\big[a_n\cos(\frac{n\pi}{L}at)+b_n\sin(c\frac{n\pi}{L}at)\big],$

where

$\displaystyle a_n=\frac{2}{L}\int_{0}^{L}f(x)\sin(\frac{n\pi}{L}x)dx,$

$\displaystyle b_n=\frac{2}{L}\frac{L}{n\pi}\frac{1}{a}\int_{0}^{L}g(x)\cos(\frac{n\pi}{L}x)dx.
$

Here

\begin{displaymath}f(x) =y(x,0)=
\begin{cases}
bx &0\leq x \leq \frac{L}{2}\\
b(x-L)& \frac{L}{2}\leq x \leq L
\end{cases}\end{displaymath} (3.72)

$\displaystyle g(x)=u_t(x,0)=0, ~\implies~b_n=0~\forall~n=1,2,...$

$\displaystyle a_n=\frac{2}{L}\Bigg[\int_{0}^{\frac{L}{2}}bx\sin(\frac{n\pi}{L}x)dx+\int_{\frac{L}{2}}^{L}b(L-x)\sin(\frac{n\pi}{L}x)dx\Bigg],$

Now

$\displaystyle \int_{0}^{\frac{L}{2}}x\sin(\frac{n\pi}{L}x)dx$ $\displaystyle =\frac{L}{n\pi}\Bigg[-\frac{L}{2}\cos(\frac{n\pi}{2})+\frac{L}{n\pi}\sin(\frac{n\pi}{2})\Bigg],$    
$\displaystyle \int_{\frac{L}{2}}^{L}(L-x)\sin(\frac{n\pi}{L}x)dx$ $\displaystyle =\frac{L}{n\pi}\Bigg[\frac{L}{2}\cos(\frac{n\pi}{2})+\frac{L}{n\pi}\sin(\frac{n\pi}{2})\Bigg],$    
% latex2html id marker 7305
$\displaystyle \therefore~a_n=$ $\displaystyle \frac{4bL}{n^2\pi^2}\sin(\frac{n\pi}{2}.)$    
% latex2html id marker 7307
$\displaystyle \therefore~ y(x,t)=$ $\displaystyle \frac{4bL}{\pi^2}\sum_{n=1}^{\infty}\frac{1}{n^2}\sin(\frac{n\pi}{L})\sin(\frac{n\pi}{L}x)\cos(\frac{n\pi}{L}at),$    

Remark
  1. In contrast with series solution of the heat equation formal series solutions of the wave equation ordinary do not possess sufficient term wise differentiability e.g. for the above equation

    $\displaystyle y_x=$ $\displaystyle \frac{4bL}{\pi^2}\sum_{n=1}^{\infty}\frac{1}{n^2}\sin(\frac{n\pi}{L})\frac{n\pi}{L}\cos(\frac{n\pi}{L}x)\cos(\frac{n\pi}{L}at),$    
    $\displaystyle y_xx=$ $\displaystyle -\frac{4b}{L}\sum_{n=1}^{\infty}\frac{1}{n^2}\sin(\frac{n\pi}{L})\sin(\frac{n\pi}{L}x)\cos(\frac{n\pi}{L}at),$    

    This is generally fails to converge, because the convergence faster $\frac{1}{n^2}$ has disappeared after the second differentiation (w.r.t. $x$).
  2. Expressing above solution in d'alembert form. Let $A=\frac{n\pi x}{L},~B=\frac{n\pi at}{L}.$ Therefore the solution is of form

    $\displaystyle y(x,t)=$ $\displaystyle \sum_{n=1}^{\infty}a_n\sin(\frac{n\pi}{L}x)\cos(\frac{n\pi}{L}at),$    
    $\displaystyle y(x,t)=$ $\displaystyle \frac{1}{2}\sum_{n=1}^{\infty}a_n\sin(\frac{n\pi}{L}(x+at))+\frac{1}{2}\sum_{n=1}^{\infty}a_n\sin(\frac{n\pi}{L}(x-at))$    

    Using $y(x,0)=f(x),$ one gets

    $\displaystyle F(x)=\sum_{n=1}^{\infty}a_n\sin(\frac{n\pi}{L}x)$

    Check $F(x)$ be the odd extension of period $2L$ of the initial position function $f(x).$

    % latex2html id marker 7334
$\displaystyle \therefore~y(x,t)=\frac{1}{2}\big[F(x+at)+F(x-at)\big],$

    This is d'alembert form for the solution of wave equation with initial displacement $f(x)$ and no initial velocity compare it with the general form of d'alembert solution.