For endpoint-preserving variations of a functional, the Euler-Lagrange equation isAlong an extremal, the chain rule gives . Thus when has no explicit dependence, the Beltrami identity isFor a positive speed profile, the elapsed-time integrand in Fermat principle is . Its first integral givesIntegrating each monotone-height branch yieldsReal branches require . Turning points are joined in the original graph , even though the inverse derivative is singular there.
For the inverse-height speed profile, this becomes , with . Integration gives , so the light rays are catenariesEqual endpoint heights at opposite values force , since the real hyperbolic cosine is even and strictly increases with the absolute value of its argument. The remaining endpoint condition is . One exact solution is , givingHere and account for the squared hyperbolic cosine in the time integral.
The stated endpoints also allow a second stationary ray. Set . The function decreases and then increases: its derivative has the sign of , whose derivative is . Its unique minimum occurs where , at . Since the known root lies below this minimum's location, there is exactly one further root, . Thus the two stationary catenary rays in an inverse-height speed profile also includeNo extra condition in the question selects uniquely between these rays. The minimum height is a minimum along the chosen ray, not a global travel-time assertion. Indeed, competitors descending vertically to height , crossing horizontally, and rising again have time . As this tends to , below both stationary times. Their corners can be smoothed, so Fermat principle here must be understood as stationarity rather than unrestricted global minimization.
