Solution (source code)

= Solution

Let $y$ be a smooth constrained <minimizer>. For any smooth variation $h$ vanishing at the endpoints, use the normalized admissible curve $y_\varepsilon=(y+\varepsilon h)/\sqrt{J[y+\varepsilon h]}$. Since $J[y]=1$, differentiating at zero gives
$$
0=\left.\frac d{d\varepsilon}I[y_\varepsilon]\right|_0=2\int_0^1\left(xy'h'+\frac{k^2}x yh\right)dx-2I[y]\int_0^1xyh\,dx.
$$
In particular this holds for every compactly supported <test function> $h$ in $(0,1)$. <Integration by parts> and the <fundamental lemma of the calculus of variations> give
$$
-(xy')'+\frac{k^2}x y=I[y]xy,
$$
which is the required <Bessel differential equation> with $\boxed{\lambda=I[y]}$. The lemma used here says that a continuous function whose integral against every compactly supported smooth <test function> is zero must itself vanish. No multiplier-existence theorem is needed: the explicit normalization produces the variation directly.

The endpoint $0$ causes no divergent energy for these variations: smoothness and $y(0)=h(0)=0$ imply $y,h=O(x)$. Also $J[v]>0$ for every nonzero admissible $v$, and $v/\sqrt{J[v]}$ has unit $J$ and energy $I[v]/J[v]$. Thus minimizing $I$ with $J=1$ is equivalent to minimizing the scale-invariant <Rayleigh quotient> $I/J$. The zero function is excluded whenever this quotient is written.