# One partial derivative is continuous (at a single point) implies differentiable?

Let $f:\mathbb{R}^2\to\mathbb{R}$ and $(p,q)\in\mathbb{R}^2$ such that both $f_x$ and $f_y$ exists at $(p,q)$.

Assume that $f_x$ is continuous at $(p,q)$.

How do we prove/disprove that $f$ is differentiable at $(p,q)$?

I do note that it is similar to this question: Continuity of one partial derivative implies differentiability

However the critical difference is that for my case, I only have $f_x$ continuous at a single point $(p,q)$, not even in a neighborhood, hence I believe that the approach of Fundamental Theorem of Calculus used in the other question cannot work.

Thanks for any help!

• To say $f_x$ is continuous at $(p,q)$ requires that $f_x$ exist in a neighborhood of $(p,q).$ It would be good to make this clear in the hypotheses. – zhw. May 20 '16 at 0:14
• See this answer. – Hans Lundmark Aug 23 '18 at 13:59

Let's take $(p,q) = (0,0).$ We can write

$$f(x,y) -f(0,0) = f(x,y) - f(0,y) + f(0,y) - f(0,0).$$

Apply the mean value theorem to see $f(x,y) - f(0,y) = f_x(c,y)\cdot x$ for some  $c = c(x,y)$ between $0$ and $x.$ Because $f_y(0,0)$ exists, $f(0,y) - f(0,0) = f_y(0,0) y +o(y).$ We now have

$$f(x,y) -f(0,0) = f_x(c,y)x + f_y(0,0)y +o(y)$$ $$= f_x(0,0 )x + f_y(0,0)y + (f_x(c,y)- f_x(0,0))x + +o(y).$$

As $(x,y) \to (0,0), (c,y) \to (0,0).$ Use the continuity of $f_x$ at $(0,0)$ to see that we then have

$$f(x,y) -f(0,0) = f_x(0,0 )x + f_y(0,0)y + o((x^2+y^2)^{1/2}).$$

This implies $Df(0,0)$ is the linear map $(x,y) \to f_x(0,0 )x + f_y(0,0)y.$

1. $f(0,y) - f(0,0) = f_y(0,0) y +o(y):$ Why? This is just one variable calculus: If $g'(0)$ exists, then $g(t) - g(0) = g'(0)t + o(t),$ simply from the definition of the derivative.

2. $(f_x(c,y)- f_x(0,0))x = o(x)$ because $f_x$ is continuous at $(0,0).$

3. Hopefully it is clear that $o(x) + o(y) = o((x^2+y^2)^{1/2}.$

• Thanks. Can you explain how did you get $o(y)$ and $o((x^2+y^2)^0.5)$? – yoyostein May 20 '16 at 1:27
• See the extra bit I've added at the end in my answer. – zhw. May 20 '16 at 23:44

f(x,y)=x+g(y),g(y)=0 if y is irrational,g(y)=y^2 if y is rational is a counter example

• Thanks! May I ask how did you think of this example? – yoyostein May 19 '16 at 16:02
• Also, why is $f$ not differentiable? – yoyostein May 19 '16 at 16:34
• That's not a counterexample: $Df(0,0)$ exists; it is the map $(x,y) \to (x,0).$ – zhw. May 19 '16 at 22:52

A simpler example: f(x,y)= 1 if xy= 0, otherwise, f(x,y)= 0. Both partial derivatives at (0, 0) are 0 but f is not differentiable at (0, 0).

• Again, this is not a counterexample. $f_x$ does not exist at points of the $y$ axis where $y\ne 0,$ so certainly $f_x$ is not continuous at $(0,0)$ – zhw. May 20 '16 at 0:11