# Differentiation at the origin

In a homework exercise, three functions are given, and it is asked which one of those is differentiable at the origin. The correct is answer is the third, which is indeed differentiable at the origin. My question, however, is why isn't the second one (shown below) differentiable?

$$f(x, y) = \begin{cases} \frac{xy^2}{x^2+y^2}& \Leftarrow (x, y) \ne (0, 0)\\ 0&\Leftarrow (x, y) = (0, 0) \end{cases}$$

Both the partial derivatives at the origin exist and are continuous, so $f \in C^1$, and thus it should be differentiable at all points of its domain, in particular at the origin. To help understand the problem, I plotted the function, and indeed, it is not differentiable at the origin. So I ask: where did I made a mistake? Is my assessment about the partial derivatives wrong?

Thanks in advance for the help.

-
Did you check that the partial derivatives are continuous on a neighbourhood about the origin? –  Zhen Lin May 8 '11 at 17:18

## 1 Answer

On the one hand, $\displaystyle f'_x(0,0)=\lim_{h\to 0} \frac{f(h,0)-f(0,0)}{h}=\lim_{h\to 0} \frac{0-0}{h}=0$ by the definition of derivative.

On the other hand, for $(x,y)\neq (0,0)$ we have $\displaystyle f'_x(x,y)=\frac{\partial}{\partial x}\left( \frac{xy^2}{x^2+y^2} \right) = \frac{y^2 (y^2-x^2)}{(x^2+y^2)^2}$ by the quotient rule for derivatives. In particular, for $y\neq 0$ we have $\displaystyle f'_x(0,y)=\frac{y^2 (y^2-0)}{(0+y^2)^2}=\frac{y^4}{y^4}=1$.

Now what's the conclusion if you compare $f'_x(0,y)$ (for $y \neq 0$) to $f'_x(0,0)$?

-
Sometimes the right answer stares you right in the face, and you still miss it. The partial derivative is not continuous. Thank you for the quick reply. –  wmnorth May 8 '11 at 20:18