# Differentiability of the piecewise function $f(x,y)$

I am looking to prove that the following function is differentiable at the point $(0,0)$:

$$\large f(x,y)=\begin{cases}\dfrac{xy^2}{x^2+y^2}&;& \mbox{otherwise},\\ 0&;&\mbox{ at origin}. \end{cases}$$

From what I know so far is to prove that the following limit is equal to 0: $$\lim_{(x,y)\to(x_0,y_0)}\frac{f(x,y)-f(x_0,y_0)-\triangledown f(x_0,y_0)\begin{bmatrix}x\\y\end{bmatrix}}{||(x-x_0,y-y_0)||}$$

So there is what I have done so far:

1. Prove that the partial derivative exists at the point $(0,0)$ which would also give me the value of $\triangledown f(x_0,y_0)$:

$$\frac{df}{dx}(0,0)=\lim_{h\to0}\frac{f(0+h,0)-f(0,0)}{h}=\lim_{h\to0}\frac{f(h,0)-0}{h}=\lim_{h\to0}\frac{\frac{h(0)^2}{h^2+0^2}}{h}=\lim_{h\to0}\frac{0}{h^3}=\lim_{h\to0}0=0$$

$$\frac{df}{dy}(0,0)=\lim_{h\to0}\frac{f(0,0+h)-f(0,0)}{h}=\lim_{h\to0}\frac{f(0,h)-0}{h}=\lim_{h\to0}\frac{\frac{0(h^2)}{0^2+h^2}}{h}=\lim_{h\to0}\frac{0}{h^3}=\lim_{h\to0}0=0$$

In which they exist and are equal. This also tells me that $\triangledown f(x_0,y_0)=(0,0)$ so I continue:

1. Find the limit of the differential equation substituting the value of $\triangledown f(x_0,y_0)=(0,0)$ into the equation:

$$\lim_{(x,y)\to(0,0)}\frac{f(x,y)-f(0,0)-\triangledown f(x_0,y_0)\begin{bmatrix}x\\y\end{bmatrix}}{||(x-0,y-0)||} = \lim_{(x,y)\to(0,0)}\frac{\frac{xy^2}{x^2+y^2}-0-(0,0)\begin{bmatrix}x\\y\end{bmatrix}}{||(x-0,y-0)||} = \lim_{(x,y)\to(0,0)}\frac{\frac{xy^2}{x^2+y^2}}{\sqrt{x^2+y^2}} = \lim_{(x,y)\to(0,0)}\frac{\frac{xy^2}{x^2+y^2}}{(x^2+y^2)^\frac{1}{2}} = \lim_{(x,y)\to(0,0)}\frac{xy^2}{(x^2+y^2)^\frac{3}{2}}$$

An I am not sure where to go from there.

• You could try to compute the limit along different trajectories e.g. $y=0$, $y=x$. If they differ, the limit does not exist. – Miguel Oct 25 '17 at 12:46

Hint: Use the substitution $x = r\cos \theta$ and $y = r\sin \theta$ to obtain:
$$\dfrac{xy^2}{(x^2+y^2)^{3/2}}=\dfrac{r^3\cos \theta \sin^2 \theta}{r^3}=\cos \theta \sin^2 \theta$$
Can you see that the limit depends on the choice of the direction $\theta$?
• I don't understand this method too well. After I do all the substitutions and simplify the equation, what exactly am I looking for? What do you mean by what you said, is it that once my limit depends on the value of $\theta$ then the limit does not exist? – Omari Celestine Oct 25 '17 at 13:23
• Yes. If the limit depends on $\theta$ which it does, then the limit cannot exist. This is a necessary condition and sufficient condition for the non-existence of a limit. – MrYouMath Oct 25 '17 at 13:35
• Thank you. I also saw this somewhere else but they were using the formula $x = x_0+r\cos \theta$ and $y=y_0+r\sin \theta$. Is there a difference in using the two? – Omari Celestine Oct 25 '17 at 13:44
• If your limit is $(x,y)\to (x_0,y_0)$ then you would use the general formula. As in your case $(x_0,y_0)=(0,0) this reduces to the same substitution. – MrYouMath Oct 25 '17 at 13:48 • So for example, if$(x,y)\to(2,0)$then$x=2+r \cos \theta$and$y=r \sin \theta\$? – Omari Celestine Oct 25 '17 at 13:54