[Cymraeg]

Plucking and hitting strings

Fig.: String pegged at x=0 and x=l vibrating with amplitude h.

The strings of a musical instrument can either be plucked or hit in order to begin a vibration, producing --if we're lucky-- a note. A guitar player plucks strings but a piano player makes little hammers hit strings inside the instrument. The difference is that the free oscillation begins when the guitar player releases the string in a position away from its rest (equilibrium) position, while the hammer in the piano hits the relaxed string. Similarly, the guitar string begins to accelerate towards the relaxed position, while the piano string is at maximum velocity as soon as the hammer hits it and then decelerates as it moves towards its amplitude.

Like a pendulum, the string oscillates between states of maximum kinetic energy (when it passes through the relaxed position) and maximum potential energy (amplitude). When a string is plucked, it begins its oscillation in the potential-energy state; if it is hit, it begins in the kinetic-energy state.

The general solutions of the wave equation are: $y(x,t)=\begin{cases}\cos{kx}\cos{kvt}&\sin{kx}\cos{kvt}\\\cos{kx}\sin{kvt}&\sin{kx}\sin{kvt}\end{cases}$.
The string is pegged at $x=0$ and at $x=l$: $y(0,t)=y(l,t)=0$.
Hence half the period of any oscillation must be a multiple of the length of the string,
i.e. standing wave condition: $k=\frac{n\pi}{l}$.
Also, the $\cos{(kx)}$ solutions don't satisfy $y(0,t)=0$: $y(x,t)=\begin{cases}\color{red}{\cancel{\color{black}{\cos{kx}\cos{kvt}}}}&\sin{kx}\cos{kvt}\\\color{red}{\cancel{\color{black}{\cos{kx}\sin{kvt}}}}&\sin{kx}\sin{kvt}\end{cases}$.

The remaining boundary conditions depend on whether the string is in a guitar or in a piano:

plucked (guitar) hit (piano)
Positional boundary condition:
start at max. amplitude: $y(x,0)=f(x)$ start at relaxed position: $y(x,0)=0$
Velocity (differential) boundary condition:
no motion before release: $\left.\frac{\partial y(x,t)}{\partial t}\right|_{t=0}=0$ max. velocity at release: $\left.\frac{\partial y(x,t)}{\partial t}\right|_{t=0}=v(x)$
The solution is either a sine or a cosine wave in time. The velocity, its derivative with time, is therefore a cosine or a sine wave, respectively. The velocity is supposed to be 0 at $t=0$; so it has to be the sine wave. Therefore the solution itself must be the cosine form in time. $y(x,0)=0$ demands the sine solution in time.
General solution selected:
$y(x,t)=\sin{(\frac{n\pi x}{l})}\cos{(\frac{n\pi vt}{l})}$ $y(x,t)=\sin{(\frac{n\pi x}{l})}\sin{(\frac{n\pi vt}{l})}$
Expand into sine series:
$y(x,t)=\sum_{n=1}^{\infty}b_n\sin{(\frac{n\pi x}{l})}\cos{(\frac{n\pi vt}{l})}$ $y(x,t)=\sum_{n=1}^{\infty}b_n\sin{(\frac{n\pi x}{l})}\sin{(\frac{n\pi vt}{l})}$
Recall boundary condition...:
$y(x,0)=f(x)$ $\left.\frac{\partial y(x,t)}{\partial t}\right|_{t=0}=v(x)$
...and substitute:
$f(x)=y(x,0)=\sum_{n=1}^{\infty}b_n\sin{(\frac{n\pi x}{l})}$ Here it's necessary to differentiate $y(x,t)$ before applying the differential BC:
$v(x)=\left.\frac{\partial y(x,t)}{\partial t}\right|_{t=0}=\sum_{n=1}^{\infty}b_n\frac{n\pi v}{l}\sin{(\frac{n\pi x}{l})}$

Finding the Fourier coefficients for the hit string problem is left for the workshop. Just use the abbreviation $d_n=b_n\frac{n\pi v}{l}$ and then solve the Fourier integral as usual.

Fourier coefficients for the plucked string

The function f(x) describing the position of the string just before it is released (i.e. at t=0) can be seen from the diagram above.

