The Unapologetic Mathematician

Mathematics for the interested outsider

Football probabilities

Last night someone was asking me a question about the football wild-card race. Since it’s the other Dr. Armstrong who does sadisticsstatistics, I punted (sorry) it over to someone who’d give a surer answer.

Generally it goes like I’d expected, but sure enough, Isabel came up with a really slick proof, and also realized why that guy even asked me the question.

December 31, 2007 Posted by John Armstrong | Uncategorized | | 2 Comments

Sunday Samples 49

Well, despite being scoopedon this, I’m going to help out Scott Carter’s own shameless self-promotion with some shameless other-promotion. That intro having covered both Leibnizean monads…

Not content with being a great mathematician and quite the host, Scott has also been known to pluck a guitar string or six in his day. And despite being able to actually play a guitar, he’s not half bad at Guitar Hero, as we found out back at Knots In Washington about a year or so ago.

And now you can hear his musical stylings on the intarwebs, with “The Quantum Gravity Topological Quantum Field Theory Blues”
Read more »

December 30, 2007 Posted by John Armstrong | Sunday Samples | | No Comments

The Geometric Meaning of the Derivative

Now we know what the derivative of a function is, and we have some tools to help us calculate them. But what does the derivative mean. Here’s a picture:

tangent_line.gif

In green I’ve drawn a function f(x) defined on (at least) the interval (0,4) of real numbers between {0} and 4. The specifics of the function don’t matter. In fact having a formula around to fall back on would be detrimental to understanding what’s going on.

In red I’ve drawn the line with equation y=g(x)=f(2)+f'(2)(x-2). This describes a function with two very important properties. First, when x=2 we get g(2)=f(2), so the two functions take the same value there. Second, the derivative g'(x)=f'(2) everywhere, and in particular g'(2)=f'(2). That is, not only do both graphs pass through the same point above x=2, they’re pointing in the same direction. As they pass through the point, the line “touches” the graph of f, and we call it the “tangent” line after the Latin tangere: “to touch”.

So the derivative f'(x_0) seems to describe the direction of the tangent line to the graph of f at the point x_0. Indeed, if we change our input by adding \Delta x, the tangent line predicts a change in output of f'(x_0)\Delta x. Remember, it’s this simple relation between changes in input and changes in output that makes lines lines. But the graph of the function is not its tangent line, and the function f is not the same as the function g defined by g(x)=f(x_0)+f'(x_0)(x-x_0). How do they differ?

Well, we can subtract them. At x_0, we get a difference of {0} because of how we define the function g, so let’s push away to the point x_0+\Delta x. There we find a difference of f(x_0+\Delta x)-f(x_0)-f'(x_0)\Delta x. But we saw this already in the lead-up to the chain rule! This is the function \epsilon(\Delta x)\Delta x, where \lim\limits_{\Delta x\rightarrow0}\epsilon(\Delta x)=0. That is, not only does the difference go to zero — the line and the graph pass through the same point — but it goes fast enough that the difference divided by \Delta x still goes to zero — the line and the graph point in the same direction.

Let’s try to understand why the tangent line works like this. It’s pretty difficult to draw a tangent line, except in some simple geometric circumstances. So how can we get ahold of it? Well instead of trying to draw a line that touches the graph at that point, let’s imagine drawing one that cuts through at x=x_0, and also at the nearby point x=x_0+\Delta x. We’ll call it the “secant” line after the Latin secare: “to cut”. Now along this line we changed our input by \Delta x and changed our output by f(x_0+\Delta x)-f(x_0). That is, the relationship between inputs and outputs along this secant line is just the difference quotient \frac{\Delta f}{\Delta x}!

We know that the derivative f'(x_0) is the limit of the difference quotient as \Delta x goes to {0}. In the same way, the tangent line is the limit of the secant lines as we pick our second point closer and closer to x_0 — as long as our function is well-behaved. It might happen that the secants don’t approach any one tangent line, in which case our function is not differentiable at that point. In fact, that’s exactly what it means for a function to fail to be differentiable.

