Originally Posted by

**simplependulum** If there is a density function or refractive index function $\displaystyle N(y)$(continous) , can i find out the path of the light just solving Euler's equation

$\displaystyle F_{y} - \frac{d}{dx}( F_{y'}) = 0 $ ?

where $\displaystyle \int_0^a F(y,y') dx $ is defined as the total time for the light travelling from O to (a , y(a))

$\displaystyle v(y) = \frac{ v_0 N_0 }{N(y)} = \frac{ds}{dt} = \frac{\sqrt{1+(y')^2} dx}{dt} $

$\displaystyle Total~Time = \int_0^{t(a)} dt = \int_0^a \frac{ \sqrt{1+(y')^2} N(y) }{ N_0 v_0} dx$

$\displaystyle F = \frac{ \sqrt{1+(y')^2} N(y) }{ N_0}{v_0} $

Since F is independent of x the equation leads to another equation :

$\displaystyle F - y' F_{y'} = C_1 $

then

$\displaystyle \frac{N(y)}{\sqrt{1+(y')^2}} = C_1 v_0 N_0 $