2
$\begingroup$

Give an example of a function $f:\mathbb{R}^2\to\mathbb{R}$ such that $f'_u(0,0)$ exists in all directions $\|u\| = 1$, but $f$ is not differentiable at $(0,0)$. You have to show that your example satisfy the above requirement.

4 Answers 4

5

$$f(x,y) = \left\{\begin{array}{ll}0 & (x,y)=(0,0)\\0&y\neq x^2\\1 & y=x^2, (x,y) \neq (0,0) \end{array} \right.$$

In every direction the line spanned by $u$ can only intersect the parabola twice, so for $(x,y)$ close to the origin we have $y\neq x^2$ and $f(x,y)=0$, so $f'_u(0,0) = 0$. However, taking the path $f(x,x^2)$ we have that $f(x,x^2) \to 1$ as $x \to 0$. It follows that $f$ is not continuous at $(0,0)$ so it cannot be differentiable.

As a bonus, it is actually possible to construct a continuous function which has this property, but it is a little more complicated and not as easy to prove, so I leave thinking about that to you.

3

Define $f:\mathbb R^2\to\mathbb R$, by $$f(x,y)= \frac{x^2y}{x^4+y^2}, \text{when} (x,y)\neq (0,0)$$ and $$f(0,0)= 0$$ This function is not continuous at $(0,0)$. Hence not differentiable. But direction derivative exits for all $v$. This is not continuous because, if you approach to $(0,0)$ via line $y= mx$, we have different limit of $f$.

For $v= (v_1,v_2)$, $\|v\|=1$, we have direction derivative of $f$ in the direction $v$ at $(0,0)$ is $$D_vf(0,0)=\lim_{t\to 0}\frac{f[(0,0)+t(v_1,v_2)]-f(0,0)}{t}=0 \text{ if } v_2=0$$ and above limit equal to $\frac{v_1^2}{v_2}$ if $v_2\neq 0$. Hence limit exits for all $v$. Hence direction derivative exists for all $v$. But not continuous.

2

Not an answer: See comment below:

$$f(x,y)=\frac{y}{|y|}\sqrt{x^2+y^2}\text{ if } y\neq 0$$ and $f(x,y)=0$ if $y=0$. It is continuous at $(0,0)$ but not differentiable. Though direction derivative exists for all $v$. Check it.

  • 1
    This function is not defined along an entire line in $\mathbb{R}^2$, and it can't be continuously extended over the line $y=0$ either. So I don't think this would count. I also think it's misleading to say that it's continuous at $(0,0)$. Maybe with respect to its true domain, but not if $\mathbb{R}^2$ is the input space.2012-05-06
  • 0
    Yes you are right... Thanks for pointing out.. Let me write this in answer itself...2012-05-06
  • 0
    This is still an example worth thinking about. I did not downvote.2012-05-06
  • 0
    @alex.jordan this example works!!2013-08-28
  • 0
    @Neeraj Making me think about a post that's over a year old, eh? This function is not even defined when $y=0$ (along the $x$-axis), so how can it have a directional derivative at $(0,0)$ in the direction of the $x$-axis?2013-08-29
  • 0
    @alex.jordan $f(x,y)=0$ at $x$ axis!!2013-08-29
  • 0
    @Neeraj Why should that be? $f(x,0)=\frac{0}{0}\sqrt{x^2+0}$, which is undefined.2013-08-29
  • 0
    @Neeraj, North of the $x$-axis, this function is $\sqrt{x^2+y^2}$, whose graph is an upward opening cone. South of it, the function is $-\sqrt{x^2+y^2}$, a downward opening cone. Picture an hourglass-cone with one half of the upper portion cut away, and the opposite half of its lower portion cut away. It's clear why directional derivatives exist in most directions, but there just is no reasonable way to make sense of one in the direction along the cut.2013-08-29
  • 0
    @alex.jordan why are you plugging in $y=0$ is $f(x,y)$ when $f(x,0)$ is assigned separately!2013-08-31
  • 0
    @Neeraj If OP allows for a discontinuous gluing of linear segments in this way, then there are trivial answers. Along each line defined by angle $\theta$, just _define_ $f'_u$ to be discontinuous as $\theta$ varies, and extend outward linearly for $f$, making a continuum nexus of sticks pointing in wildly different directions. (See GEdgar's answer.) Since anyone can just make up such a function by definition, I would guess the OP wants a function that is continuous in a neighborhood of $(0,0)$. OP seems to have disappeared to clarify though.2013-08-31
2

Define $f$ arbitrarily on the semicircle $x^2+y^2=1, x>0$. For example make it wildly discontinuous, or even non-Borel-measurable. Then define $f$ to be linear on each line through the origin.