# Is $f(x,y)=\frac{y^3-\sin^3x}{x^2+y^2}$ differentiable at $(0,0)$?

Define $f:\mathbb{R}^2\rightarrow \mathbb{R}$ by $f(x,y)=\displaystyle \frac{y^3-\sin^3x}{x^2+y^2}$ if $(x,y)\neq (0,0)$ and $f(0,0)=0$. My question is, is $f$ differentiable at $(0,0)$?

First I guessed it is not. So, I tried to prove that $f$ is not continuous at $(0,0)$ by showing the limits are different for two different paths approaching $(0,0)$. But could not find it easily. Then I tried proving it is differentiable.

So I took $\displaystyle \lim_{(x,y)\rightarrow (0,0)}\frac{f(x,y)-f(0,0)-\nabla f(0,0).(x,y)}{\sqrt{x^2+y^2}}=\lim_{(x,y)\rightarrow (0,0)}\frac{x^3-\sin^3x}{(x^2+y^2)^{(3/2)}}$. But failed to prove that this limit is $0$.

So, how could I determine whether $f$ is differentiable at $(0,0)$?

Your approach is completely correct, but the execution is wrong. First of all, the gradient at the origin is not $(0,0)$; it should be $(-1,1)$. Look carefully at $f(x,0)$, and you'll see that $$\lim_{h\to 0} \frac{f(h,0)-f(0,0)}h = -1,$$ etc.

So we need to decide if $$\lim_{(x,y)\to (0,0)}\frac{\frac{y^3-\sin^3x}{x^2+y^2} - (-x+y)}{\sqrt{x^2+y^2}} = 0$$ or not. I'll let you work out the algebra, but you should need to determine whether $$\lim_{(x,y)\to (0,0)} \frac{xy(x-y)}{(x^2+y^2)^{3/2}} = 0;$$ what do you think?

• I have not taken that gradient at $(0,0)$ as $0$. I got that $\nabla f (0,0).(x,y)=\frac{y^3-x^3}{y^2+x^2}$. And I used it here. Is it wrong? – Extremal Dec 27 '15 at 18:19
• Oh, I see. So you didn't have a typo in what you wrote. Yes, this is wrong. $\nabla f(0,0)\cdot (x,y)$ has to end up $ax+by$ for some constants $a$ and $b$. I recommend that you compute $\partial f/\partial x (0,0)$ by the definition, etc. – Ted Shifrin Dec 27 '15 at 18:27
• ok i forgot the fact that in $\nabla f .(u,v)$, $(u,v)$ should be a unit vector. – Extremal Dec 27 '15 at 19:06
• No, no, that's not right. You're confusing some calculus textbooks' definition of the directional derivative with the definition of the derivative (as a linear map) which you're trying to apply here. – Ted Shifrin Dec 27 '15 at 19:12
• ok I think I figured out my misunderstanding – Extremal Dec 27 '15 at 19:54

So, because $\nabla f(0,0) = (-1,1)$you need to check if $$\lim_{(x,y) \to (0,0)} \frac{x^3 - (\sin(x))^3 + xy(y-x)}{(x^2 + y^2)^\frac{3}{2}} = 0$$ We can take $(x,y) \to (0,0)$ along any path, so choose convergence along the positive $x-$axis, i.e fix $y=0$ and let $x \to 0+$ We get $\lim_{x\to 0+} -(\frac{sin(x)}{x})^3 = 0$

Now, set $y = kx$ and let $x \to 0+$ The limit becomes

$\lim_{y\to 0+} \frac{x^3 - \sin^3(x)+ x^3 (k^2 - k)}{x^3(1 + k^2)^\frac{3}{2}} \neq 0$ when (say) $k = 0.5$ So, the limit does not exist and the function is not differentiable.

• No, this is not the right thing that needs to be checked. – Ted Shifrin Dec 27 '15 at 19:12
• Oops, I shouldn't calculate gradients by heart :D I will edit the post – Milen Ivanov Dec 27 '15 at 19:22