Looking for a counter-example in Multi-variable Calculus I looking for a proof or a counterexample (more likely) for the following Claim:
Claim. Let $\,\boldsymbol{f}:U\to\mathbb R^n$, where $U\subset\mathbb R^m$ open, and $\boldsymbol{a}\in U$, be a function with the property that, there exists a matrix $A\in\mathbb R^{n\times m}$, such that for every smooth curve $\boldsymbol{\gamma}: I\to U$, where $I$ is an open interval and $0\in I$, with $\boldsymbol{\gamma}(0)=\boldsymbol{a}$ and $\boldsymbol{\gamma}'(0)\ne \boldsymbol{0}$, the composition 
$h(t)=\boldsymbol{f}\big(\boldsymbol{\gamma}(t)\big)$ is differentiable at $t=0$ and $h'(0)=A\boldsymbol{\gamma}'(0)$. Then $\boldsymbol{f}$ is differentiable at $\boldsymbol{x}=\boldsymbol{a}$.
So far, available are the following examples (which do not consist counterexamples of the above):
A. $f(x,y)=\left\{\begin{array}{ccc}\displaystyle
\frac{xy^2}{x^2+y^6} & if & (x,y)\ne (0,0), \\
0 & if & (x,y)=(0,0).
\end{array}\right.$
For this $f$ all the directional derivatives exist, but $f$ is not even continuous at $(x,y)=(0,0)$
B. $f(x,y)=\left\{\begin{array}{ccc}\displaystyle
\frac{x^3}{x^2+y^2} & if & (x,y)\ne (0,0), \\
0 & if & (x,y)=(0,0).
\end{array}\right.$
For this $f$, the composition $h=f\circ\boldsymbol\gamma$ is differentiable at $t=0$ and it is a function of $\boldsymbol\gamma'(0)$, but it does not depend linearly on $\boldsymbol\gamma'(0)$.
In particular, if $\boldsymbol\gamma'(0)=(a,b)\ne (0,0)$, then 
$h'(0)=\displaystyle\frac{a^3}{a^2+b^2}$.
 A: I claim that there is a sequence $p_n$ in $\mathbb R^2$ such that $p_n \to (0,0)$ as $n \to \infty$, but no smooth curve $\gamma$ with $\gamma(0)=0$ and $\gamma'(0) \ne 0$ passes through infinitely many $p_n$.
Namely, identifying $\mathbb R^2$ with $\mathbb C$ for convenience, take $p_n = n^{-2} \exp(2 n\pi \alpha i)$ where $\alpha$ is a quadratic irrational.  Quadratic irrationals are poorly approximated by rationals, i.e. there is $\epsilon > 0$ such that
for all positive integers $n$ and all integers $k$, $|\alpha - k/n| \ge \epsilon/n^2$.  This implies that (with a slightly different $\epsilon$), for integers $m \ne n$ we have
$$|\exp(2n \pi \alpha i) - \exp(2m \pi \alpha i)| = |\exp(2(n-m)\pi \alpha i) - 1| \ge \frac{\epsilon}{n-m}$$
Now suppose $\gamma$ is a smooth curve passing through $0$.  For convenience I'll parametrize it so that $|\gamma(t)| = |t|$ for $t$ in some interval $(-\delta, \delta)$.  Thus in this interval,
$\gamma(t) = t \exp(i\phi(t))$, where $\phi(t) = \phi_0 + O(t)$.  In particular if $\gamma(t)$ passes through
$p_n$ and $p_m$ with $m > n$, $$\frac{\epsilon}{n-m} \le \left|\exp\left(i\phi\left(\frac{1}{n^2}\right)\right) - \exp\left(i\phi\left(\frac{1}{m^2}\right)\right)\right| = O(1/n^2)$$
which is impossible.
Now define $f$ to be the indicator function of the sequence $p_n$, i.e. $f(p_n) = 1$ but $f(z) = 0$ if $z$ is not in the sequence, and
take $\alpha = 0$.  As shown above, the smooth curve $\gamma$  hits only finitely many $p_n$, so $f(\gamma(t)) = 0$ for $t$ in some interval around $0$, and of course this is differentiable at $0$ with $A = 0$.  But $f$ is not differentiable, indeed not continuous, at $0$.
