# [Physics] Help With Calculus of Variations

homework-and-exercisesopticsrefractionvariational-calculusvariational-principle

I've been given the problem

"Use Fermat's Principle to find the path followed by a light Ray if the index of refraction is proportional to $y^{-1}$."

Honestly I'm not too sure at all how to begin. I figured Snell's law may come into play here, but not entirely sure. I know that Fermat's Principle is that light will take the quickest path from point A to B, so I figured I should minimize some functional F. But can't seem to figure this one out.

Fermat's Principle states that light travels along the path of least time. From basic mechanics, the time for a particle to travel from a point $A$ to a point $B$ is $$t_{a\rightarrow b} = \int_{a}^{b}\frac{ds}{v}.$$ Here $ds$ is an arc length and $v$ is the velocity of particle. In general, the speed of the particle has a dependence on the path taken. I can't give you the answer but you should be able to relate the given parameters of the problem to the ones that I have provided.