# Differentiability of this picewise function

$$f(x,y) = \left\{\begin{array}{cc} \frac{xy}{x^2+y^2} & (x,y)\neq(0,0) \\ f(x,y) = 0 & (x,y)=(0,0) \end{array}\right.$$

In order to verify if this function is differentiable, I tried to prove it by the theorem that says that if $\frac{∂f}{∂x}$ and $\frac{∂f}{∂y}$ exist and are continuous at the point $(x_0,y_0)$, then the function is differentiable at this point. So I did:

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

so we have that the partial derivatives at point $(0,0)$ is $0$. Now, if we take the derivative at $(x,y)\neq (0,0)$ and then take the limit of it as $(x,y)\to(0,0)$, we can see if the derivatives are continuous or not. So here it is:

$$\frac{\partial f}{\partial x}(x,y) = \frac{y(y^2-x^2)}{(x^2+y^2)}$$

but

$$\lim_{(x,y)\to(0,0)} \frac{y(y^2-x^2)}{(x^2+y^2)}$$ does not exist (by wolfram alpha... but can anybody tell me an easy way to prove this limit does not exist? easier than taking the limit in different directions?), therefore the derivative is not continuous at $(0,0)$, so we can't say $f$ is differentiable at $(0,0)$, but for $(x,y)\neq (0,0)$ the function is continuous, as it is a quotient of continuous functions. So $f$ is at least differentiable at $(x,y)\neq (0,0)$.

Now, to verify differentiability at $(0,0)$ I think we must use the limit definition of differentiablity: A function is differentiable at $(0,0)$ iff: $$\lim_{(h,k)\to (0,0)} \frac{f(0+h,0+k)-f(0,0)-\frac{\partial f}{\partial x}(0,0)-\frac{\partial f}{\partial y}(0,0)}{\|(h,k)\|} = 0$$

Let's calculate this limit:

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

which I think, it's a limit that does not exist, therefore the function isn't differentiable at $(0,0)$

• Why not first try continuity? If it were discontinuous it cannot be differentiable either, and the problem is done. Aug 15, 2015 at 15:56
• @guerlando The function is not differentiable. Follow Miguel's advice Aug 15, 2015 at 16:00
• @MiguelAtencia Nice, so since differentiability implies continuity, if the function is not continuous, then suppose it is differentiable. We arrive at a contradiction, because differentiability implies continuity. Therefore the function can't be differentiable. Nice argument. So, suppose the function is continuous. Then I need to verify things as I did, rigth? Is my reasoning correct? Aug 15, 2015 at 16:04
• 1) Shouldn't the limit of differentiability have just $f(h,k)$? 2) Why do I see $xy$ in the definition of $f$ whereas $f(h,k)$ has a $h^2k^2$? Aug 15, 2015 at 16:10
• Also, in $\frac{\partial f}{\partial y}$, you should have $f(0,h)$ not $f(0+h,0)$. Aug 15, 2015 at 16:11

HINT: Take $y=ax$, $a=\textrm{const}$, and show, that $f$ is not continuous at origin.

As has been pointed out in comments, your function $f$ is not continuous at the origin, since taking the limit from $y=ax$ yields: $$\lim_{x\to0}f(x,ax)=\lim_{x\to0}\frac{xax}{x^2+a^2x^2}=\lim_{x\to0}\frac{a}{a^2+1}\frac{x^2}{x^2}=\frac{a}{a^2+1},$$ which depends on $a$.

Let me remark a couple of things. The limit you are looking for an "easy way" of computing". Well, what is easier than taking limits along directions? I can't think of anything easier than that. Can you? If I think of limits, I think of polar coordinates or asymptotics, and of taking limits along directions. What else?

The final limit you can prove not to exist by saying that for it to exist you need $\frac{hk}{h^2+k^2}$ to tend to zero, otherwise the remaining $\frac{1}{\sqrt{h^2+k^2}}$ will make it shoot to infinity, and as I have remarked above this limit does not exist. Otherwise you take limits along directions, getting that along $k=ah$ the limit is that of $\frac{ah^2}{(a^2+1)h^2\sqrt{a^2+1}\sqrt{h^2}}=\frac{a}{(a^2+1)\sqrt{a^2+1}}\frac{h^2}{h^2|h|}$, which depends on $a$, and almost always goes to infinity.

As a bonus, you can check that the function with $x^2y^2$ instead of $xy$ would have been differentiable.

A function that is discontinuous at a point cannot be differentiable at that point.

Using a polar coordinate transformation with $x=\rho \cos \phi$ and $y=\rho \sin \phi$ we have $f=\frac12 \sin 2\phi$ for $\rho \ne 0$.

Then the limit of $f$ as $\rho \to 0$ can be any number between $-1$ and $1$ by choice of $\phi$. Inasmuch as the limit does not exits, $f$ is not continuous at the origin and therefore cannot be differentiable there.