[Math] A function whose partial derivatives exist at a point but is not continuous

calculuscontinuitylimits

I am asked to determine whether or not a function can have all of its partial derivatives exist at a point but not be continuous at that point. I have tried to construct a counterexample but am unsure whether or not I have succeeded.

Consider the following function:

$$ f(x,y) = \left\{ \begin{array}{cc}
x & y=0 \\
0 & \text{otherwise}
\end{array}\right.
$$

Let $(x_0,y_0) \not= 0$ then we can compute the partials of $f$ at this point. Doing so is not difficult we just have to make sure we are careful about the partials with respect to $y$.

$$
\begin{align*}
f_x(x_0,y_0) &= \lim_{h\rightarrow 0} \frac{f(x_0+h,y_0)-f(x_0,y_0)}{h} \\
\text{if $y_0=0$} & \implies \lim_{h\rightarrow 0} \frac{x_0+h-x_0}{h} = 1 \\
\text{if $y_0\not=0$} &\implies \lim_{h\rightarrow 0} \frac{0}{h} = 0 \\
f_y(x_0,y_0) &= \lim_{h\rightarrow 0} \frac{f(x_0,y_0+h)-f(x_0,y_0)}{h} \\
\text{if $y_0=0$} &\implies \lim_{h\rightarrow 0}\frac{x_0-x_0}{h} = 0 \\
\text{if $y_0\not=0$} &\implies \lim_{h\rightarrow 0} \frac{0}h = 0
\end{align*}
$$

In all of these cases the partials of $f$ exist, however it is clear that for $x_0\not=0$ we will have that $f$ is not continuous at $(x_0,0)$. Becuase along any path where $y\not=0$ we will have that the limit is $0$, but along the path $y=0$ we obtain the limit being $x_0$. So $f$ is not continuous, but its partials exist.

Is this a valid construction? It felt kind of fishy, any advice would be appreciated.

Best Answer

You may also consider this function: $$ f(x,y) = \left\{ \begin{array}{cc} \displaystyle\frac{xy}{x^2+y^2} & (x, y)\neq (0,0) \\ 0 & \text{otherwise.} \end{array}\right. $$ If you check, you see that this function is not continuous at $(0,0)$ but both partials exist and equal zero, that is, $f_x(0,0)=f_y(0,0)=0$.