Using the variational formulation of the Fermat principle and exploiting it
s analogy with the Hamilton principle of mechanics, we introduce an optical
Lagrangian to show that the Euler-Lagrange equations result in the ray equ
ation of optics. For a medium with refractive index given by n(2)(r) = C 2k/r we show that there exists an additional conservation law as in the Kep
ler problem of mechanics giving the Laplace-Runge-Lenz vector. We consider
its two applications: (a) bending of a light ray near a massive star and (b
) its bending in a nonmagnetized thermal plasma. (C) 2001 American Associat
ion of Physics Teachers.