Sunday Function

Before her career took an unfortunate wrong turn, a young and talented Lindsay Lohan gave us a charming and popular comedy called Mean Girls. Time has been good to the careers of some of the others involved, Tiny Fey and Rachel McAdams perhaps most notably. But the film did something that very other movies have ever done - given us a climax explicitly involving a function of a real variable:


Lindsay's character is asked to find the limit of this function as x approaches zero. We notice that the function is not defined at zero - in the denominator, cos(0) = 1. This means we have 1 - 1 = 0 in the denominator, and division by zero is undefined. But how does the function behave in the neighborhood of that point? Maybe as x gets closer and closer to zero, f(x) gets closer and close to some particular number, while only at x = 0 exactly does f(x) fail to be defined. This sort of thing happens all the time: sin(x) / x is undefined at zero, but in the neighborhood of x = 0, sin(x) / x becomes closer and closer to 1.

The completition in the film doesn't permit graphing calculators (or Mathematica!), so she can't immediately get a pretty good idea by going what we're about to do: plot the graph of the function:


Immediately we see that aside from being undefined at x = 0, it's undefined for all x > 1. That's no shock. The function log(x) is undefined for x less than or equal to 0, so log(1-x) is going to be undefined for x greater than or equal to 1.

But what about the whole thing at x = 0? Pretty clearly the limit does not exist. From the left the function shoots off to positive infinity and from the right it shoots off to negative infinity. That's not exactly perfect evidence though, and we want a proof. As a high school calculus student, Lindsay would have probably used l'Hopital's rule, but I think a Taylor series is a little clearer. We know (because I love to go on about series here on Sunday Function) that log(1-x), sin(x), and cos(x) can all be represented as a power series since all of them are analytic at x = 0. So let's do it, leaving their derivations aside:


Really this is more than we need. In this case, as in many real-life cases, keeping only the leading order term in x is fine. Do that (don't forget that the cos is squared) and substitute into our original expression:


Which limit obviously fails to exist as x -> 0 in view of the fact that the numerator is constant. Lindsay comes to the same conclusion, and wins the competition. Not bad for a major studio film. (The definitive resource for math in fiction is, of course, MathFiction, if you're interested in more. And you should be!)

It's probably too much to ask for some group theory in the next James Bond, but you never know...

More like this

Last week we did the sinc function. Let's do it again! The function, to refresh our collective memory, is this: Now I was thinking about jumping right into some contour integration, but on actually doing it again I see that it's a little hardcore for one post so eventually when we do it we'll…
Here's sin(x). What, you don't believe me? Ok, ok, I'm leaving something out. Let's do some background before I tell you what it is. The first thing we need is the incredibly interesting and important Euler's formula. It's the key that relates the exponential and trigonometric functions. We…
A reader asked me about the hyperbolic trig functions, sinh(x) and cosh(x). What are they for, and do they have an intuitive interpretation in physics? That's a pretty good question. After all, most of the time you first meet the hyperbolic trig functions in intro calculus, where their rather odd…
"So," Herr Schrodinger says to us, "I'm looking for a function of x. It needs to be equal to the negative of its second derivative, up to a constant factor. When x is zero, the function itself should be zero. And when x equals L for some constant L greater than zero, the function also needs to…

I remember watching Mean Girls and enjoying the movie. I was also gob-smacked and slack-jawed at the use of a genuine math problem at the climax. It was a special, special moment!

So much better than the usual inane and meaningless symbol salad of Greek letters and infinities scribbled on the board. (And don't forget the square-root garnish!)

I loved her character's line (returning the US after a childhood in many different countries) when the popular kids were shocked that she liked math: "I love math because it is the same in every language"

On a related note: Girls Need Math

Ya hey! A Sunday Function, and I'm reading it on Tuesday.
They're good, Matt: keep 'em up.

All good spy movies specialise in Lie groups.
(Couldn't resist that one)

You forgot a "half" when you replaced cos with x^2 in the last equality...