Let $f:\mathbb{R}^{2} \to \mathbb{R}$ defined by $$f(x) = \begin{cases}\displaystyle\frac{x^{3}}{x^{2}+y^{2}},& (x,y)\neq (0,0)\\ 0,& (x,y) = (0,0)\end{cases}.$$ Show that $f$ is not differentiable in $(0,0)$, however, show that for every differentiable path $\lambda: (0,1) \to \mathbb{R}^{2}$, passing through origin, $f \circ \lambda$ is differentiable.
My problem is in the second part. If $\lambda: \mathbb{R} \to \mathbb{R}^{2}$ is a line pararallel to $e_{i}$ passing through $0$, $\lambda(t) = (0,0) + te_{i}$, I can show that $(f\circ \lambda)'(0) = \frac{\partial}{\partial x_{i}}f(0,0)$. I've tried to generalize this to an arbitrary path with domain $(0,1)$, but I couldnt. Can someone help me?
Denote $\lambda(t) = (\lambda_1(t), \lambda_2(t))$. Since $\lambda$ goes through the origin, we have that $\lambda(c) = (0,0)$ for some $c\in(0,1)$. We can assume that $\lambda'(c) \ne 0$ so that $\lambda$ isn't constant on a neighbourhood of the origin.
Then $(f\circ \lambda)(c) = 0$ so by definition:
$$(f\circ \lambda)'(c) = \lim_{t\to 0} \frac{(f\circ \lambda)(c+t)- (f\circ \lambda)(c)}t = \lim_{t \to 0} \frac{(f\circ \lambda)(c+t)}t= \lim_{t \to 0} \frac{\lambda_1(c+t)^3}{t(\lambda_1(c+t)^2 + \lambda_2(c+t)^2)}$$
Notice that $$\lim_{t\to 0} \frac{\lambda_1(c+t)}{t} = \lim_{t\to 0} \frac{\lambda_1(c+t)-\lambda_1(c)}{t}= \lambda_1'(c)$$ and similarly for $\lambda_2$.
Therefore $$(f\circ \lambda)'(c) = \lim_{t\to 0} \frac{\lambda_1(c+t)^3}{t^3} \cdot \frac{t^2}{\lambda_1(c+t)^2 + \lambda_2(c+t)^2}=\lim_{t\to 0} \left(\frac{\lambda_1(c+t)}{t}\right)^3 \cdot \frac1{\left(\frac{\lambda_1(c+t)}{t}\right)^2 + \left(\frac{\lambda_2(c+t)}{t}\right)^2}$$
Since $\lambda'(c) \ne 0$, the product rule for limits yields $$(f\circ \lambda)'(c) = \frac{\lambda_1'(c)^3}{\lambda_1'(c)^2 + \lambda_2'(c)^2}$$