# Directional derivatives in any direction are all equal

if a function has equal directional derivatives in all directions at a specific point, so is the function differentiable in it?

I think it is correct, and i think if the function is f(x,y) so the tangent plane in this point is parallel to the XY plane. But I don't know how to prove it or how to find en example that disproves it.

can someone help?

Before I forget, $(x^2 \pm y)^2 \geq 0, 2 x^2 |y| \leq x^4 + y^2,$ so, below, $f \leq x^{2/5} \; |y|^{1/5} /2.$

Take $$f(0,0) = 0, \; \mbox{otherwise} \; \; f(x,y) = \frac{x^{12/5} \; y^{6/5}}{x^4 + y^2}$$

Using polar coordinates, with $r$ for usual positive radius, letter $c$ for $\cos \theta,$ letter $s$ for $\sin \theta,$ we find $$f(rc,rs) = \frac{r^{18/5} c^{12/5} s^{6/5} }{r^2 (c^4 r^2 + s^2)} = r^{8/5} \left( \frac{ c^{12/5} s^{6/5} }{ c^4 r^2 + s^2} \right)$$ So, $$\frac{f(rc,rs)}{r} = r^{3/5} \left( \frac{ c^{12/5} s^{6/5} }{ c^4 r^2 + s^2} \right) \leq r^{3/5} \left( \frac{ c^{12/5} }{ s^{4/5}} \right).$$ This says that $f$ is Gateaux differentiable. Not only that, all directional derivatives are $0.$ That is, the Gateaux derivatives obey the required linear relationship, the directional derivative in the direction of a vector $\vec{u} + \vec{v}$ really is the sum of the directional derivatives in the two directions $\vec{u}$ and $\vec{v}.$

However, even this strong condition is not enough to guarantee Frechet differentiability. Consider the function along a parabolic path $x=t,y = t^2.$ The distance of this from the origin is $\sqrt {t^2 + t^4},$ which is very close to $|t|$ as $t \rightarrow 0.$ For Frechet differentiablity, we want $f(a + h) = f(a) + \nabla f \cdot h + o(|h|).$ As $a=0,$ $f(0)=0,$ and $\nabla f = 0,$ we are just asking that $f(h) /|h| \rightarrow 0.$ However, what actually happens with $h = (t,t^2)$ is $$f(t,t^2) = \frac{t^{24/5}}{2 t^4} = \frac{t^{4/5}}{2 }.$$ As mentioned, we have $|h| = \sqrt {t^2 + t^4}.$ For Frechet differentiability, we are asking whether $$\frac{ f(t,t^2)}{\sqrt {t^2 + t^4}} = \frac{t^{4/5}}{2 \sqrt {t^2 + t^4} } = \frac{1}{2 |t|^{1/5} \sqrt {1 + t^2} }$$ goes to zero as $|t| \rightarrow 0.$ With, say, $|t| \leq \sqrt 3,$ we get $\sqrt {1 + t^2} \leq 2,$ and $$\frac{ f(t,t^2)}{\sqrt {t^2 + t^4}} \geq \frac{1}{4 |t|^{1/5} },$$ so the ratio goes to infinity rather than zero. The function $f$ is not Frechet differentiable at the origin.

EDIT June 2016: found one with integer exponents,

Take $$g(0,0) = 0, \; \mbox{otherwise} \; \; g(x,y) = \frac{x^5 \; y^5}{x^{12} + y^8}$$ Everything looks promising in polar coordinates, but then $$\frac{g(t^2, t^3)}{\sqrt{t^4 + t^6}} \geq \frac{1}{4|t|}$$ when $|t| \leq \sqrt 3.$

• (+1) Nice! I was just looking for such an example. Mar 25, 2019 at 14:58

Here is a simpler counterexample with a discontinuous function $f$: $$f(x,y) = \begin{cases} 1 & \text{ if } y = x^2,\ x\ne0\\ 0 & \text{ else. } \end{cases}$$ Then $f$ is not continuous in $(0,0)$, but all directional derivatives in $(0,0)$ are zero.

• could I found a function that all directional derivatives equal and not zero, and it is still not continuous? Jun 3, 2014 at 14:48
• No, the directional derivative is positively homogeneous with respect to the directions. Hence, if all directional derivatives are equal, they must be zero.
– daw
Jun 3, 2014 at 15:23