i was wondering if the following (alleged) definitions of differentiability are equivalent.
Let $f: \mathbb{R}^n \rightarrow \mathbb{R}^m$ be continuous.
Definition 1: $f$ is called differentiable in $x \in \mathbb{R}^n$, if there exists a linear function $J:\mathbb{R}^n \rightarrow \mathbb{R}^m$, such that $$\operatorname{lim}_{v \rightarrow 0} \left|\left|\frac{f(x+v)-f(x)-Jv}{||v||} \right|\right|=0 $$
vs
Definition 2: $f$ is called differentiable in $x \in \mathbb{R}^n$, if there exists a linear function $J:\mathbb{R}^n \rightarrow \mathbb{R}^m$, such that $$\operatorname{lim}_{h \rightarrow 0} \left|\left|\frac{f(x+hv)-f(x)-Jhv}{h} \right|\right|=0 $$ $\forall v \in \mathbb{R}^n$ with $||v||=1$.
The first definition is the usual definition, the second definition basically states that all directional derivatives have to be given by a linear function.
If these definitions are not equivalent, there should be a continuous function $f: \mathbb{R}^n \rightarrow \mathbb{R}^m$, such that all directional derivatives are given by a linear function, but $$\operatorname{lim}_{n \rightarrow \infty} \left|\left|\frac{f(x+v_n)-f(x)-Jv_n}{||v_n||} \right|\right| \neq 0 $$ for a suitable sequence $(v_n)_{n \in \mathbb{N}} \rightarrow 0$, $v_n \in \mathbb{R}^n$.
While writing this down i found a counterexample, so i made this a Q&A.
Let $$(x_n, y_n) = \left(\frac{sin(\frac{1}{n})}{n} , \frac{cos(\frac{1}{n})}{n}\right).$$ Let $\phi_n$ be a continuous bumpfunction, such that:
Let $$f(x, y)=\sum_{n=0}^{\infty}\phi_n(x, y).$$
$f$ is continuous and welldefined because the $\phi_n$ are continuous and their supports are mutually exclusive. Let $J=0.$ $f$ is constructed in a way, so that each line through the origin intersects at most one support of the bumpfcunctions $\phi_n$. So $$\operatorname{lim}_{h \rightarrow 0} \left|\left|\frac{f(hv)-f(0)-Jhv}{h} \right|\right|=0 $$ holds $\forall v \in \mathbb{R}^n$ with $||v||=1$ because for sufficiently small $h$, $hv$ will be out of the support of the $\phi_n$ which it intersects, if there is any.
But we have $$\operatorname{lim}_{n \rightarrow \infty} \left|\left|\frac{f(x_n, y_n)-f(0)- 0v_n}{||v_n||} \right|\right| = \operatorname{lim}_{n \rightarrow \infty} \left|\left|\frac{\frac{1}{n}}{\frac{1}{n}} \right|\right| = 1.$$