For endpoint-preserving variations of a functional, the Euler-Lagrange equation is
Along an extremal, the chain rule gives . Thus when has no explicit dependence, the Beltrami identity is
For a positive speed profile, the elapsed-time integrand in Fermat principle is . Its first integral gives
Integrating each monotone-height branch yields
Real 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 catenaries
Equal 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 , giving
Here 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 include
No 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.
Figure 1.
Two stationary light rays through the same endpoints in an inverse-height speed profile
. Details.