Sunday, 18 November 2012

CJ Cregg and the Intermediate Value Theorem

I have started watching the West Wing all the way through, and just got to an episode entitled 'Evidence of things not seen', in which one of the subplots is CJ claiming that it is possible to balance an egg on its end only at the Equinox. The rest of the President's staff is reassuringly dismissive of this idea. CJ is the gullible one (she was shocked to discover that the Mercator projection is not the only way to draw a flat map of the Earth). However, they were wrong in thinking that this feat is never achievable (to be fair, I'm not sure if that Snopes page was written when that episode of the West Wing came out). However, that was not the bit that was interesting to me. There was another thing CJ said of which the staff was equally dismissive. She said:
There's a point on the Earth where the temperature is exactly the same as the temperature at point you'd get to if you drilled right through.
CJ was laughed at for this claim. Will Bailey's immediate response was "no there isn't". My immediate response was "that sounds eminently plausible". Perhaps that's why I have a degree in maths and Will Bailey is a fictional character with a degree in law.

Now, I'm guessing that this is also eminently plausible to the majority of people reading this, as I'm guessing the majority of people reading this also have maths degrees. However, I'm going to expand a little, and mention in passing a few other somewhat surprising facts which are true for exactly the same reason. That reason is something called the Intermediate Value Theorem.

The intermediate value theorem states that for any value between the minimum and maximum value of a continuous function, there is some point where the function takes that value (a continuous function is, basically, one that doesn't jump around - a slightly more formal definition (in fact, a very good approximation to the actual formal definition) is 'a function where small changes in the inputs result in small changes in the outputs')).

 It's one of those theorems that is insanely obvious, but mathematicians like to prove anyway (not to quite the same extent as the Jordan Curve Theorem, but still). The intuition for the theorem is very powerful. Basically, it says that if you start here, and walk to somewhere that's 100m away from here, then at some point you were exactly 50m away from here. Obvious, but powerful... Now, draw a circle around the Earth, and consider any continuous function which takes a value above zero somewhere on the circle, and a value below zero somewhere else on the circle. This function must take the value zero somewhere on the circle. 

Now to prove CJ's Antipodean Theorem, just consider the function 'the temperature here minus the temperature at the point directly opposite here on the surface of the Earth'. This is pretty obviously continuous (to a good approximation) - temperatures don't just suddenly jump as you move a few centimetres around the Earth, and it's pretty obviously higher than zero at some point on the Earth and lower than zero at some other point on the Earth (just pick any two points which are opposite each other and have *different* temperatures). QED. Note that this proves not only that there is a point somewhere on the Earth with this property, but also that there's a point *on every single great circle around the Earth* with this property.

There are several other fun real-world applications of the intermediate value theorem. For example, there's the wobbly table: if you have a well-made table, then you can always balance it somewhere on any surface, however uneven. The Ham Sandwich Theorem: If you place a piece of ham on a slice of bread, there's always one vertical cut which will divide both the ham and the bread exactly in two. There's also the Beer Glass Balance trick, which I've always thought of as vaguely related to the IVT, but never quite figured out why.

Incidentally, it's actually quite easy to balance an egg on its end - although it has nothing whatever to do with the equinox. Don't believe me? Try it.

No comments: