# If $f$ is differentiable, then $D_ef=\nabla f\cdot e$. How about its reversal?

I'm studying Marsden, Hoffman - ch.6 differentiability of multivariable-multivalued function.

It says that if a function is differentiable, then the directional derivative w.r.t. a vector $e$ is equal to the dot product of gradient of $f$ and $e$.

Then how about "If $\nabla f\cdot e=D_e f$, then $f$ is differentiable." Intuitively, I thought that it's wrong since though the antecedent is true, it seems to need , at least, continuity condition for $f$. But I can't show it rigorously.

• Your function might be pathological along curves other than small segments. However, partial derivatives only capture information relative to the restriction of $f$ along small segments. Commented Mar 9, 2016 at 10:56
• Commented Mar 9, 2016 at 10:58

Think about a function $f(x,y)$ that equals $1$ iff $y=x^2$, $(x,y)\neq (0,0)$ and zero elsewhere. The directional derivatives in $(0,0)$ are all zero for all directions, but the function is not even continuous in $(0,0)$.
This can make sense if you define the directional derivative correctly. In particular, let $$D_ef(x) = \lim_{h\to 0} \frac{f(x+he)-f(x)}{h}$$ We can now say $f$ is differentiable if and only of this limit exists for every vector $x$ and $e$, and there exists a vector-valued function $\nabla f$ such that $$D_e f= \nabla f \cdot e$$ In fact, I happen to like this as a definition of differentiability.