Recently my wife and I saw a double rainbow, shown below.  I’m a lousy photographer, but it’s there if you look closely, along the top of the picture:


There are plenty of existing sources that describe the mathematics of rainbows: briefly, rays of sunlight (entering the figure below from the right) strike airborne droplets of water, bending due to refraction, reflecting off the inside of the droplet, and finally exiting “back” toward an observer.


The motivation for this post is to describe the calculations involved in predicting where rainbows can be seen, but focusing on generalization: with just one equation, so to speak, we can let the sunlight bounce around a while inside the water droplet, and predict all of the different “higher-order” rainbows (double, tertiary, etc.) at once.  I think this is a nice “real” problem for students of differential calculus; its solution involves little more than the chain rule and some trigonometry.


The figure above shows the basic setup, where angle \alpha \in (0, \pi/2) parameterizes the location where a ray of sunlight, entering horizontally from the right, strikes the surface of the spherical droplet.  The angle \beta is the corresponding normal angle of refraction, related by Snell’s law:

n = \frac{n_{water}}{n_{air}} = \frac{\sin \alpha}{\sin \beta}

where n_{air}=1.00029 and n_{water}=1.333 are the indices of refraction for air and water, respectively.  (Let’s defer for the moment the problem that these indices actually vary slightly with wavelength.)

As a function of \alpha, at what angle does the light ray exit the picture?  Starting with the angle \alpha shown in the center of the droplet, and “reflecting around” the center counterclockwise– and including the final additional refraction upon exiting the droplet– the desired angle \theta is

\theta(\alpha) = \alpha + (k+1)(\pi - 2\beta) + \alpha

where– and this is the generalization– the integer k indicates how many times we want the ray to reflect inside the droplet (k=1 in the figure above).  The figure below shows how this exit angle \theta varies with \alpha, for various numbers of internal reflections.


The key observation is that for k>0, there is a critical minimum exit angle, in the neighborhood of which there is a concentration of light rays.  We can find this critical angle by minimizing \theta as a function of \alpha.  (Note that there is no critical angle when k=0, and so a rainbow requires at least one reflection inside the droplets.)

At this point, we have a fairly straightforward, if somewhat tedious, calculus problem: find \theta where \theta'(\alpha)=0.  It’s an exercise for the reader to show that this occurs at:

\alpha = \cos^{-1}\sqrt{\frac{n^2-1}{k(k+2)}}

\theta = 2\alpha + (k+1)(\pi - 2\beta)

Evaluating at k=1 yields an angle \theta of about 318 degrees.  This requires some interpretation: imagine a line between you and the Sun.  Then standing with the Sun behind you, a primary rainbow is visible along a cone making an angle of about 360-318=42 degrees with this line.

(Coming back now to the dependence of index of refraction on wavelength: although the variation is negligible for air, the index of refraction for water varies from about 1.33 for red light to about 1.34 for violet light, so that the rainbow is not just a band of brighter light, but a spread of colors from about 41.1 to 42.5 degrees… with the red light on the outside of the band.)

For k=2, the critical \theta is about 411 degrees, corresponding to a viewing angle of about 51 degrees… with two differences: first, the additional internal reflection means that the light strikes the bottom half of each droplet, making a complete “loop” around the inside of the droplet before exiting toward the observer.  Second, this opposite direction of reflection means that the bands of colors are reversed, with red on the inside of the band.

Finally, the angle for k=3 is about 498 degrees: such a tertiary rainbow may be seen facing the Sun (good luck with that), in a sort of “corona” around it at an angle of about 42 degrees.



This entry was posted in Uncategorized. Bookmark the permalink.

3 Responses to Rainbows

  1. Very clever. I had thought about this method myself. Are you aware whether someone published this result before?

  2. Pete says:

    Enjoyed reading that thanks. It might be of interest to my A-Level physics students. One observation I’ve made with rainbows – it might bean illusion – is the apparent difference in brightness of the sky either side of a rainbow. In your image, the lower sky appears brighter than the sky above the rainbow.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.