Vary by with . The first variation of the functional is
The boundary term from integration by parts is zero. The fundamental lemma of the calculus of variations therefore gives . For , independently vary and with zero endpoint variations; the two Euler-Lagrange equations are
For the optical path, Fermat principle makes stationary. In cylindrical coordinates its integrand is , with . There is no explicit dependence. The Beltrami identity for several dependent variables gives
The conserved quantity is the axial component of the optical momentum of a ray. As , squaring and inverting yields
Now suppose and seek a path of radius . The angle is a cyclic coordinate, so is conserved. At fixed radius this is strictly increasing in , forcing constant. The radial Euler-Lagrange equation reduces to
Consequently the helical rays in a radially graded refractive index have
A real nonzero helix exists at such a radius when , and its helical pitch is . If , the solution is instead a straight axial light ray. Thus radial dependence permits constant-radius rays for suitable profiles; an arbitrary radial profile need not support a nonzero real helix. This qualification is necessary, for example when the refractive index increases with radius.