Example of a function $f:\mathbb{R}^2\rightarrow\mathbb{R}$ such that $\partial_{u}f \neq \nabla f.\vec{u}$

66 Views Asked by At

Is there an example of a function $f:\mathbb{R}^2\rightarrow\mathbb{R}$ such that

$$\partial_{u}f \neq \nabla f\cdot u$$

for all unit vectors $u$?

I'm trying to find an example. I already know that it can not be a differentiable function, otherwise the equality always holds. Any tips?

1

There are 1 best solutions below

0
On BEST ANSWER

As in the comments: an example is $$ f(x,y) = \begin{cases} x & x=y \\ 0 & \text{otherwise} \end{cases} $$ This $f$ is continuous at $0$, and Gateaux differentiable at $0$. Notice $f(x,0) = f(0,y) = 0$ for all $x,y$, so $f_x(0)=f_y(0) = 0$. Yet, for $u\propto (1,1)$, $\partial_u f(0) \neq 0$.