I'm struggling with this problem from my book Curso de Analise Vol. 2 by Elon Lages Lima.
Let $U\subseteq \mathbb{R}^n$ be an open set, $a\in U$ and $f:U\to \mathbb{R}$ with the following property: for every $v\in \mathbb{R}^n$ and every path and $g:(-\epsilon,\epsilon)\to U$ with $g(0)=a$ and $g'(0)=v$ the composite map $f\circ g:(-\epsilon,\epsilon)\to R$ satisfies $(f\circ g)'(0)=T(v)$ where $T:\mathbb{R}^n\to\mathbb{R}$ is a fixed linear transformation. Prove that $f$ is differentiable at $a$.
It's clear that one must have $f'(a)=T$ so one has to prove \begin{equation} \tag 0\lim_{v\to 0}\frac{f(a+v)-f(a)-T(v)}{|v|}=0 \end{equation}
I can't think of any path other than $t\mapsto a+tv$ but then I'm not using the hypothesis to its full strength. I also tried a proof by negating that limit and trying to construct a path from there, but didn't succeed.
How do I approach the problem? Any hints?