As we see, the positional BC is: $$f(x)=\begin{cases}\frac{2xh}{l}&({\rm for~}0\leq x\leq\frac{l}{2})\\\frac{2(l-x)h}{l}&({\rm for~}\frac{l}{2}\leq x\leq l)\end{cases}\qquad.$$
To find the Fourier coefficients, solve: $$b_n=\frac{2}{l}\int_0^lf(x)\sin{\left(\frac{n\pi x}{l}\right)}{\rm d}x\qquad.$$
Substitute $f(x)$: $$=\frac{2}{l}\left(\int_0^{\frac{l}{2}}\frac{2xh}{l}\sin{\left(\frac{n\pi x}{l}\right)}{\rm d}x+\int_{\frac{l}{2}}^l\frac{2(l-x)h}{l}\sin{\left(\frac{n\pi x}{l}\right)}{\rm d}x\right)$$
and move constants in front of the integrals:
$$=\frac{4h}{l^2}\int_0^{\frac{l}{2}}x\sin{\left(\frac{n\pi x}{l}\right)}{\rm d}x+\frac{4h}{l}\int_{\frac{l}{2}}^l\sin{\left(\frac{n\pi x}{l}\right)}{\rm d}x-\frac{4h}{l^2}\int_{\frac{l}{2}}^lx\sin{\left(\frac{n\pi x}{l}\right)}{\rm d}x\qquad.$$
The first and third integral are identical (apart from the limits).
It can be integrated by parts:
$\int x\sin{\left(\frac{n\pi x}{l}\right)}{\rm d}x$ $=x\int\sin{\left(\frac{n\pi x}{l}\right)}{\rm d}x-\iint\sin{\left(\frac{n\pi x}{l}\right)}{\rm d}^2x$
$=-\frac{xl}{n\pi}\cos{\left(\frac{n\pi x}{l}\right)}+\frac{l}{n\pi}\int\cos{\left(\frac{n\pi x}{l}\right)}{\rm d}x$
$=-\frac{xl}{n\pi}\cos{\left(\frac{n\pi x}{l}\right)}+\frac{l^2}{n^2\pi^2}\sin{\left(\frac{n\pi x}{l}\right)}$
Thus, solve integrals in the $b_n$ equation: $=-\frac{4hl}{l^2n\pi}\left[x\cos{\left(\frac{n\pi x}{l}\right)}\right]_0^{\frac{l}{2}}+\frac{4hl^2}{l^2n^2\pi^2}\left[\sin{\left(\frac{n\pi x}{l}\right)}\right]_0^{\frac{l}{2}}$
$-\frac{4hl}{ln\pi}\left[\cos{\left(\frac{n\pi x}{l}\right)}\right]_{\frac{l}{2}}^l+\frac{4hl}{l^2n\pi}\left[x\cos{\left(\frac{n\pi x}{l}\right)}\right]_{\frac{l}{2}}^l-\frac{4hl^2}{l^2n^2\pi^2}\left[\sin{\left(\frac{n\pi x}{l}\right)}\right]_{\frac{l}{2}}^l\qquad,$
substitute limits: $=\bbox[yellow]{-\frac{4hll}{l^2n\pi 2}\cos{\left(\frac{n\pi}{2}\right)}}+0\bbox[lightgreen]{+\frac{4hl^2}{l^2n^2\pi^2}\sin{\left(\frac{n\pi}{2}\right)}}+0$
$\bbox[cyan]{-\frac{4hl}{ln\pi}\cos{(n\pi)}}\bbox[yellow]{+\frac{4hl}{ln\pi}\cos{\left(\frac{n\pi}{2}\right)}}\bbox[cyan]{+\frac{4hll}{l^2n\pi}\cos{(n\pi)}}\bbox[yellow]{-\frac{4hll}{l^2n\pi 2}\cos{\left(\frac{n\pi}{2}\right)}}$
$+0\bbox[lightgreen]{+\frac{4hl^2}{l^2n^2\pi^2}\sin{\left(\frac{n\pi}{2}\right)}}\qquad,$
and tidy up: $=\color{red}{\cancel{\color{black}{\left(-\frac{2h}{n\pi}+\frac{4h}{n\pi}-\frac{2h}{n\pi}\right)}}}\cos{\left(\frac{n\pi}{2}\right)}+\left(\frac{4h}{n^2\pi^2}+\frac{4h}{n^2\pi^2}\right)\sin{\left(\frac{n\pi}{2}\right)}$
$+\color{red}{\cancel{\color{black}{\left(-\frac{4h}{n\pi}+\frac{4h}{n\pi}\right)}}}\cos{(n\pi)}\qquad.$
Most of the coefficients cancel out, so: $b_n=\begin{cases}0\quad&{\rm for~even~}n\\\frac{8h}{n^2\pi^2}(-1)^{\frac{n-1}{2}}\quad&{\rm for~odd~}n\end{cases}\qquad.$
The factor $(-1)^{\frac{n-1}{2}}$ ensures an alternating sign. Finally,
substitute the $b_n$ into $y(x,t)$: $$y(x,t)=\sum_{{\rm odd~}n=1}^{\infty}(-1)^{\frac{n-1}{2}}\frac{8h}{n^2\pi^2}\sin{\left(\frac{n\pi x}{l}\right)}\cos{\left(\frac{n\pi vt}{l}\right)}\qquad.$$

Wave equation in more than one dimension

Most problems of this kind require the use of polar coordinates in order to exploit their inherent symmetry. The additional spatial dimension(s) are dealt with by additional separation steps after separating off the time dependence.

General wave equation: $$\nabla^2z=\frac{1}{v^2}\frac{\partial^2z}{\partial t^2}$$
Separate off time part: $$\frac{1}{A}\nabla^2A=\frac{1}{v^2T}\frac{{\rm d}^2T}{{\rm d}t^2}=-k^2\qquad,$$
then separate $x$ and $y$: $$\frac{1}{X}\frac{{\rm d}^2X}{{\rm d}x^2}+k^2=-\frac{1}{Y}\frac{{\rm d}^2Y}{{\rm d}y^2}=-l^2\qquad.$$

That concludes the section on differential equations, but workshop 4 is still left to do. You can check your solutions afterwards.

Having learned about Fourier series, it's a small step to deal with Fourier transformation, a very important technique in physics.