10
$\begingroup$

I noticed many seemingly reputable online sources have "incorrect" description of directional derivatives for real-valued functions in several variables. Here, by "incorrect" I mean it disagree with the definitions in the textbooks I'm familiar with. Of course, I'm open the possibility that all the textbooks I have been using are wrong. (Update: well, that's probably impossible).

For a function $f$ in $n$ variables $\mathbf{x}=(x_1,\dots,x_n)$ and a unit vector $\mathbf{v}$, almost all sources defines directional derivatives as $$ D_{\mathbf{v}} f(\mathbf{x}) = \lim_{h \to 0} \frac{f(\mathbf{x} + h \mathbf{v}) - f(\mathbf{x})}{h}. $$ So far so good. Then many online sources state that if the partial derivatives exist, then $$ D_{\mathbf{v}} f(\mathbf{x}) = \frac{\partial f}{\partial x_1} v_1 + \dots + \frac{\partial f}{\partial x_n} v_n. $$ This is not true. At least this disagrees with all the textbook my department is using (Ron Larson). We can also easily come up with counterexamples where the left hand side is undefined while the right hand is defined (Update: or even better/worse counterexamples where one side is nonzero and the other side is zero). Indeed, if students took the above statement literally, then the existence of partials implies the existence of all directional derivatives, which renders many exam questions meaningless.

Some major reputable sources that has this problem:

Just to name few well known ones. These three also happen to be the first 3 search results in my Google search results for "directional derivative". So these are what students are most likely to see.

YouTube sources are not much better, the 3 videos with the highest views that I can see are

Only the last one makes this distinction explicit.

This disagreement causes real issues in classroom. In addition to confusing students, students very often justifies incorrect answers on exams by referencing these sources. It is not easy to convince students that somehow I am to be trusted more than these reputable sources. (no one is going to care about counterexamples).

My question is why are so many seemingly reputable sources wrong about this rather important distinction? (Update: this is an honest question. Why are they all wrong about same thing in exact same way? Carelessness in the exact same way? Yet, none of them confuse the existence of partials and differentiability. Why not be careless there too?)

$\endgroup$
10
  • 4
    $\begingroup$ I think your point "no one is going to care about counterexamples" is the most important. One of the major points I try to convey in all of my courses is that mathematical truth does not come from authority, but from logic. I think this is actually a good opportunity to really drive that core lesson home: it doesn't matter what all these textbooks say, if you have a counterexample then the textbook is wrong. $\endgroup$ – Steven Gubkin Mar 4 at 0:52
  • 4
    $\begingroup$ This doesn't seem like a question that you want answered, more like a complaint that these books are wrong. Probably the reason that so many books are not more careful about this kind of thing is that real-world examples are almost all (fully) differentiable, and in real-world applications we almost always have a metric and an inner product. Multivariable calculus is basically a service course so that engineering majors can do E&M. $\endgroup$ – Ben Crowell Mar 4 at 1:21
  • 1
    $\begingroup$ @BenCrowell, oops. Fixed. $\endgroup$ – user13395 Mar 4 at 1:59
  • 2
    $\begingroup$ @BenCrowell, typos/minor mistakes in textbooks are common, and certainly not worth our time complaining. But if three of the most popular college textbook are wrong about the exact same thing the exact same way, then it is worth understanding why. I'm not sure I believe the engineering style smoothness assumption is the reason here. If that were true, they would say existence of partials implies smoothness. Yet none of them make that mistake. $\endgroup$ – user13395 Mar 4 at 2:04
  • 1
    $\begingroup$ @FerencBeleznay: Yeah, sorry, I probably should have stated in my question. The textbook I use (and I probably most older textbooks) just add requires $f$ to be differentiable. Just one word, that's it. So it is understandable if a blog post dropped this word. But is is an important condition, so I certainly don't expect online textbook writers (e.g. OpenSTAX) to miss that. And if it is just a small mistake, why would so many different sources make the exact same mistake? (and almost nothing else) $\endgroup$ – user13395 Mar 4 at 7:04
5
$\begingroup$

It is worth noting that your definition of directional derivative allows for non-continuous functions to be differentiable (in all directions). It isn't enough to look at just straight-line paths for the definition. See page 117 of Counterexamples in Analysis for two interesting counterexamples. One of them is $$f(x,y)=\frac{x^2 y}{x^4+y^2}, \quad f(0,0)=0$$ which is differentiable along each line through the origin, but is not continuous there. (Check it on parabolas which go through the origin. e.g. $y=\pm x^2$) Once you know that the function is actually differentiable, the limit you provide will actually give the correct answer.

To answer the direct question: because it is hard to get this stuff totally correct without losing the main point and making it look like a real analysis textbook.

$\endgroup$
8
  • 2
    $\begingroup$ The definition of directional derivative does indeed allow non-continuous functions to have directional derivatives in all directions. That's not the same as saying that the function is differentiable there though. $\endgroup$ – Thierry Mar 4 at 3:49
  • 1
    $\begingroup$ I'm not sure if I'd agree with the second point. It's not hard to get things like these totally correct. All calculus textbook I own got this one right, even my old calculus for engineers textbook got it right (no offense to engineers). So all the new authors have to do is to copy and paste, or at least paraphrase. $\endgroup$ – user13395 Mar 4 at 4:09
  • 3
    $\begingroup$ For those interested in digging into such things further, see the following sci.math posts: Continuity in each variable vs. joint continuity (4 June 2005) and History of mixed partial derivatives equality (9 June 2007). Also, the function $f(x,y) = \exp\left(-\frac{x^2}{y^2} - \frac{y^2}{x^2}\right)$ for $xy \neq 0,$ with $f(x,0)=f(0,y)=0,$ is such that all mixed partials exist and are independent of differentiation order (continued) $\endgroup$ – Dave L Renfro Mar 4 at 8:43
  • 2
    $\begingroup$ (i.e. $\frac{{\partial}^8f}{\partial x^2 \partial y^3 \partial x \partial y^2} = \frac{{\partial}^8f}{\partial x \partial y^2 \partial x \partial y^3 \partial x} = \frac{{\partial}^8f}{\partial x^3 \partial y^5} = \frac{{\partial}^8f}{\partial y^5 \partial x^3}),$ but $f(x,y)$ is not continuous at $(x,y)=(0,0).$ See solution to Problem 4876 in American Mathematical Monthly 67 #8 (October 1960), pp. 813-814 (ASCII version in this 21 December 2006 sci.math post). $\endgroup$ – Dave L Renfro Mar 4 at 8:43
  • 1
    $\begingroup$ @Adam I'm not following you. Of course you can define the directional derivative this way and still have the multivariable chain rule. Or am I missing something? $\endgroup$ – Thierry Mar 4 at 14:22
1
$\begingroup$

Well, I guess the answer is rather obvious - this relation is true if we additionally assume that the partial derivatives are continuous, in which case the function is differentiable. (The actual proof of this is deemed too technical for many such courses.) This condition is almost always met in practice, and a large fraction of courses (say, those for physicists, engineers etc.) are teaching calculus-style, computational aspect, not even bothering with rigorous definitions and proofs.

Of the sources your mention, "Paul's online notes" is clearly like that. Lots of "worked examples", and as far as I can see, it does not even give a definition of a differentiable function. It says that your formula follows from chain rule, but the conditions for the latter to be applicable are never discussed. So, I wouldn't really say it even makes a mistake here - it just doesn't discuss the class of functions to which the formula applies, and that is true for everything there, not just this formula. Something similar may apply to Wolfram MathWorld.

In some cases, the condition of continuity of partial derivatives is simply forgotten. I feel it is unlikely that a properly trained mathematician would make such a mistake, so that may be a sign of the overall qualification of people involved, in which case there will be more mistakes. But I guess the popularity and "reputation" of these online sources hinges more on how well they explain things than on being correct on every detail.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy