# Continuity of partial derivatives imply differentiability - but I have a counter-example

I must be doing something wrong here.

Let $f: \mathbb R^2 \to \mathbb R$ be defined as

$$f(x,y)= \begin{cases} 3x+4y, &\text{if } xy \neq 0 \\ 0, &\text{if } xy =0 \end{cases}$$

i.e. $f$ is $0$ on the $x-$axis and on the $y-$axis whereas $f(x,y)=3x+4y$ everywhere else.

I want the check the differentiability at $(0,0)$.

$\bullet$ Clearly, $\ f$ is continuous.

$\bullet$ Also, I think that $f_x=0=f_y$, the partial derivatives are just the function restricted to $x-$axis and $y-$axis. I found the picture below on the web, it gives a geometric interpretation of partial derivatives.

$\bullet$ So, the partial derivatives exist and continuous. Then, $f$ is differentiable at $(0,0)$.

$\bullet$ However, I think that $f$ is not differentiable at the origin, because... Umm... The directional derivative is not continuous. A little direction change may yield a huge change in directional derivative.

Is $f$ differentiable at the origin? What is wrong about my reasoning?

 

Edit: So, isn't $f_x$ defined as the slope of the tangent line to the curve that is given by the intersection of the graph of $f$ and the $xz-$plane? (that is the red line in the above picture)

• You have computed the partials incorrectly. When $xy\neq0$, you have $f_x(x,y)=3$ and $f_y(x,y)=4$, right? Now what if $xy=0$? – MPW Feb 22 '17 at 17:57
• Well, for some points, $f_x=3$ ... – Michael Hoppe Feb 22 '17 at 17:58

The lemma you want to disprove is:

If

1. partial derivitaves exist in a neighborhood of a point $a$
2. these partial derivatives are continous at the point $a$

Then $f$ is differentiable at the point $a$.

But the partial derivatives you calculated are only valid at the point $(0,0)$, not a neighborhood of $(0,0)$.

• No, there's no requirement for continuity in a neighborhood. The result works point wise. – zhw. Feb 22 '17 at 18:05
• You are right. Continouity in the point is enough, but existance is neccessary in a neighborhood. I clarified my answer. Without a neighborhood, the continouity of the partial derivative would not make sense. – Simon Feb 22 '17 at 18:11