continuity and existence of all directional derivatives implies differentiable?

Solution 1:

You are correct. Consider $$ f(x, y) = \begin{cases} \frac{x^3}{x^2+y^2} & \textrm{if}\ (x,y)\neq (0,0) \\ 0 & \textrm{if}\ (x,y) = (0,0) \end{cases} $$ It's continuous at $(0, 0)$, since $$ \left|\frac{x^3}{x^2+y^2}\right|=\left|x\right|\frac{x^2}{x^2+y^2}\leq\left|x\right|\to 0 $$ for $(x,y)\to (0,0)$. Directional derivatives exist everywhere, including $(0,0)$: $$ D_{(u,v)}f(0,0) = \lim_{t\to 0}\frac{1}{t}\left(f(0+tu, 0+tv) - f(0, 0)\right)= \lim_{t\to 0}\frac{t^3u^3}{t\cdot t^2(u^2+v^2)}=\frac{u^3}{u^2+v^2} $$ But were $f$ differentiable, we'd have $$ D_{(u,v)}f=\left(D_x\,f\right)\,u + \left(D_y\,f\right)\,v $$ that is, linear with respect to $u$, $v$. As this is clearly not the case, it follows that $f$ is not differentiable at $(0,0)$, even though it's continuous and has directional derivatives.