Solution (source code)

= Solution

Fixed endpoints select the spatial <normal modes> $\sin(n\pi x/L)$, with angular frequencies $\omega_n=n\pi c/L$. Zero initial velocity selects cosine time dependence. Matching the two nonzero initial amplitudes gives
$$
\boxed{y(x,t)=\sin\frac{\pi x}L\cos\frac{\pi ct}L-\frac13\sin\frac{3\pi x}L\cos\frac{3\pi ct}L.}
$$
Each term separately satisfies the <wave equation> and fixed-end <boundary conditions>. At $t=0$ the prescribed profile is recovered, and differentiating in time gives zero initial velocity.

\Image[/past-exam-of-the-mathematical-methods-ii-course-of-the-university-of-oxford/2014-resit-two-mode-string-recurrence.png]
{title=Two-mode string motion, sign reversal at half a period and exact recurrence}