So in terms of the graph of a function, the derivative of a function at a point describes the tangent line to the graph of the function through that point. In particular, it gives us the “slope” — the constant relationship between inputs and outputs along the line.

December 28, 2007 Posted by John Armstrong | Analysis, Calculus | | 1 Comment

The Chain Rule

Today we get another rule for manipulating derivatives. Along the way we’ll see another way of viewing the definition of the derivative which will come in handy in the future.

Okay, we defined the derivative of the function f at the point x as the limit of the difference quotient:
\displaystyle f'(x)=\lim\limits_{\Delta x\rightarrow0}\frac{f(x+\Delta x)-f(x)}{\Delta x}
The point of the derivative-as-limit-of-difference-quotient is that if we adjust our input by \Delta x, we adjust our output “to first order” by f'(x)\Delta x. That is, the the change in output is roughly the change in input times the derivative, and we have a good idea of how to control the error:
\displaystyle\left(f(x+\Delta x)-f(x)\right)-f'(x)\Delta x=\epsilon(\Delta x)\Delta x
where \epsilon is a function of \Delta x satisfying \lim\limits_{\Delta x\rightarrow0}\epsilon(\Delta x)=0. This means the difference between the actual change in output and the change predicted by the derivative not only goes to zero as we look closer and closer to x, but it goes to zero fast enough that we can divide it by \Delta x and still it goes to zero. (Does that make sense?)

Okay, so now we can use this viewpoint on the derivative to look at what happens when we follow one function by another. We want to consider the composite function f\circ g at the point x_0 where f is differentiable. We’re also going to assume that g is differentiable at the point f(x_0). The differentiability of f at x_0 tells us that
\displaystyle\left(f(x_0+\Delta x)-f(x_0)\right)=f'(x_0)\Delta x+\epsilon(\Delta x)\Delta x
and the differentiability of g at y_0 tells us that
\displaystyle\left(g(y_0+\Delta y)-g(y_0)\right)=g'(y_0)\Delta y+\eta(\Delta y)\Delta y
where \lim\limits_{\Delta x\rightarrow0}\epsilon(\Delta(x)=0, and similarly for \eta. Now when we compose the functions f and g we set y_0=f(x_0), and \Delta y is exactly the value described in the first line! That is,
\displaystyle \left[f\circ g\right](x_0+\Delta x)-\left[f\circ g\right](x_0)=g(f(x_0)+f'(x_0)\Delta x+\epsilon(\Delta x))-g(f(x_0))=
\displaystyle g'(f(x_0))\left(f'(x_0)\Delta x+\epsilon(\Delta x)\Delta x\right)+\eta(\Delta y)\left(f'(x_0)\Delta x+\epsilon(\Delta x)\Delta x\right)=
\displaystyle g'(f(x_0))f'(x_0)\Delta x+\left(g'(f(x_0))\epsilon(\Delta x)+\eta(\Delta y)\left(f'(x_0)+\epsilon(\Delta x)\right)\right)\Delta x

The last quantity in parentheses which we multiply by \Delta x goes to zero as \Delta x does. First, \epsilon(\Delta x) does by assumption. Then as \Delta x goes to zero, so does \Delta y, since f must be continuous. Thus \eta(\Delta y) must go to zero, and the whole quantity is then zero in the limit. This establishes that not only is f\circ g differentiable at x_0, but that its derivative there is
\displaystyle\left[f\circ g\right]'(x_0)=\frac{d}{dx}g(f(x))\bigg|_{x=x_0}=g'(f(x_0))f'(x_0)
This means that since “to first order” we get the change in the output of f by multiplying the change in its input by f'(x_0), and “to first order” we get the change in the output of g by multiplying the change in its input by g'(y_0), we get the change in the output of their composite by multiplying first by f'(x_0) and then by g'(y_0)=g'(f(x_0)).

Another way we often write the chain rule is by setting y=f(x) and z=g(y). Then the derivative f'(x) is written \frac{dy}{dx}, while g'(y) is written \frac{dz}{dy}. The chain rule then says:
\displaystyle \frac{dz}{dx}=\frac{dz}{dy}\frac{dy}{dx}
This is nice since it looks like we’re multiplying fractions. The drawback is that we have to remember in our heads where to evaluate each derivative.

Now we can take this rule and use it to find the derivative of the inverse of an invertible function f. More specifically, if a function f is one-to-one in some neighborhood of a point x_0, we can find another function f^{-1} whose domain is the set of values f takes — the range of f — and so that f(f^{-1}(x))=x=f^{-1}(f(x)). Then if the function is differentiable at x_0 and the derivative f'(x_0) is not zero, the inverse function will be differentiable, with a derivative we will calculate.

First we set y=f(x) and x=f^{-1}(y). Then we take the derivative of the defining equation of the inverse to get \frac{df^{-1}}{dy}\frac{df}{dx}=1, which we could write even more suggestively as \frac{dx}{dy}\frac{dy}{dx}=1. That is, the derivative of the composition inverse of our function is the multiplicative inverse of the derivative. But as we noted above, we have to remember where to evaluate everything. So let’s do it again in the other notation.

Since f^{-1}(f(x))=x, we differentiate to find \left[f^{-1}\right]'(f(x))f'(x)=1. Then we substitute x=f^{-1}(y) and juggle some algebra to write
\displaystyle\left[f^{-1}\right]'(y)=\frac{1}{f'(f^{-1}(y))}

