# A mathematical formulation of Feynman’s ‘mirage on a hot road’

In his famous Feynman Lectures on Physics, Richard Feynman provided an intuitive explanation of how a ‘mirage on a hot road’ can arise due to the bending of light rays from the sky in accordance with Fermat’s Principle (see The Feynman Lectures on Physics, Volume I, Chapter 26). Feynman wrote the following:

I was discussing this with a beginning engineering student who did not quite understand why the mirage makes it look as if the water is actually on the road. I explained this by augmenting Feynman’s Fig. 26-8 above as follows:

The bent light ray starting at point A and entering the observer’s eye at point B is interpreted by the observer as having followed a straight line path emanating from the road, as indicated in the diagram. Thus, the observer sees the image of the sky on the road surface and interprets it as a shimmering pool of water.

Having done this, the question then arose as to how one could go about constructing an explicit mathematical model of the above scenario, yielding a suitable equation for the curved light ray from A to B, a linear equation for the apparent straight line path seen by the observer, and explicit coordinates for the point on the road where the image of the sky is seen by the observer. This turned out to be an interesting exercise involving Fermat’s Principle and the Calculus of Variations and is what I want to record here.

Suppose the light ray begins at point $A = (a, b)$ at time $t_1$, and enters the observer’s eye at point $B = (-a, b)$ at time $t_2$. Fermat’s Principle (see, e.g., this Wikipedia article) says that the path followed by the light ray is such as to make the optical length functional

$S[y] = \int_A^B n ds$

stationary, where $n = c/v$ is the refractive index of the medium through which the light passes, $c$ is the speed of light in a vacuum and $v = ds/dt$ is the speed of light in the medium. This functional can be derived (up to a multiplicative constant) from the ‘Principle of Least Time’ by noting that the time taken by the light ray is

$T = \int_{t_1}^{t_2} dt = \int_{t_1}^{t_2} \frac{1}{c} \frac{c}{v} \frac{ds}{dt} dt = \int_A^B \frac{n}{c} ds = \frac{1}{c} S$

The light ray will find the path that minimises this time of travel.

To apply this setup to the mirage in Feynman’s lecture we need to model the refractive index as a function of the $y$-coordinate in my amended diagram above, which measures the height above the road. As Feynman says, light goes faster in the hot region near the road than in the cooler region higher up. Thus, since the refractive index is inversely proportional to $v$, it should be an increasing function of the height above the road $y$. To get a toy model for the scenario in Feynman’s lecture let us make the simplest possible assumption that the refractive index is a simple linear function of $y$, namely

$n(y) = \alpha + \beta y$

with $\alpha$ and $\beta$ both positive. Then since the arc-length element is

$ds = dx \sqrt{1 + y^{\prime \ 2}}$

we can write the optical length functional as

$S[y] = \int_A^B n ds = \int_{a}^{-a} dx (\alpha + \beta y)\sqrt{1 + y^{\prime \ 2}} = -\int_{-a}^{a} dx (\alpha + \beta y)\sqrt{1 + y^{\prime \ 2}}$

We find the stationary path for this functional using the Calculus of Variations. Let

$F(x, y, y^{\prime}) = (\alpha + \beta y)\sqrt{1 + y^{\prime \ 2}}$

Since this does not depend directly on $x$, the problem admits a first-integral of the form

$y^{\prime} \frac{\partial F}{\partial y^{\prime}} - F = C$

where $C$ is a constant. We have

$\frac{\partial F}{\partial y^{\prime}} = \frac{(\alpha + \beta y)y^{\prime}}{\sqrt{1 + y^{\prime \ 2}}}$

Therefore the first-integral for this problem is

$\frac{(\alpha + \beta y)y^{\prime \ 2}}{\sqrt{1 + y^{\prime \ 2}}} - (\alpha + \beta y)\sqrt{1 + y^{\prime \ 2}} = C$

Multiplying through by $\sqrt{1 + y^{\prime \ 2}}/ \alpha$, absorbing $\alpha$ into the constant term, and writing $\delta \equiv \beta/\alpha$ we get

$(1 + \delta y) y^{\prime \ 2} - (1 + \delta y)(1 + y^{\prime \ 2}) = C\sqrt{1 + y^{\prime \ 2}}$

$\iff$

$-(1 + \delta y) = C\sqrt{1 + y^{\prime \ 2}}$

