Saturday, September 25, 2010

Mirages

I'm sure you've seen something like this before.  It looks like there's water on the road, but there's not. It's a mirage.  Why does this happen?  I never knew why until I read Perfect Form, the book I talked about in my last post.

Before I can explain mirages, I need to explain something that French mathematician Pierre de Fermat proposed in 1662 called the Principle of Least Time.  (Actually, Fermat was a lawyer by trade, and just did math on the side.  But these days, people remember him mainly for his math.)

The Principle of Least Time is pretty simple, actually.  All it says is that light takes the fastest path to get from point A to point B.  Now, it turns out that light goes faster through hot air than cold air.  (Why that is, we'll leave for another day.)  In the picture above, the hot asphalt is heating the air above the road.  So the closer a beam of light is to the road, the faster it will be able to reach your eye.  In other words, a beam of light will naturally want to "hug the road".  The diagram above shows a similar situation where the hot desert sand is heating the air above.

(As an aside, you might wonder how a beam of light "knows" the fastest path.  To determine its path, doesn't it need to know its destination?  Is there a higher Intelligence at work?  These are questions for another post.)

So let's take another look at that photo of the road mirage.  Imagine you are there, looking at the car on the left.  What does it mean to "look at" the car?  It means a beam of light is traveling from point A (the car) to point B (your eye).  What path will that beam of light take?  Well, it might go in a straight line, but then it would be wasting a lot of time traveling through cooler air.  Remember, light can travel faster close to the hot road.  So wouldn't it take less time overall if the beam of light first moved itself down close to the road, then traveled low to the road for most of the distance, and then at the end bent upward to meet your eye?  That's exactly what happens, as illustrated (way out of scale) by the diagram above of the guy in the desert.  See, when the light bends upward to your eye, your eye doesn't know what kind of convoluted path it took.  Your brain just processes the beam of light as if it went in a straight line all along.  So, looking at the photo again, your eye sees an image of the car below where it really is.  It looks like it's reflected in the road.  The road must be wet!  That's the mirage.

Now, I could stop right here, and hopefully it would all sort of make sense.  And yet we've done no math.  That's the thing about math.  Sometimes, you can get the gist of an interesting fact about the world we live in without any math at all.  If you wanted to explain to your curious child why mirages happen, the non-mathematical explanation above would probably get you as far as you need to go.  But if your job was to determine the exact distance from the viewer of the fake car reflection, given precise assumptions about the temperature gradient with altitude, then you'd need to find yourself some math.

Enter the calculus of variations, the subject of Perfect Form.  To understand this part of my post, you need some appreciation of plain old high school calculus.  You might remember from your calculus class that a lot of the problems went something like this.  Given some function f(x), find the point where it reaches a minimum or maximum value.  To do this, you first figure out the derivative f'(x) of f(x) and then find the values of x that make f'(x) = 0.  The example above shows a curving function with two points where its derivative is 0 (flat).  In this example, the function reaches a minimum when x = -6.

To solve our mirage problem, we need something like this.  Just like the high school calculus problem above, we're looking for a minimum.  We need to find the path from point A (distant car) to point B (eye) that minimizes the time it takes light to travel from point A to point B.  The key difference here is that we need to find a path that minimizes a value (time, in this case), not a number that minimizes a value.  How can we do this?  Take the derivative over paths instead of over numbers?  In a sense, yes.  But what does this mean?  And whatever it means, how can it be done when we don't even know what the shape of the path looks like?  (Is it a polynomial?  Is it sinusoidal?  Something else?  We can't assume.)  That is the calculus of variations.  The diagram above gives some intuition about it.  The minimum path is shown in red, and the green paths differ from the red path by a delta function v(x) -- rather than a delta number as in regular calculus.

The calculus of variations is quite elegant and quite powerful, and I'm really glad I took the week to read Perfect Form.  Once you understand the techniques in that book, not only will you be able to "do the math" on the mirage problem, but you will feel the power of having the keys to a much larger kingdom.  For example, did you know that under certain initial conditions, the path of light through a fiber optic cable is a series of alternating half-circles?  This is shown pictorially on the cover of Perfect Form.  If you have some basic appreciation for differential equations and a basic knowledge of first-year physics, you should be able to get a lot out of the book.

By the way, the road mirage is called an inferior mirage because the light bends up to the eye from below, making the mirage appear below the true object.  There is also the possibility of a superior mirage when the temperature gradient is reversed -- when the hot air is higher than the cold air.  This often happens over water.  Whereas hot asphalt or hot sand warms the air near the ground, water often cools the air close to it.  This can produce some wacky effects, hinted at in the diagram above.  Boats or even whole cities can float upside down in the air.

Here is a picture of this effect in action -- a large ship that appears reflected in the sky. With superior mirages, it's also sometimes possible to see over the horizon -- a reflected image of something that's already disappeared beyond the curvature of the earth. Our understanding of these phenomena traces back to Fermat in 1662.

1 comment:

  1. Nice post. Have you looked at Structure and Interpretation of Classical Mechanics?

    ReplyDelete