Fermat's principle of optics states that the path of a light ray connecting two points will be such that the travel time is a minimum. If the speed of light varies continuously in a medium and is a function of the distance from the boundary , show that the path of a light ray is given by the solution to
where , etc. Show that the path of a light ray in a medium where the speed of light is a constant is a straight line. Also find the path from to if , and sketch it.