Solution (source code)

= Solution

A reference string segment $dx$ has <mass> $\mu\,dx$ and transverse <velocity> $y_t$. Its <kinetic energy> is $dK=\mu y_t^2\,dx/2$. In the small-slope approximation its extra <arc length> is
$$
d\ell-dx=\bigl(\sqrt{1+y_x^2}-1\bigr)dx
=\frac12y_x^2\,dx+O(y_x^4)\,dx.
$$
The <work> against constant <tension> $T$ supplies the corresponding <elastic potential energy> $dU=T(d\ell-dx)$. To quadratic order, the <energy density> per unit reference length is therefore
$$
\boxed{u=\frac{d(K+U)}{dx}
=\frac12\left(\mu y_t^2+Ty_x^2\right).}
$$
For the <travelling wave> $y=A\cos(kx-\omega t+\phi)$, the <wave equation> implies $\omega^2=(T/\mu)k^2$. Its <kinetic energy density> and elastic <energy density> are equal, so
$$
u(x,t)=\mu A^2\omega^2\sin^2(kx-\omega t+\phi).
$$
The <energy per wavelength of a transverse string wave> comes from integration over any full <wavelength> $\lambda=2\pi/|k|$:
$$
\boxed{E_\lambda=\int_{x_*}^{x_*+\lambda}u(x,t)\,dx
=\frac12\mu A^2\omega^2\lambda,\qquad
\langle u\rangle=\frac12\mu A^2\omega^2.}
$$
\b[The printed expression for energy per wavelength is missing a factor $\lambda$.] Its right-hand side is the mean <energy density>, with units of <energy> per length. For a concrete counterexample within the small-slope regime, take $\mu=1\,\mathrm{kg\,m^{-1}}$, $T=1\,\mathrm N$, $A=0.01\,\mathrm m$ and $\omega=\pi\,\mathrm{s^{-1}}$. Then $\lambda=2\,\mathrm m$ and direct integration gives $E_\lambda=10^{-4}\pi^2\,\mathrm J$, whereas the printed right-hand side is $5\times10^{-5}\pi^2\,\mathrm{J\,m^{-1}}$. It cannot equal an <energy>.