Modal energy of a string (source code)

= Modal energy of a string
{title2=$E_n=\mu L\omega_n^2(A_n^2+B_n^2)/4$}

For a uniform fixed-end <mechanical string> of length $L$, <linear mass density> $\mu$ and wave <speed> $c$, let its $n$th <normal mode> be $y_n=[A_n\cos\omega_nt+B_n\sin\omega_nt]\sin(n\pi x/L)$, where $\omega_n=cn\pi/L$. The conserved <energy> is the sum of <kinetic energy> and elastic <potential energy>,
$$
E_n=\frac\mu2\int_0^L[(y_n)_t^2+c^2(y_n)_x^2]dx.
$$
The sine and cosine squared integrals are $L/2$, so substitution proves the title formula. <Orthogonality> makes energies of distinct <normal modes> add. For zero initial displacement and initial modal <velocity> $V_n$, $A_n=0$ and $B_n=V_n/\omega_n$, giving $E_n=\mu LV_n^2/4$.