How it works: xkcd sucks at math


I'm a casual reader of Randall Munroe's xkcd web comic.  I'm partial especially to the artistic episodes.

I was reading the "How it Works" episode, reproduced here:

 How it Works

Fine, a noble sentiment (women in the hard sciences are unfairly targeted) and well executed.

As is my wont, I then went for the extra bit of juiciness to the episode by hovering over the image, and what do I find?

It's pi plus C, of course.

... OK, fine.  A good reference to an in-joke in the mathematical community.  Well done.

... except I can't stomach the idea of "π plus a constant."  It just doesn't sit right.  And there's something wrong about the equation on the board.  It's missing something... else.

The equation as it appears on the board:

 S(x^2) = pi

... and the suggested improvement:

 S(x^2) = pi + C

Yeah.  I still don't buy it.

Under the premise that the best way to spoil a good joke is to analyze it, let's see if we can figure out what our characters are trying to do with this integral, shall we?

Well, there are integrals and integrals.  There are at least three common uses of integrals:

  1. Find the antiderivative of a given function for later use.
  2. Evaluate the antiderivative at upper and lower limits and subtract to find the area under the curve.
  3. Do a contour integration to evaluate a function over a known region.

The "plus a constant" comment applies exclusively to the first use.  The function y = x2 is analytic everywhere and so is not likely to be interesting for a contour integral.  But the second use seems to be very appropriate to this "integral equals a constant" equation:

The first thing to do is find the antiderivative.  This can occasionally be very difficult, but in this case we have a textbook function which is the first recipe anyone memorizes:

 S(x^p)dx = x^(p + 1) / (p + 1) + C

The above formula holds for all p except for p = -1.   That one's a little tricky because the denominator above would be 0.  For completeness, here's the case with p = -1:

 S(1/x)dx = ln x + C

A little faith is required if you haven't seen the derivation, but it works out.  (This is as good a definition as any of ln x, FWIW.)

Indeed, the antiderivative is a whole family of functions which differ only by a constant.  But if we're going to evaluate it at certain limits, we need to (eventually) know what the limits are.  Let's call them a and b for now:

S(x^p)dx:a->b = (b^(p+1) - a^(p+1)) / (p+1)

(Note in particular that the evaluation doesn't depend on which of the family of functions we chose... C cancels out.   This is my problem with the comment.)

Setting p = 2 we still have a single equation in two unknowns (a and b).  Still need more information.

Well, let's think about it for a minute.  Many functions have "natural" points of evaluation.  For x2 this is 0.  For 1/x it's 1.   What if we set a = 0?  The natural-ness of 0 as a base point of evaluation is made clear from a graph of y = x2:


If we set p = 2 and a = 0, then the equation above reduces to the solvable problem:

 (1/3)b^3 = pi

The solution is now trivial:

b = (3 pi)^(1/3) = 2.112307-ish

So we can complete the original blackboard equation as follows:

S(x^2)dx:0->(3 pi)^(1/3) = pi

or in fuller generality as

 S(x^2)dx:a->(3 pi + a^3)^(1/3) = pi

for any a.

(I'm sticking with the a = 0 solution, myself.)

Comments (6)

  1. Lionel says:

    Wow, IE sucks at math!  ;-)

    How much better it would be to have MathML formulas instead of PNG images!

  2. Actually I wrote this using a 64-bit version of Firefox:

    Mozilla/5.0 (Windows; U; Windows NT 6.0 x64; en-US; rv:1.9a8pre) Gecko/2007090213 Minefield/3.0a8pre

    This doesn’t seem to be MathML-enabled.

    Agreed, MathML will be really cool when browsers start to support it.

  3. MS says:

    It has been a while since my last calculus homework, but this all came rushing back.  Thanks, I guess!  A little mental workout is always a good thing.

  4. oops says:

    a=0 is the only solution for the last equation.

  5. kkltwtwa says:

    Of course, the whole point of the original comment about pi plus C (which ignores all the other errors) was to bring in irony that even the commenter "sucks at math".

  6. Zero says:

    First off the integral of x^2 is not even close to pi, hence why the person writing on the blackboard sucks at math. It is really^2 . Where as the + C is there to add insult to injury. Besides that, you cant add limits of integration to an indefinite integral for fun.

Skip to main content