Calculate partial derivatives of $f(x,y) =\begin{cases}0, & xy\neq0 \\ 1, & xy=0\end{cases}$ Calculate the partial derivatives of:
$$ f(x,y) = \begin{cases}0,  & xy\neq0 \\ 1 ,  & xy=0\end{cases} $$
I'm not sure how to evaluate it. Can anyone give me a direction?
 A: So $xy = 0$ is only true if $x = 0$ or $y = 0$ or both, which let's us know that these lines are going to be special.
In the case where $x \ne 0$ and $y \ne 0$ (away from the special lines) then we can use the limit definition of the derivative to determine that the partial derivatives in these regions will be 0.
In the case where $x = 0$ and $y \ne 0$ then using the limit definition of the derivative, the partial with respect to $x$ is undefined due to the discontinuity.  However the partial with respect to $y$ is simply 0.
Vice versa for $y = 0$ and $x \ne 0$.
For the case of $x = 0$ and $y = 0$ the partial derivatives in both orthogonal directions will be zero by the same logic as the previous two cases.  However, in any other direction it will be undefined.
You can summarize this like this:
$$
\begin{split}
\frac{\partial f(x,y)}{\partial x} &= \begin{cases} \text{undefined}, \quad x = 0 \\
0, \quad \text{otherwise} \end{cases} \\
\frac{\partial f(x,y)}{\partial y} &= \begin{cases} \text{undefined}, \quad y = 0 \\
0, \quad \text{otherwise} \end{cases} \\
\text{For} \, a \ne 0, b \ne 0, u = ax + by:& \\
\frac{\partial f(x,y)}{\partial u} &= \begin{cases} \text{undefined}, \quad x = 0 \, \text{or} \, y = 0 \\
0, \quad \text{otherwise} \end{cases} \\
\end{split}
$$
As requested, the limit definition of the derivative is:
$$
\lim_{h \rightarrow 0} \frac{f(x + h) - f(x)}{h}
$$
Observe that in the cases when the limit is undefined, the difference $f(x + h) - f(x)$ does not get any smaller.  It should be straightforward to prove the non-existence of the limit from there.