December 27, 2007 Posted by John Armstrong | Analysis, Calculus | | 40 Comments

It’s Oprah’s Fault

Someone in my parents’ house (the guilty party’s identity will not be revealed) turned on Oprah this afternoon. They had a sort of guest episode of Deal or No Deal. I only caught the last decision. There were two cases left, one with $5,000 and one with $75,000, and the offer on the table was $50,000. This is such a simple expected value problem that even Oprah could do it.

Half of the cases had $5,000, and half had $75,000, so the expected value for turning down the deal was half of $80,000: $40,000. This is $10,000 less than the deal value. Surely she’d take the deal, giving some random audience-member an assured $50,000.

Instead she took the bet, and lost. Sure she knew that Hershey’s was going to give whoever won the full $100,000 no matter what, but still. This woman is a role model that people look up to, and she’s setting a bad example. No wonder American kids perform so poorly on path tests. It’s all Oprah’s fault.

December 26, 2007 Posted by John Armstrong | Uncategorized | | 4 Comments

Algebraic Laws of Differentiation

Just like we had the laws of limits we have a collection of rules to help us calculate derivatives. Let’s start with the most basic functions.

As we said while defining the derivative, any linear function f(x)=ax+b has the derivative f'(x)=a at each point. We’ll separate this out into two rules:

  • \displaystyle\frac{d}{dx}c=0
  • \displaystyle\frac{d}{dx}x=1

That is, the derivative of any constant function is the constant function {0}, and the derivative of the identity function is the constant function 1.

The next two rules should be perfectly straightforward to establish, so we’ll skip their proofs:

  • \displaystyle\frac{d}{dx}\left(f(x)+g(x)\right)=f'(x)+g'(x)
  • \displaystyle\frac{d}{dx}\left(cf(x)\right)=cf'(x)

That is, the derivative of the sum of two functions is the sum of their derivatives, and the derivative of a constant multiple of a function is the same constant multiple of its derivative. In particular, we can use these rules along with the basic pieces above to recalculate the derivative \frac{d}{dx}(ax+b)=\frac{d}{dx}(ax)+\frac{d}{dx}b=a\frac{d}{dx}(x)+b\frac{d}{dx}(1)=1a+0b=a.

Multiplication is a bit tougher. We might hope to simply split derivatives along products like we do for limits, and even the inventors of the calculus originally thought this would work. But look what happens for f(x)=x^2. If we split the derivative of this function along its product we get \frac{dx}{dx}\frac{dx}{dx}=1. But we know that this function doesn’t always go up at this constant rate. In fact, for negative values of x, the function actually goes down. So this rule doesn’t work.

