Solution (source code)

= Solution

Use $\sin\theta\cos\theta=\tfrac12\sin2\theta$ with $\theta=\pi x/l$. The initial shape becomes
$$
y(x,0)=A\sin\frac{\pi x}{l}+\frac A2\sin\frac{2\pi x}{l}.
$$
The <sine> functions are orthogonal on $[0,l]$, so this decomposition directly identifies the two nonzero spatial <normal mode> coefficients. Since the string is released from rest, every time-dependent sine coefficient vanishes and the subsequent motion is
$$
\boxed{y(x,t)=A\sin\frac{\pi x}{l}\cos\omega_1t+\frac A2\sin\frac{2\pi x}{l}\cos2\omega_1t},\qquad\omega_1=\frac{\pi c}{l}.
$$
Thus the signed mode amplitudes are $A_1=A$, $A_2=A/2$ and $A_n=0$ for $n\ge3$; their magnitude amplitudes are $|A|$ and $|A|/2$. The factor of two in the second <angular frequency> is fixed by the same boundary conditions as its spatial <wavelength>.

\Image[/past-exam-of-the-mathematical-methods-ii-course-of-the-university-of-oxford/2015-resit-string-mode-superposition.png]
{title=Motion obtained from the first two string modes with initially zero velocity}