# Directional derivative and total derivative

Let $$U$$ be an open subset of $$\mathbb{R}^m$$ and $$f:U\rightarrow \mathbb{R}^n$$ a function. Fix $$a\in U$$.

Suppose $$v$$ is any non-zero vector in $$\mathbb{R}^m$$ and that $$L=\lim_{t\rightarrow 0} \frac{f(a+tv)-f(a)}{t}$$ exists and is independent of $$v$$ (i.e. it is same for all non-zero vectors $$v$$).

So directional derivative of $$f$$ at $$a$$ in all directions exists and is same.

Q. Can we conclude that $$f$$ is differentiable at $$a$$? If not, is it continuous at $$a$$?

The examples in books are given about existence of directional derivative in each direction but function is not continuous such as $$f(x,y)=\frac{xy^2}{x^2+y^4}$$ for $$x\neq 0$$ and $$f(0,y)=0$$. In this example, directional derivative of $$f$$ at $$0$$ exists along all directions; but its values are different. If $$v=(a_1,a_2)$$ then directional derivative is $$a_2^2/a_1$$ for $$a_1\neq 0$$, and its $$0$$ if $$a_1=0$$. So values of directional derivatives are different.

For the existence of derivative, we not only take linear directions to reach at $$a$$, but all curvilinear directions. I didn't find this question (mentioned above) in the books, stated as exercise at least, where above examples is mentioned.

Define $$f:\mathbb R^2\to \mathbb R$$ by setting $$f=1$$ on the half parabola $$\{(x,x^2): x>0 \},$$ and $$f=0$$ everywhere else. Then all directional derivatives of $$f$$ at $$(0,0)$$ are $$0.$$ But $$\lim_{x\to 0^+}f(x,x^2)=1\ne0= f(0,0).$$ Thus $$f$$ is not even continuous at $$(0,0),$$ much less differentiable there.
If $$L=L(v)$$ is independent of $$v$$, then $$L\equiv 0$$, since from the definition of $$L$$ we obtain that $$L(-v)=-L(v)$$.
Set $$f(x,y)=\left\{\begin{array}{ccc} \dfrac{xe^{-1/y^2}}{x^2+e^{-2/y^2}} & \text{if} & y\ne 0 \\ 0 & \text{if} & y=0. \end{array} \right.$$ Then for all $$b\ne 0$$, $$\frac{f(ta,tb)-f(0,0)}{t}=\dfrac{ae^{-1/(t^2b^2)}}{t^2a^2+e^{-2/(t^2b^2)}}= \dfrac{a}{t^2a^2e^{1/(t^2b^2)}+e^{-1/(t^2b^2)}}\to 0$$ For $$b=0$$, the limit above is also zero. But $$f$$ is not even continuous at $$(0,0)$$.
Consider $$\big(x(t),y(t)\big)=(ce^{-1/t^2},t)\to (0,0), \quad \text{as t\to0}$$ and $$f\big(x(t),y(t)\big)=\frac{ce^{-2/t^2}}{(c^2+1)e^{-2/t^2}}=\frac{c}{c^2+1}\in [-1/2,1/2].$$