Let’s go back to the definition of the derivative as the limit of a difference quotient:
\displaystyle\lim\limits_{\Delta x\rightarrow0}\frac{\left[fg\right](x+\Delta x)-\left[fg\right](x)}{\Delta x}=\lim\limits_{\Delta x\rightarrow0}\frac{f(x+\Delta x)g(x+\Delta x)-f(x)g(x)}{\Delta x}
Now the trick we’ll use to evaluate this limit is to add and subtract f(x+\Delta x)g(x) to the numerator here. That is, in effect we’re adding zero and leaving it alone, but the formula will be easier to work with. In particular, we can start splitting it up using the laws of limits.
\displaystyle\lim\limits_{\Delta x\rightarrow0}\frac{f(x+\Delta x)g(x+\Delta x)-f(x+\Delta x)g(x)+f(x+\Delta x)g(x)-f(x)g(x)}{\Delta x}=
\displaystyle\left(\lim\limits_{\Delta x\rightarrow0}f(x+\Delta x)\right)\left(\lim\limits_{\Delta x\rightarrow0}\frac{g(x+\Delta x)-g(x)}{\Delta x}\right)+\left(\lim\limits_{\Delta x\rightarrow0}\frac{f(x+\Delta x)-f(x)}{\Delta x}\right)\left(\lim\limits_{\Delta x\rightarrow0}g(x)\right)
Of these four limits, the fourth is the limit of a continuous function because g(x) doesn’t depend on \Delta x. The second and third are just the definitions of f'(x) and g'(x). The first limit goes to f(x) because, as we showed, all differentiable functions are continuous. And so we have the rule

  • \displaystyle\frac{d}{dx}\left(f(x)g(x)\right)=f'(x)g(x)+f(x)g'(x)

In general, we can take the derivative of the product of a bunch of functions by taking the derivative of each one and multiplying by the other functions, then adding up all the results. As a special case we get the “power rule”:

  • \displaystyle\frac{d}{dx}x^n=nx^{n-1}

