[Math] Partial derivative of piecewise function of two variables

multivariable-calculuspartial derivativeself-learning

I'm having some difficulty figuring out $\frac{\partial}{\partial x}$ of the following function:

$
f(x,y) = \left\{
\begin{array}{lr}
x^2+y^2 & : x \not= 0\\
y^4 & : x = 0
\end{array}
\right.
$

Obviously, when $x \not= 0$, $\frac{\partial}{\partial x}f(x,y)=2x$. However, when $x=0$ I'm applying the definition of partial derivative to get:

$$
\frac{\partial }{\partial x}f(0,y)=\lim_{h \to 0} \frac{h^2+{y}^2-y^4 }{h}
$$

Thus, $\frac{\partial}{\partial x}f(0,y)$ exists only if $y=0$ or $y=\pm1$, in which cases it equals $0$.

Is this correct?

Best Answer

Yes, your solution is correct.

You may want to observe that for a fixed value $y\notin \{-1,0,1\}$ the function $x\mapsto f(x,y)$ is not even continuous at $0$, so it can't be differentiable.

Related Question