# Why Does the existence of $\frac{\partial f}{\partial x}$ not imply that $\frac{\partial f}{\partial x}$ is continuous?

For $f(x)$, the existence of $f'(x)$ implies the continuity of $f(x)$. And I am assuming that it also implies the continuity of $f'(x)$.

My question is why in a function $g(x,y)$, is the existence of $g_x$ and $g_y$ not sufficient condition for the continuity of $g_x$ and $g_y$ and hence the continuity of the function?

To me, it seems existence of $f'(x)$ and $g_x$ should either both imply continuity of $f'(x)$ and $g_x$ or not. Why are they different in each case?

• The existence of $f'(x)$ does not imply the continuity of $f'(x)$. – Michael Albanese Sep 7 '13 at 5:23
• My textbook states: "the mere existence of $g_x$ is not enough to ensure continuity of $g$"(am guessing this is because $g$ might not be defined for $x$). But then proceeds to say that: "This is different from the single-variable case where the existence of $f'$ implies continuity of $f$" – hondaman Sep 7 '13 at 5:27
• Continuity of $f$ yes, continuity of $f'$ no. – Michael Albanese Sep 7 '13 at 5:30

## 4 Answers

The counterexample that shows existence of $f'$ does not imply continuity of $f'$ is

$f(x) = \begin{cases} x^2 \sin(1/x) & x \neq 0 \\ 0 & x=0 \end{cases}$

This is different than the point of the text, this addresses a conclusion you jumped to.

The point of the text is that even if partials exist everywhere, the function could still not be continuous, due to the behavior at directions other than horizontal/vertical. Something to consider is $xy/(x^2+y^2)$ or something (good in $x$ and $y$ direction at origin but not for others).

My question is why in a function $g(x,y)$, is the existence of $g_x$ and $g_y$ not sufficient condition for the continuity of $g_x$ and $g_y$ and hence the continuity of the function?

Two variables doesn't make things better, you could take a one-variable counterexample $f(x)$ and let $g(x,y)=f(x)$. It can makes things worse, because the directional derivatives may not tell the whole story about the behavior as you approach along other directions, such as $g(x,y) = \frac{x}{x-y}$.

$f(x)$ is "smoother" than $f'(x)$, being its integral (usually). Discontinuous functions can be integrated to continuous ones, for example. To get an everywhere defined $f'$ takes more work, as in the other answer, but integration is a clue that there may not be a reason to expect derivatives to be well behaved.

Here is a funtion: $u(x,y) = 1$ if $x=0$ or $y=0$, and $u(x,y) = 0$ otherwise. Then $u_x$ and $u_y$ both exist at $(0,0)$, but certainly $u$ is not continuous there.

For the specific title question, there is another class of counterexamples: choose $h(y)$ be any discontinuous function of one variable, and let $f(x,y) = x h(y)$.