I’ve always been pretty fascinated by rainbows – anyone surely has to admit that it’s truely amazing how nature can construct such a beautiful image. After many years of wondering, I finally decided to spend the evening learning about them. The problem is that when I started to watch a few videos and read a few websites, they gave information without full explanations (is there anything more infuriating?). Don’t get me wrong, the videos are great for about 90% of the information but I felt like a bit more digging was needed to fully grasp the mathematics behind them. Thus this post is for all of those people that want to learn about the formation of a rainbow but feel like explanations are missing out some of the vital steps in the process.

I would recommend that before you read this post, you watch the video that I started with. It’s made by the Open University for one of their Undergrad Maths Courses so I suspect that it may deliberately have left stuff out so that the students could investigate (if this is the case, they certainly hooked me in!).

Then pop over to this website I read after watching the video. It’s fine for a quick overview but my first question after reading it: Where did they get all of those angles from?

**Question 1: When do rainbows occur?**

Easy one: When we have cloud, rain or spraying water and UV light.

**Question 2 (considerably longer answer): How do rainbows occur?**

Rainbows occur due to a combination of refraction and reflection. Let’s start by looking at what happens when light hits a water droplet.

The light hits the water droplet, at angle of incidence (i), and is refracted towards the normal line at angle of refraction (r). Just to note, since the light is now travelling within the water droplet, which is a denser medium, it slows down. When it hits the back of the droplet, it is reflected (in fact, some of the light is reflected and some is refracted at a boundary, but I am only concerned with this particular path of the light for now). It is then refracted again upon leaving the water droplet.

It may be of some use to start by analysing the angle at which the initial light beam from the Sun is turned through when it comes back out of the water droplet.

Notice that the first step was to draw in two isosceles triangles. I could then figure out how far around I needed to take the initial beam to get out of the droplet. Using vertically opposite angles, we get the first deviation of i-r, then continuing round we end up with a fully rotated angle of:

i – r + 2π – 2r + i – r = 2π + 2i – 4r

However, this isn’t the actual rotated angle – i.e. the angle the ray has turned through. Below is a picture of how far the ray has turned through.

The deviated angle that I found was infact the one below.

Hence all I need to do is take off π radians from 2π + 2i – 4r to give **R(i,r) = π + 2i – 4r**

We now have a function for how far the light beam has been rotated round from when it enters the droplet to when it leaves. The problem is that the function has two variables in it – I’d much prefer to work with a one-variable function. Luckily, Snell’s law of refraction (a physical application of the sine rule with speeds as opposed to distances) will help us with this.

**Snell’s Law: sin (i) = n sin (r)**

where n is the refractive index of the medium, given by:

n = speed of light in first medium/speed of light in second medium.

The speed of light in air is approximately equal to the speed of light in a vacuum. The speed of light in water is about 75% of that in a vacuum. Hence, in this instance,

n ≈ 1/(3/4) = 4/3

So rearranging snell’s law with n = 4/3 gives: **r = arcsin(0.75sin(i))**

Our rotation function now only involves one variable:

**R(i) = π + 2i – 4arcsin(0.75sin(i))**

Looking at the graph of the function above, we have a stationary point at (1.04 radians, 2.41 radians) which means that when the angle of incidence (i) is 59.6 degrees, the angle of rotation (R) of the sunlight is 138.1 degrees. I wonder if this point has any significance? Indeed something interesting is happening at this point. I happen to have calculated the supplementary angle to the “critical angle” all the other websites mention but don’t show how you get. This critical angle is often stated at around 42 degrees (180 degrees – 138.1 degrees).

Why is this angle so “critical”? It seems that when light hits the water droplet creating this angle, we get a higher intensity of light than at any other angle. This is because the gradient of the curve near the stationary point is small (smaller than other points on the curve), so we have a range of values for the angle of incidence around the stationary point which give a similar rotation angle of the beam (It took me some time to realise this but I think this idea is better displayed in diagramatic form at the following video between 5 minutess 20 seconds and 6 minutes 30 seconds ).

I could go further and talk about why the colours always follow a particular pattern or how double-bows appear, or in fact why it is lighter underneath the rainbow than above it, but these are things you can find out from other sources.

Pingback: Aristotle's Theory on the Mathematics of Rainbows