7

Is it possible for the directional derivative for a function $f$ in the direction of a vector $v$, $D_vf(x) = \lim_{h \to 0} \frac{f(x + hv) - f(x)}h$ to exist for every vector $v$, and yet $v \mapsto D_vf(x)$ fails to be linear? Here we have a function which seems to be displaying that very phenomenon: $$f(x,y) = \frac{32x^3}{x^2 + y^2} - \frac{16x^5}{(x^2 + y^2)^2} - 14x$$ enter image description here

As you can see, if you follow the map at the origin in the direction of any vector, it appears to follow a straight line, i.e. the derivative in that direction is constant in the direction of $v$. Yet the "slope" in each direction is clearly not behaving in a linear manner. Is this really the case? Or is it just a misleading graph? I'm inclined to believe the former, but what I'm looking for is a rigorous argument.

Further, under what conditions might a derivative fail to be linear? Or, what are necessary conditions to ensure that a proof that "the directional derivative is linear" actually works?

3 Answers3

6

The map $ v\mapsto D_vF(x_0)$ is linear when the function $f$ is differentiable at $x_0$. In that case, there exists a linear map $ df(x_0)$ such that $D_vF(x_0)=\langle df(x_0),v\rangle $. There exist functions which have all the directional derivatives $D_vF(x_0)$ at a point $ x_0$, but fail to be differentiable, in particular the previous map is non linear.

guestDiego
  • 4,006
  • I don't understand "in particular the previous map is non linear." – zhw. May 16 '16 at 23:57
  • I mean that the map $ v\mapsto D_v F(x_0)$ is in general not linear (if it exists) when $f$ is not differentiable at $x_0$ – guestDiego May 17 '16 at 00:23
  • 2
    That's not true. Consider the function $f(x,y) = 0$ if $y=0,$ $f(x,y) = x^3/y$ otherwise. All directional derivatives are $0$ at the origin, so certainly the directional derivative is linear in $v,$ but $f$ is not even continuous at the origin. – zhw. May 17 '16 at 00:35
  • Right, my statement could be ambiguous. I said that the map $v\mapsto D_vF(x_0) $ is in general not linear when the function is not differentiable at $x_0$. I used the term "in general" having in mind "not necessarly" . The clarification is welcome. – guestDiego May 17 '16 at 00:49
  • It seems that your definition of "differentiable" boils down to "the directional derivative exists everywhere and is linear". Am I characterizing this correctly? – silvascientist May 17 '16 at 00:55
  • 1
    No, that is not correct and it was well exemplified by zhv. Differentiable means more (see for example the definition of "differentiability in higher dimensions" in https://en.wikipedia.org/wiki/Differentiable_function). Of course, your statement is implied by the notion of differentiability. – guestDiego May 17 '16 at 10:54
  • Looking at zhv's function, I don't believe that exemplifies how what I was saying could be mistaken. I mean, the directional derivative for that function exists, but it is certainly not linear! Would not linearity of the directional derivative imply differentiability in the sense described by Wikipedia? Or are there counterexamples to that particular statement? – silvascientist May 17 '16 at 21:51
  • 1
    Read carefully the example of zhv: in that case $D_v f(0)=0$ for any $v$. So the map $ v\mapsto D_v f(0)$, being the NULL MAP, is by sure linear. Nevertheless the function is NOT DIFFERENTIABLE at 0. – guestDiego May 17 '16 at 21:59
  • Ah, of course, that'll teach me not to make assumptions about a function by a casual inspection of its graph... – silvascientist May 18 '16 at 06:24
4

Certainly this can happen. The classic example is $f(x,y) = xy/(x^2+y^2).$ If we let $v=(a,b),$ then $D_v(0,0) = ab/(a^2+b^2).$ The last expression is not a linear function of $(a,b).$

zhw.
  • 105,693
1

Let's look at your function $$f(x,y) = \frac{32x^3}{x^2+y^2} - \frac{16x^5}{(x^2+y^2)} - 14 x$$ I'll use the notation $D_x = D_{(1,0)}$ and $D_y = D_{(0,1)}$. Then, $$D_x f(0,0) = \lim_{h \to 0} \frac{f(h,0) - f(0,0)}{h} = \frac{32h^3}{h^3} - \frac{16h^5}{h^5} - 14\frac{h}{h} = 2$$ and $$D_y f(0,0) = \lim_{h\to0}\frac{f(0,h) - f(0,0)}{h} = 0$$ But, $$D_{(1,1)}f(0,0) = \lim_{h\to0}\frac{f(h,h)-f(0,0)}{h}= \frac{32h^3}{2h^3}-\frac{16h^5}{4h^5} - 14\frac{h}{h} = -2\not= D_xf(0,0) + D_yf(0,0)$$ So $D_v$ is not linear in $v$ at $(0,0)$.


In order for the directional derivative to be linear in $v$ at a point $x$, it is sufficient that the partial derivative $D_x$ and $D_y$ (and $D_z$, etc. for higher dimensions) be continuous at $x$. To see why, observe that $$D_{(v_x, v_y)} f(x) = \lim_{h\to0} \frac{f(x+hv_xe_1+hv_ye_2) - f(x)}{h} = \lim_{h\to 0} \frac{f(x+hv_xe_1+hv_2e_2) - f(x+hv_ye_2)}{h} + \lim_{h\to0} \frac{f(x+hv_ye_2) - f(x)}{h}$$ The second term we recognize as $D_{(0,v_y)}f(x)= v_yD_yf(x)$, while by the Mean Value Theorem we can re-write the first term as $$\lim_{h\to 0} v_xD_xf(x+hv_ye_2+ce_1)$$ for some $c$ between $0$ and $h$. But, by the continuity of $D_xf$ near $x$, this limit is simply $v_xD_xf(x)$. Thus, $$D_{(v_x,v_y)}f(x) = v_xD_xf(x) + v_yD_xf(x)$$ is linear in $v$.

  • It is sufficient that f be differentiable at x for the direction derivative to be linear in v. Continuity of the partials at x implies differentiability at x; you don't need this continuity in a small ball centered at x, just at x. – zhw. May 17 '16 at 00:03
  • @zhw. Thanks! Reading your comment, I realized I'd only used continuity at $x$. I've edited accordingly. –  May 17 '16 at 05:44