Monday, March 28, 2016

Sanity Check: Abbott and Costello and Calculus

Sanity Checks are missives on a specific math point in need of clarification. I try to do so using the fewest words possible. Usually, this is still quite a few words.

I was recently flipping through David Griffiths' very nice undergraduate E&M textbook and came across this tidbit in his whirlwind review of calculus:
Question: Suppose we have a function of one variable f(x). What does the derivative, df/dx, do for us? Answer: It tells us how rapidly the function f(x) varies when we change the argument x by a tiny amount dx: df = (df/dx) dx. In words: If we change x by an amount dx, then f changes by an amount df; the derivative is the proportionality factor.
This is a fresh way of thinking about the derivative (a constant of proportionality) which is usually defined as the slope of a tangent line or a rate of change or a limit arglebargle. Yet, the equation Griffiths writes is more often used as the definition of the differential. I remember it appeared in my Calc-I textbook soon after we discussed the derivative, where it seemed to me to create a kind of calculus chicken and egg, a mathematical vaudeville act right out of Abbott and Costello:

  What's a derivative?
  df/dx.
  df/dx is the derivative?
  It's how much the function changes.
  When you change x?
  Yes.
  So df is how much f changes?
  Yes.
  So df = (df/dx) dx.
  Yes.
  The derivative tells you the change?
  Yes.
  But isn't df/dx the ratio of the changes?
  That's what I'm asking you.
  Third base!



The crux of the problem is that Griffiths' definition is wrong (well, sorta. Note he sneaks the weasel word tiny into his definition. This is what propane salesmen call "playing lawyerball"). To explain what's wrong requires a picture. Here is a sample function f(x), a point under consideration x, a sample change in the independent variable which I will call Δx and the resulting change in the function which I will call Δf:

definition of differential

I have also sketched in df/dx evaluated at x as the tangent line centered on x, which I have labeled f'(x), changing notation to defuse the Abbott and Costello routine. With this cast of characters so named, we see that the derivative doesn't give us the change in the function when the independent variable changes by Δx. Rather, the differential is the linear part of the change. Like Goldilocks, the linear approximation can be too big (as it is here), too small, or (rarely) just right. So, yes, we can write

    df = f'(x) dx

but that is not the change in the function resulting from the change in the independent variable. The equation representing those words is:

    Δf = f'(x) Δx.

which is wrong, as the figure shows. There are two ways of fixing this. The first way is to just swap in an "approximately equal" sign:

    Δf ≈ f'(x) Δx.

This is the essence of computational calculus, of ODE solvers and numerical integration which use a tiny but finite step size limited by the word precision of the hardware to do their thing. You can get a feel for this from the graph -- note the plot of the tangent line overlaps the plot of the function as long as you don't stray too far from x. You cross your fingers and hope the accumulating error doesn't verklempt your results.

The second way to fix the equation is more magical, and that is to reinterpret the original notation:

    df = f'(x) dx

In words: We can write Δf = f'(x) Δx (note the equals sign) as long as Δx is small enough where "small enough" can be rigorously defined. We get tired of writing all those words, so we agree to simply write df = f'(x) dx with a wink and a nudge that we all know what is really going on behind those symbols.

Note: Not "small enough" as in some super extra double precision word length. Small enough as in "as small as necessary to make this a literal equality." You probably know this as a limit, but think of it as a game: You tell me the function and Δf and how small the error in the linear approximation must be and I tell you Δx. If f(x) is "well behaved" (to wit: differentiable) I will always win. That's the essence of the differential. We might say that's the essence of calculus. Calculus is an exact linear approximation and if those words aren't making your head hurt then you just aren't paying attention.

I suppose all this is obvious to a smart person, but the rest of us exit Calc-I with an incomplete understanding and deep psychological scarring that we only work out years later via blog ranting. One wonders why mathematicians can't just say what they mean. I guess this demonstrates why smart people shouldn't write textbooks. You just can't win.

Third base!
LabKitty skull logo

No comments:

Post a Comment