Differentiability at the origin for a piecewise multivariable function

Let $$f: \mathbb{R}^2 \to \mathbb{R}$$ $$f = \begin{cases} \frac{x^3+y^3}{\sqrt{x^2+y^2}} & (x,y) \ne 0 \\ 0 & (x,y)=0 \\ \end{cases}$$ show that $$f$$ is differentiable at the origin.

What I did was just use the definition of a partial derivative.

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

and similarly for $$\frac{\partial}{\partial y}(0,0)$$. Is this enough to show differentiability or do I have to show something else also? For $$f$$ to be differentiable at the origin it would satisfy if it has continuous partial derivatives at the origin? The partials certainly exist, but I'm not sure about continuity here. Also I guess this could be shown by polar coordinates, however I'm not familiar with them so I would like to use other methods.

Before showing differentiability you need to show continuity in $$(0,0)$$.

We are in $$\mathbb R^2$$, so we have to select a norm, and given the denominator of $$f(x,y)$$ it seems appropriate to choose the Euclidean norm$$||(x,y)||_2=\sqrt{x^2+y^2}$$

So notice $$|x^3| and $$|y^3| when $$x,y$$ are small.

$$|f(x,y)|\le\dfrac{|x^3|+|y^3|}{\sqrt{x^2+y^2}}\le \dfrac{x^2+y^2}{\sqrt{x^2+y^2}}=\sqrt{x^2+y^2}=||(x,y)||_2\to 0$$

Therefore $$f$$ is continuous in $$(0,0)$$ and $$f(0,0)=0$$.

Now for differentiability you need to evaluate

$$\dfrac {|f(x,0)-f(0,0)|}{|x|}=\dfrac{\frac {x^3}{|x|}-0}{|x|}=\dfrac{x^3}{x^2}=|x|\to 0$$

By symmetry we have the same for $$y$$ and set $$f_x(0,0)=0$$ and $$f_y(0,0)=0$$.

Now we look at the differentiability:

\begin{align}\dfrac {|f(0+x,0+y)-\overbrace{f(0,0)}^0-\overbrace{f_x(0,0)}^0x-\overbrace{f_y(0,0)}^0y|}{||(x,y)||_2}=\dfrac{|x^3+y^3|}{x^2+y^2}\\\\\le\dfrac{x^2|x|+y^2|y|}{x^2+y^2}\le \dfrac{x^2+y^2}{x^2+y^2}\max(|x|,|y|)\end{align}

The last part is obtained via $$\max(|x|,|y|)=||(x,y)||_\infty\le||(x,y)||_2\to 0$$

• Could you elaborate on how $|x^3|<x^2$ and $|y^3|<y^2$ holds? I see this seems to hold for values near zero, but what requires $x$ and $y$ to be small? – user745970 Oct 5 '20 at 5:17
• Oh, there is no loophole ! In fact since $x\to 0$ then without loss of generality we can assume $|x|<1$, now multiply by $x^2$ this gives $|x|^3<x^2$. Maybe the choice of letters $x,y$ was confusing, what about using $h,k$ instead $f(0+h,0+k)-f(0,0)-f_x(0,0)h-f_y(0,0)k$, this is why we take them small. – zwim Oct 5 '20 at 19:13

Recall that for limits of a function $$f:\mathbb{R^n}\rightarrow\mathbb{R}$$ you must show that the limit is the same for every path through the point in question. In order for you to have differentiability at a point, you must have a directional derivative in all directions from that point. Recall that the directional derivative for an arbitrary direction $$\vec{v}$$ in Cartesian coordinates is $$\nabla_\vec{v}f = \nabla f \cdot\vec{v}$$ so this means that all you need to provide is the gradient $$\nabla f.$$ In other words, yes you are fine to just show that $$\frac{\partial f}{\partial x}$$ and $$\frac{\partial f}{\partial y}$$ exist. Equivalently the only condition necessary is that we can define a tangent plane at the point. The directions defined by $$\frac{\partial f}{\partial x}$$ and $$\frac{\partial f}{\partial y}$$ will span the tangent plane.

Also be careful about taking the limit as there are a few issues with your limit above (even though the result is the same).

• What issues do you mean? – user745970 Oct 5 '20 at 7:16
• @Nate you forgot an $h$ in the denominator of the limit when you substituted for $f(h,0)$ and also you forgot to write the limit in front of the final $h^2$ (which should be $h$). – vb628 Oct 5 '20 at 7:26