Solution (source code)

= Solution

The total <kinetic energy> and small-slope elastic <potential energy> are
$$
K=\frac\mu2\int_0^Ly_t^2dx,\qquad V=\frac T2\int_0^Ly_x^2dx.
$$
Orthogonality removes cross terms between the two distinct sine or cosine modes. A mode of amplitude $A_n$ contributes $K_n=\mu LA_n^2\omega_n^2\sin^2(\omega_nt)/4$ and $V_n=TLA_n^2k_n^2\cos^2(\omega_nt)/4$. For amplitudes $1,1/2$ and $n=2,4$, the prefactors agree. Writing $\Omega=2\pi v/L$,
$$
\boxed{K(t)=\frac{T\pi^2}{L}[\sin^2\Omega t+\sin^2(2\Omega t)],\qquad V(t)=\frac{T\pi^2}{L}[\cos^2\Omega t+\cos^2(2\Omega t)].}
$$
Thus
$$
\boxed{E=K+V=\frac{2T\pi^2}{L},}
$$
independent of time. This is another instance of <equal modal energies for inverse-harmonic string amplitudes>. An explicit initial amplitude $A$ multiplies every energy by $A^2$.

\Image[/past-exam-of-the-mathematical-methods-ii-course-of-the-university-of-oxford/2013-resit-two-mode-string-energy.png]
{title=Two-harmonic string displacement and exchange between kinetic and potential energy}