[Math] Why does existence of directional derivatives not imply differentiability

derivativeslimitsmultivariable-calculusproof-verificationreal-analysis

In my notes I have:
$$Df\big|_{\mathbf{a}}(\mathbf{h})=\lim_{t\to 0}\frac{f(\mathbf{a}+t\mathbf{h})-f(\mathbf{a})}{t}$$
It says that even if this limit exists for all $\mathbf{h}$, we do not necessarily have differentiability. Is this because the $Df\big|_{\mathbf{a}}$ we get from this is not necessarily linear, or even continuous, in $\mathbf{h}?$ Can I say that if the result map is linear & continuous then we have differentiability?


I ask because I am doing a problem which asks to check differentiability of some functions $f:\mathbb{R}^2\to\mathbb{R}$. One of them is:

$$f(x,y)=xy\left(\frac{x^4-y^4}{x^4+y^4}\right)\qquad f(0,0)=0$$
which I thought was differentiable at $\mathbf{0}$ since $Df\big|_{\mathbf{0}}(\mathbf{h})=0$ for all $\mathbf{h}$, but I am not sure this is enough.

Best Answer

Existence of every directional derivative of $f$ at a point $p$ does not even imply $f$ is continuous at $p$. (!) For example, let $E$ denote the parabola $y = x^{2}$ with the origin removed, and let $f$ be the characteristic function of $E$, namely $$ f(x, y) = \begin{cases} 1 & y = x^{2},\ x \neq 0, \\ 0 & \text{otherwise.} \end{cases} $$ A discontinuous function with all directional derivatives

Understanding this example thoroughly should clarify your doubts about your assigned question. The point is, for every line $\ell$ through the origin, $\ell$ contains an open interval about $(0, 0)$ that misses $E$.[*] Consequently, $f$ is locally constant along every line through the origin, so its directional derivative in an arbitrary direction vanishes.

Conceptually, controlling the behavior of a function along lines through a point need not give control over non-lines through that point. That's why limits at $p$ are defined by looking at the behavior of $f$ in open disks about $p$.

[*] Precisely, for every line $\ell$ through $(0, 0)$, there exists an $r > 0$ such that $\ell$ does not meet $E$ inside the open disk of radius $r$ centered at the origin.

Related Question