2

Can such function exist whose all directional derivatives exist at a point but it isn't continuous at that point? Preferably give examples of $f: \Bbb R^2 \rightarrow \Bbb R$ . Our teacher said such a function can exist but the example he gave had one undefined directional derivative.

Black Jack 21
  • 698
  • 6
  • 24
  • how about a stupid one like $f(x,y) = xy$ when $(x,y) \ne 0$ and $f(0,0) = 1$ – Doug M Nov 16 '17 at 04:38
  • @DougM at (0,0) It's discontinuous alright, but none of its directional derivatives exist as well so it doesn't answer my question – Black Jack 21 Nov 16 '17 at 04:56
  • Here is a more mysterious, plucked-out-of-a-hat example: https://math.stackexchange.com/questions/827382/directional-derivatives-exist-for-function-neither-continuous-nor-differentiable?rq=1 – symplectomorphic Nov 16 '17 at 05:29
  • See also my previous question here, with another example: https://math.stackexchange.com/questions/1497043/does-there-exist-nondifferentiable-f-that-is-continuous-and-has-all-directiona?rq=1 – symplectomorphic Nov 16 '17 at 05:30

1 Answers1

6

Yes.

Here is a simple and natural way to construct such a function, with the discontinuity at the origin. I don't see this method discussed elsewhere on MSE. There are other, plucked-out-of-a-hat examples, but this is surely the simplest.

You want the function to be smooth along every line into the origin; that'll guarantee the directional derivatives exist at the origin in any direction. But we can make it discontinuous at the origin by setting it to have a different value along a nonlinear curve through the origin.

This is easy! Just take $f(x,y)=0$ except when $y=x^2$ and $x\neq0$, in which case it is some other constant, say $1$. Symbolically:

$$f(x,y)=\begin{cases}1 & y=x^2, x\neq0\\ 0 & \text{otherwise}\end{cases}$$

The function isn't continuous at the origin because the value there is $0$ but approaching along the parabola yields a limit of $1$.

But the directional derivatives all exist because

$$\frac{f(hv_1,hv_2)}{h}=0$$

for all sufficiently small $h$.


The point of this sort of counterexample is that directional derivatives, which enforce a degree of smoothness along lines, are not sensitive enough to detect irregularity along nonlinear curves.

  • So in this example, in the limit expression to get directional derivative, we have no option but to put $ f(hv_1,hv_2) $ to be 0 . This is because supposing for a particular value of h and (v1,v2), $ (hv_1,hv_2) $ does somehow lie on $ y=x^2 $, as we are taking limit $ h \rightarrow 0 $, $ f(hv_1,hv_2) $ will change to 0. All this is happening because the slope of the line joining origin and y=x^2 is changing. Is this what you meant? – Black Jack 21 Nov 16 '17 at 05:52
  • 1
    I can't make much sense of your comment. The expression we take the limit of to get the directional derivative must vanish when $h$ is sufficiently close to zero; that is why I said "for all sufficiently small $h$." If $h$ is too big, $h(v_1, v_2)$ might indeed intersect the parabola. But as we shrink $h$ we eventually avoid this problem. – symplectomorphic Nov 16 '17 at 05:55