Q: A string of tension $T$, density $\rho$ with fixed ends at $x = 0$ and $x = \ell$ is hit by a hammer so that $u(x,0) = 0$, $u_t (x,0) = V$ in $[-\delta + \frac{1}{2}\ell, \delta + \frac{1}{2}\ell]$, and $u_t (x,0) = 0$ elsewhere. Find the solution explicitly in series form. Find the energy,
$E_n (h) = \frac{1}{2} \int_{0}^{\ell} [ \rho (\frac{\partial h}{\partial t})^2 + T (\frac{\partial h}{\partial x})^2 ] dx$,
of the nth harmonic $h = h_n$.
Soln: I have determined (by separation of variables and the B.C) that
$u(x,t) = \sum_{n = 1}^{\infty} \frac{2 V \ell}{n^2 \pi^2 c} \sin (\frac{n \pi}{2}) \sin (\frac{n \pi \delta}{\ell}) \sin (\frac{n \pi c t}{\ell}) \sin (\frac{n \pi x}{\ell})$.
I know that Energy for the wave equation $u_{tt} = c^2 u_{xx}$ can be expressed as:
$E(t) = \int_{-\infty}^{\infty} (\rho u_{t}^2 + T u_{x}^2) dx$.
I don't know how to proceed from here. I am also confused as to what the nth harmonic is. My textbook doesn't really seem to define it. Thanks.
I am assuming you are looking at the Problem 10 of Chapter 5 in Strauss PDE 2nd edition.
I think you missed a factor of 2 somewhere.
So it should be $u(x,t) = \sum \frac{4 V \ell}{n^2 \pi^2 c} \sin (\frac{n \pi}{2}) \sin (\frac{n \pi \delta}{\ell}) \sin (\frac{n \pi c t}{\ell}) \sin (\frac{n \pi x}{\ell})$.
The Problem defines the energy of the nth harmonic as you wrote, where $h = h_n$ is the nth harmonic. Notice that your solution $u(x,t)$ is an infinite sum of sines and cosines. Then the nth term of this sum is the nth harmonic $h_n$.
That is, $h_n = \frac{4 V \ell}{n^2 \pi^2 c} \sin (\frac{n \pi}{2}) \sin (\frac{n \pi \delta}{\ell}) \sin (\frac{n \pi c t}{\ell}) \sin (\frac{n \pi x}{\ell})$.
Also note that the constant $c = \sqrt{T/\rho} $.
Accordingly you can then easily find $E_n (h) = \frac{1}{2} \int_{0}^{\ell} [ \rho (\frac{\partial h}{\partial t})^2 + T (\frac{\partial h}{\partial x})^2 ] dx$ , where $h = h_n$.