#### 2.1.3 Both ends of string ﬁxed, initial velocity zero, d’Alembert solution

Solve, \(0<x<L\)\[ \frac{\partial ^{2}u}{\partial t^{2}}=a^{2}\frac{\partial ^{2}u}{\partial x^{2}}\qquad 0<x<L,t>0 \] Boundary conditions, \(t>0\)\begin{align*} u\left ( 0,t\right ) & =0\\ u\left ( L,t\right ) & =0 \end{align*}

Initial conditions, \(t=0\)\begin{align*} \frac{\partial u\left ( x,0\right ) }{\partial t} & =0\\ u\left ( x,0\right ) & =f\left ( x\right ) \end{align*}

solution

When using d’Alembert solution, the initial position from \(0<x<L\) is ﬁrst odd extended to \(-L<x<L\). The new odd
extended function is called \(h\left ( x\right ) \) which now has period \(2L\). The solution becomes\[ u\left ( x,t\right ) =\frac{1}{2}\left ( h\left ( x-at\right ) +h\left ( x+at\right ) \right ) \] Below is speciﬁc example
with animation.

Animations

Solve the above, with \(a=2\) (speed). \[ f\left ( x\right ) =\begin{array} [c]{ccc}\frac{x}{10} & & 0<x<10\\ \frac{30-x}{20} & & 10<x<30 \end{array} \] Hence \(L=30\) and period of \(h\left ( x\right ) \) is \(2L=60\). The animation basically implements \(u\left ( x,t\right ) =\frac{1}{2}\left ( h\left ( x-at\right ) +h\left ( x+at\right ) \right ) \) for
time which is 3 periods. The time to travel one period is found from \(a=\frac{2L}{t}\). Solving for \(t\) gives \(t=\frac{2L}{a}=\frac{60}{2}=30\) seconds. So
every \(30\) seconds, the shape \(f\left ( x\right ) \) repeats.

This is plot of \(h\left ( x\right ) \) (the odd extension of \(f\left ( x\right ) \)) from \(-L<x<L\) at time \(t=0\)

This is plot of one \(h\left ( x\right ) \) moving left and one \(h\left ( x\right ) \) moving right at \(t=4\) seconds (before adding them)

This is plot of average of the above two waves at \(t=4\) seconds from \(-L<x<L\)

This is the same plot as above, but for \(0<x<L\)

This is animation for 60 seconds showing it for \(-2L<x<2L\)

This is the same animation for 60 seconds but showing it for \(0<x<L\) since this is the actual physical
range

Source code is