For a nonzero real function, write with . Multiplying the Sturm-Liouville equation by and integrating gives
Thus the stated vanishing boundary product proves .
For the variational statement, the first variation is
With admissible boundary conditions that also make for every allowed variation, the fundamental lemma of the calculus of variations identifies stationary functions with the eigenfunctions and stationary values with their eigenvalues. Zero Dirichlet boundary conditions, zero Neumann boundary conditions, and matched periodic data give familiar examples. The single printed condition proves the quotient identity but, by itself, does not specify the admissible variations needed for stationarity; the boundary conditions for variational Rayleigh quotients make this distinction explicit.
For the half-line equation, multiplication by gives and . Use the regular radial boundary condition at zero and square-integrable decay at infinity, under which the proposed Gaussian is admissible. With , , , so
The ratio of the two Gaussian integrals is , from a change of variables and the Gamma function recurrence. Differentiating gives , so the minimum on occurs at . The Gaussian variational bound for a radial harmonic oscillator therefore gives
Here the trial actually satisfies the differential equation with . Moreover, on the same regular decaying domain, integration by parts gives . Hence the estimate is exact, with . For , regular radial data mean the Neumann boundary condition ; imposing a zero Dirichlet boundary condition there would exclude this trial and give a different problem.