AB ds / V = minimum

If the medium, instead of being stationary, is drifting with the velocity v, at angle θ to the ray, we must substitute for V the modified velocity V cos ε + v cos θ; and so the function that has to be a minimum, in order to give the path of a ray in a moving medium, is

Time of journey = ∫AB ds / V(cos ε + α cos θ)

= ∫AB (V cos ε − v cos θ) / V²(1 − α²) ds = minimum

where α is the ratio v/V.

Path of Ray, and Time of Journey, through an
Irrotationally Moving Medium.

Writing a velocity-potential φ in the above equation to a ray, that is putting

v cos θ = δφ / δs,

and ignoring possible variations in the minute correction factor 1−α² between the points A and B, it becomes

Time of journey = ∫AB cos ε / (1 − α²) · ds / V − (φB − φA) / V²( 1−α²) = minimum.