Relation between self-adjointness and variational principle and Rayleigh's principle 
*

*In mathematical physics, why is it that when an eigen-equation is described by a self-adjoint operator we say that it can be written (formulated) as a variational action (or principle)?


*Does the Rayleigh quotient concept apply to any system that can be described by a self-adjoint operator?


*In practice, when we have a system that is described by, for example, the homogeneous Helmholtz equation [say, $\nabla^2 f(x,y)+k^{2} f(x,y)=0$], one can think in terms of the Rayleigh quotient stationarity to find the eigenvalues. But if the system is driven [say, $\nabla^2 f(x,y)+k^{2} f(x,y)=g(x,y)$] and the wave equation is no longer homogeneous, can we still work in terms of the Rayleigh quotient in general for any choice of $g(x,y)$?
Reference: e.g. see ch. 19 p. 974 + p. 980-981 here.
 A: *

*Firstly, Ref. 1 is talking$^1$ about the stationary action principle with Lagrangian
$$\begin{align}L[\xi]~=~&T[\xi]-W[\xi], \cr 
T[\xi]~=~&\int d^3x~\rho\langle \dot{\xi} | \dot{\xi} \rangle, \cr
W[\xi] ~=~& -\int d^3x~ \langle \xi |\hat{F} | \xi \rangle, \end{align}  $$
where $\hat{F}$ is a self-adjoint linear operator.
The Euler-Lagrange (EL) equations look like Newton's 2nd law for (possibly infinitely many) coupled harmonic oscillators
$$ \rho | \ddot{\xi} \rangle~=~\hat{F} | \xi \rangle ,$$


*Secondly, Ref. 1 is talking about applying the variational method to the Rayleigh quotient
$$\frac{W[\xi]}{\langle \xi | \xi \rangle}.$$
Here $\hat{F}$ is a self-adjoint linear operator bounded from above with a discrete spectrum, where eigenspaces are finite-dimensional. (More generally, $\hat{F}$ is allowed to have a continuous spectrum or infinite-dimensional eigenspaces below a certain value, but then the variational method is not guaranteed to work below this value.)


*The second method in its current form only works for homogeneous problems.
References:

*

*K.S. Thorne & R.D. Blandford, Modern Classical Physics: Optics, Fluids, Plasmas, Elasticity, Relativity, & Statistical Physics, 2017;  p. 974 + p. 980-981.

--
$^1$ Strictly speaking, Ref. 1 talks about a real version of this.
A: An answer to 1 and 2
A variational principle can be formulated for any compact self-adjoint operator. This is a direct result from the spectral theory of these operators. To see this consider the eigenvalue problem: $K\psi = E\psi$ where $K$ is a compact self-adjoint operator on some Hilbert space $H$. Let $\{\psi_i\}_i$ represent the eigenfunctions of $K$. From the spectral theory of compact self-adjoint operators, we know that $\{\psi_i\}_i$ is a basis for $H$. That is, any element in $H$ is in the linear span of $\{\psi_i\}_i$.
To arrive at Rayleigh quotient consider $\phi^\alpha \in H$ to be a parametrisable function using the parameter $\alpha$. Expand this function using the basis $\{\psi_i\}_i$:
$$
\phi^\alpha = \sum_i c_i \psi_i 
$$
If you plug in the last formula in the eigenvalue problem and take the inner-product with $\phi^\alpha$ you will arrive the following result (for full derivation see here):
$$
E_0 \leq \frac{\langle \phi^\alpha , K\phi^\alpha\rangle}{\langle \phi^\alpha , \phi^\alpha \rangle}
$$
which is the Rayleigh quotient and $E_0$ here denotes the smallest eigenvalue of $K$. The last equation tells us that we can approximate the smallest eigenvalue of $K$ by choosing $\alpha$ as to minimise the Rayleigh quotient.
