Variational problem for strings I'm working through Zwiebach's String theory book by myself and I'm having trouble starting problem 4.7. For those that do not have a copy, I'll paraphrase the question:
A string is stretched from $x=0$ to $x=a$ and has tension $T_0$, mass density $\mu(x)$. The string is fixed at its endpoints and vibrates in the $y$ direction. The equation $$\frac{d^2y}{dx^2} + \frac{\mu(x)}{T_0}\omega^2y(x) = 0$$
determines the oscillation frequencies $\omega_i$ and the associated $\psi_i(x)$.
Now, the question asks to set up a variational procedure that gives an upper bound on the lowest frequency, $\omega_0$. I don't understand how this can be done. I thought about minimizing the action of the string but I don't see how to do this, and now that I think about it I'm not sure this is the correct path either. Any hints would be greatly appreciated.
 A: The general idea of a variational principle is that if you have some self-adjoint operator $H$ and any arbitrary state $\phi$, then $\phi$ can be expanded in terms of the (normalized) eigenvalues $\psi_n$ of $H$:
$$\phi = \sum_{n=0}^\infty c_n \psi_n$$
It follows immediately that
$$\langle \phi,H\phi\rangle  = \sum_{n=0}^\infty \lambda_n |c_n|^2 \geq \lambda_0 \langle\phi,\phi\rangle$$
Therefore, what one does is to take an educated guess $\phi_0$ at the form of the ground state with some free parameters $\beta_i$ and minimize $\langle \phi_0,H\phi_0\rangle/\langle\phi,\phi\rangle$ with respect to them.  The resulting minimal value is guaranteed to be an upper bound on $\lambda_0$.

In this case, the eigenvalue equation for the frequencies $\omega_n$ is
$$-\frac{T_0}{\mu(x)} \frac{d^2}{dx^2} \psi_n = \omega_n^2 \psi_n$$
and so the self-adjoint operator of interest is $H := -\frac{T_0}{\mu(x)}\frac{d^2}{dx^2}$, which is self-adjoint with respect to the weighted inner product
$$\langle \psi,\phi\rangle := \int_0^a \psi^*(x)\phi(x) \mu(x) \ dx$$
Once you write down mass density $\mu(x)$, you'll be able to guess at the ground state.

For example, consider the case where $\mu(x)=\mu_0$, a constant.  Suspecting that the ground state is nice and symmetric about $x=a/2$, we could propose the test state
$$\phi_0(x)= x(a-x)$$
One finds
$$\langle\phi_0,\phi_0\rangle = \int_0^a \mu_0(a^2x^2 + x^4 - 2ax^3)dx = \mu_0a^5/30$$
$$H\phi_0=-\frac{T_0}{\mu_0}(-2) = 2\frac{T_0}{\mu_0}$$
$$\langle\phi_0,H\phi_0\rangle = 2\frac{T_0}{\mu_0}\int_0^a \mu_0(ax - x^2)dx = \frac{T_0a^3}{3}$$
and so therefore
$$\omega_0^2 \leq \frac{\langle \phi_0,H\phi_0\rangle}{\langle\phi_0,\phi_0\rangle} = \frac{T_0 a^3}{3}\frac{30}{a^5\mu_0}=\frac{10T_0}{a^2\mu_0}$$
There are no free parameters here with respect to which we could minimize.  The actual ground state can be easily seen to have eigenvalue $$\omega_0^2 = \frac{\pi^2 T_0}{a^2\mu_0}$$
so our guess was quite good; introducing tunable parameters (e.g. postulating $x^\beta(a^\beta-x^\beta)$ would make our "trial eigenvalue" a function of $\beta$, and minimizing it with respect to $\beta$ would give us an even tighter upper limit.
