# Differentiability on a function from directional derivatives

Let $f:\mathbb{R}^2 \rightarrow \mathbb{R}$ and $a \in \mathbb{R}^2$. Suppose that all $D_v (a)$ exist and that $D_{(v_1, v_2)} f (a)= 5v_1 ^2 + v_2$. Is $f$ differentiable in $a$?

I think it is differentiable. The only way I can think of solving this problem is by using the sufficient condition of differentiability:

Let $A$ be open in $\mathbb{R}^n$, $a \in A$ and $f:A \rightarrow \mathbb{R}^m$. If the partial derivatives $D_1 f(x),...,D_n f(x)$ exist in an open ball $B(a,r)$ and they are all continuous in $a$ then $f$ is differentiable in $a$.

So the values of the partial derivatives in $a$ are $D_1 f (a)= 5 \cdot 1^2+0$ and $D_2 f (a)= 5 \cdot 0^2+1 = 1$ and they exist because all directional derivatives exist by hypothesis. But I don't know how to conclude that the partial derivatives are continuous in $a$ since I don't know their general expression, only their value in $a$.

• Hint: Examine the directional derivatives in the directions of $(1,0)$ and $(-1,0)$. – amd Aug 29 '18 at 21:05
• @amd How can we conclude from that? – gimusi Aug 29 '18 at 21:14
• @gimusi What do those values mean for a potential tangent plane at $a$? – amd Aug 29 '18 at 21:17
• @amd Ah ok yes of course! We have that $D_{(v_1, v_2)} f (a)$ should be linear in $v_1$ and $v_2$ if f were differentiable. – gimusi Aug 29 '18 at 21:21
• Not quite. You need $D_{-v}f(a) = -D_vf(a)$. More generally, a necessary condition for differentiability is that $D_v(a) = \nabla f(a)\cdot v$. – amd Aug 29 '18 at 22:33

Capturing the discussion in the comments, if $f$ is differentiable at $a$, then $D_vf(a) = \nabla f(a)\cdot v$, that is, the directional derivative is a linear function of $v$. In particular, we must have $D_{-v}f(a) = -D_vf(a)$, but for this function we have $D_{(1,0)}f(a) = D_{(-1,0)}f(a) = 5$. Coming at it from the other direction, $\nabla f(a) = \left(D_{(1,0)}f(a),D_{(0,1)}f(a)\right) = (5,1)$ and so $\nabla f(a)\cdot(-1,0) = -5 \ne 5$.
Geometrically, differentiability at a point is equivalent to there being a tangent (hyper)plane to the graph of the function at that point. The directional derivative in the direction of $v$ at $a$ is the slope in that direction of this tangent plane. There is no plane that slopes upward in opposite directions, so there can be no tangent plane at $a$.
Following suggestion given by amd in the comment, recall that for $f$ differentiable $D_{(v_1, v_2)} f (a)$ should be linear in $v_1$ and $v_2$ but in that case it is not.
Therefore $f$ is not differentiable in $a$.
• @Yagger We have that if $f$ is differentiable then $D_{(v_1, v_2)} f (a)$, therefore if $D_{(v_1, v_2)} f (a)$ is not linear $f$ can't be differentiable. – gimusi Aug 29 '18 at 21:52