How do we get the equation for the path of a light ray in a medium of varying refractive index.
I can draw a rough sketch, but don't know how do we get the exact curve.
I encountered this while doing a problem:
A ray of light travelling in air makes a grazing incidence on a rectangular slab of transparent medium with one vertex at the origin & (sides along x and y axes.)
The refractive index of the material varies as $N=2x$. The path of the light ray is given by?
(The ray makes a grazing incidence nearly parallel to x axis from -ve to +ve x axis but just enough to enter the first quadrant; where the slab lies.)