If f(x) is differentiable at x_0, but doesn’t take the value {0} there, then its reciprocal will also be differentiable. We want to calculate its derivative. We could try evaluating the limit of the difference quotient again, but instead we will proceed as follows. Define the reciprocal to be g(x)=\frac{1}{f(x)}. Then we have the equation f(x)g(x)=1. Taking the derivative of both sides at x_0 and using the product rule we find f'(x_0)g(x_0)+f(x_0)g'(x_0)=0. We can now solve this to find g'(x_0)=-\frac{f'(x_0)g(x_0)}{f(x_0)}, or:

  • \displaystyle\frac{d}{dx}\frac{1}{f(x)}=\frac{-f'(x)}{f(x)^2}

Combining this with the product rule we find the “quotient rule”:

  • \displaystyle\frac{d}{dx}\frac{f(x)}{g(x)}=\frac{f'(x)g(x)-f(x)g'(x)}{g(x)^2}

Now we have all the tools in hand to take the derivative of any “rational” function. That is, a function of the form f(x)=\frac{P(x)}{Q(x)}, where P and Q are polynomials. We can take the derivative of any polynomial by using the power rule, constant multiple rule, and addition rule. Then we can take the derivative of f with the quotient rule.

A little anecdote about the quotient rule: often it’s written in the form d(uv)=\frac{vdu-udv}{v^2}. My first calculus teacher wrote this formula on the board, then noted that one must remember which order the top comes in or you’ll get the wrong sign. “V-D-U-D”. At this point he fake-tiptoed his way to the door, closed it gently, and in a loud stage whisper said, “Venereal Disease is an Ugly Disease”. To this day I can’t teach the quotient rule, and can barely use it myself, without remembering that line.

December 26, 2007 Posted by John Armstrong | Analysis, Calculus | | 5 Comments

Christmas Story

My personal favorite of all the stories set at Christmastime has to be James Joyce’s The Dead (also available with notes). The movie is also excellent, and someone’s thinking about producing a DVD, if there’s enough interest. Yes, technically it’s set on the Epiphany, but I don’t really want to make a mathematical post today, so you get it now. Besides, unless you’re a Joyce fan or a turn-of-the-(last)-century historian you would likely not notice.

I love the language, as I do in all of Joyce’s works. The fine details describe an Epiphany party from 1904 so thoroughly that you could easily see yourself there, but without feeling overloaded with facts like in a work of Don DeLillo or David Foster Wallace. The closing paragraph is one of the most starkly beautiful, evocative passages in the English corpus:
Read more »

December 25, 2007 Posted by John Armstrong | Uncategorized | | 1 Comment

Merry Christmas from John Baez

As he commented before, John Baez has presents for all the good graduate students: free books online!

December 25, 2007 Posted by John Armstrong | Uncategorized | | No Comments

Yes, Virginia, there is a Bourbaki

In 1947, a young graduate student named Virginia O’Hanlon was nervous. Some of her dearly-held beliefs had been called into question, and she was confused. Her advisor suggested she write a letter to the editor of the Notices of the American Mathematical Society, and I’m proud to reprint their response here, sixty years after its original publication.

Dear Editor: I am a first-year graduate student.
Some of my fellow students say there is no Bourbaki.
My advisor says, “If you see it in Notices it’s so.”
Please tell me the truth; is there a Bourbaki?

Virginia O’Hanlon
115 West Hall

Virginia, your fellow students are wrong. They have been affected by the skepticism of a skeptical age. They do not believe except they see. They think that nothing can be which is not provable by their little minds. All minds, Virginia, whether they be professors’ or students’, are little. In this great universe of ours man is a mere insect, an ant, in his intellect, as compared with the boundless world about him, as measured by the intelligence capable of grasping the whole of truth and knowledge.

Yes, Virginia, there is a Bourbaki. He exists as certainly as truth and rigor and structure exist, and you know that they abound and give to your life its highest beauty and joy. Alas! how dreary would be the world if there were no Bourbaki. It would be as dreary as if there were no Virginias. There would be no studentlike faith then, no porisms, no discursions to make tolerable this existence. We should have no enjoyment, except in sense and sight. The eternal light with which studenthood fills the world would be extinguished.

Not believe in Bourbaki! You might as well not believe in undergraduates! You might get your papa to hire men to watch in all the presses on publication day to catch Bourbaki, but even if they did not see Bourbaki submitting his manuscripts what would that prove? Nobody sees Bourbaki, but that is no sign that there is no Bourbaki. The most real things in the world are those that neither students nor professors can see. Did you ever see undergraduates in the library stacks? Of course not, but that’s no proof that they are not there. Nobody can conceive or imagine all the wonders there are unseen and unseeable in the world.

You may tear apart the baby’s rattle and see what makes the noise inside, but there is a veil covering the unseen world which not the smartest professor, nor even the united smarts of all the smartest professors that ever taught, could tear apart. Only truth, rigor, discourse, intuition, imagination, can push aside that curtain and view and picture the supernal beauty and glory beyond. Is it all real? Ah, Virginia, in all this world there is nothing else real and abiding.

No Bourbaki! Thank God! he lives, and he lives forever. A thousand years from now, Virginia, nay, ten times ten thousand years from now, he will continue to make glad the heart of studenthood.

December 24, 2007 Posted by John Armstrong | Uncategorized | | 5 Comments

Sunday Samples 48

Well, I’m sure everybody knows what tomorrow is. Today, I’ll go with a selection that most everybody has already heard. And if you haven’t, you should have.

A Charlie Brown Christmas was a cartoon unlike any other up to its time. For instance, instead of hiring adults to pretend to be kids, they hired kids to do the voices. Of course, some were too young to read, so they were recorded line-by-line and spliced together in editing. This resulted in a very characteristic, choppy sound to the dialogue, which has become one of the show’s endearing points.

Another departure with the norms of the time was hiring the Vince Guaraldi Trio to compose and play the original jazz selections which comprised the majority of the background music, including “Linus and Lucy”, the song most people think of as the Peanuts theme song. One of the few vocal pieces on the soundtrack is “Christmas Time is Here”. It’s interesting because despite the lyrics the melody hits this bittersweet, ambivalent note in the middle of all the joy of the season. It’s meant to dovetail with Charlie Brown’s dissatisfaction, but I think it stands well enough on its own.
Read more »

December 23, 2007 Posted by John Armstrong | Sunday Samples | | No Comments