Solution (source code)

= Solution

By <Fermat principle>, a <light ray> makes optical travel time stationary. Multiplication by the constant vacuum <speed of light> does not change the stationary paths, so the functional can be taken to be the <refractive index> integrated over <arc length>. The constant denoted $c$ below is an integration constant, not that vacuum speed.