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:

i-d4bb9fe09d6b78eb832985821d8a307f-1.png

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:

i-7b7142f1efa09b47c3b8242f89bcb9f4-graph.png

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:

i-88516ca505d84f969b7ab15a965c3fb3-2.png
i-d18063683dcc0d42b9be45451a84d1e3-3.png
i-8d7070ce28f0af28047c7a5fb8246d53-4.png

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:

i-80f9713f6d11461837a9f9b540684e36-6.png

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

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...