If you know the solution for this exercise, I would appreciate a HINT:
Let $f:U\longrightarrow\mathbb{R}$ a function defined in an open subset $U$ of $\mathbb{R}^m$. Given $p\in U$, suppose that, for every path $\lambda:(-\epsilon,\epsilon)\longrightarrow U$, with $\lambda(0)=p$, that has a velocity vector $v=\lambda '(0)$ at $t=0$, the composed path $f\circ\lambda:(-\epsilon,\epsilon)\longrightarrow\mathbb{R}$ also has a velocity vector $(f\circ\lambda)'(0)=Tv$, where $T:\mathbb{R}^n\longrightarrow\mathbb{R}$ is linear. Prove that, under these conditions, $f$ is differentiable at $p$.
[ NOTE: I've been thinking about it for a while now. In doing so, I came up with this other question (poorly formulated, but please see my comments on the second answer): Always a differentiable path through a convergent sequence of points in $\mathbb{R}^n$? ]