$\implies$

$y^{\prime} = \frac{\pm \sqrt{(1+\delta y)^2 - C^2}}{C}$

This is a first-order differential equation for $y$ which can be solved by separation of variables. We get the integral equation

$\int \frac{dy}{\sqrt{(1+\delta y)^2 - C^2}} = \pm \int \frac{dx}{C}$

To solve the integral on the left-hand side, make the change of variable

$(1 + \delta y) = C sec \theta$

$\implies$

$\delta dy = C sec \theta \ tan \theta \ d \theta$

Then

$\int \frac{dy}{\sqrt{(1+\delta y)^2 - C^2}} = \int \frac{C sec \theta tan \theta d \theta}{\delta \sqrt{C^2 sec^2 \theta - C^2}}$

$= \frac{1}{\delta}\int tan \theta d \theta$

$= \frac{1}{\delta} ln[sec \theta] + const.$

$= \frac{1}{\delta} ln \big[\frac{(1 + \delta y)}{C}\big] + const.$

For the integral on the right-hand side of the integral equation we get

$\pm \int \frac{dx}{C} = \pm \frac{x}{C} + const.$

Therefore the integral equation reduces to

$\frac{1}{\delta} ln \big[\frac{(1 + \delta y)}{C}\big] = \pm \frac{x}{C} + const.$

$\implies$

$y = \frac{Cexp\big(\pm\frac{\delta x}{C} + const.\big) - 1}{\delta}$

This seems to represent two possible solutions for the first-integral equation, which we may write as

$y_1 = \frac{Cexp\big(\frac{\delta x}{C} + const.\big) - 1}{\delta}$

$y_2 = \frac{Cexp\big(- \big[ \frac{\delta x}{C} + const. \big] \big) - 1}{\delta}$

However, for the curved light ray in my amended diagram above we must have $y \rightarrow \infty$ as $x \rightarrow \pm \infty$. This condition is not satisfied by either of $y_1$ or $y_2$ on their own, but it is satisfied by their sum. We will therefore take the solution of the first integral equation to be

$y = \frac{y_1 + y_2}{2}$

$= \frac{C}{\delta}\bigg[\frac{exp\big(\frac{\delta x}{C} + const.\big) + exp\big(- \big[ \frac{\delta x}{C} + const. \big] \big)}{2}\bigg] - \frac{1}{\delta}$

$= \frac{C cosh\big(\frac{\delta x}{C} + const.\big) - 1}{\delta}$

Furthermore, we have $y(a) = y(-a) = b$ and therefore we require

$cosh\big(\frac{\delta a}{C} + const. \big) = cosh\big(-\frac{\delta a}{C} + const. \big)$

But

$cosh\big(\frac{\delta a}{C} + const. \big) = cosh\big(\frac{\delta a}{C}\big) \ cosh(const.) + sinh\big(\frac{\delta a}{C}\big) \ sinh(const.)$

and

$cosh\big(-\frac{\delta a}{C} + const. \big) = cosh\big(\frac{\delta a}{C}\big) \ cosh(const.) - sinh\big(\frac{\delta a}{C}\big) \ sinh(const.)$

These cannot be equal unless $sinh(const.) = 0 \implies const. = 0$. Thus, our solution for $y$ reduces to

$y = \frac{C cosh\big(\frac{\delta x}{C}\big) - 1}{\delta}$

with the constant $C$ determined in terms of $a$ and $b$ by

$b = \frac{C cosh\big(\frac{\delta a}{C}\big) - 1}{\delta}$

This is the equation of the curved path of the light ray from the sky in Feynman’s diagram. The slope of $y$ at point $B = (-a, b)$ is

$y^{\prime}(-a) = -sinh\big(\frac{\delta a}{C}\big)$

The straight line with this gradient passing through the point $B$ has equation

$y = \big(b - asinh\big(\frac{\delta a}{C}\big)\big) - sinh\big(\frac{\delta a}{C}\big)x$

This is the equation of the straight line emanating from the $x$-axis to the observer’s eye in my amended diagram above. On the $x$-axis we have $y = 0$ in the straight-line equation so

$x = \frac{b}{sinh\big(\frac{\delta a}{C}\big)} - a$

This is the point on the $x$-axis at which the observer in my amended diagram will see the mirage.