# Determine differentiability for a piecewise function

Let $$f:S\mapsto\mathbb{R}$$ where $$S=S^\circ\subseteq \mathbb{R},x\in S$$

$$\exists m\in\mathbb{R},s.t.\lim_{h\to0}\frac{f(x+h)-f(x)-m\cdot h}{\Vert h\Vert}=0$$

$$\Leftrightarrow\nabla f(x)=m$$

Then $$f$$ is differentiable at $$x$$ with gradient $$m$$

Let $$f:\mathbb{R}^2\mapsto\mathbb{R}$$

$$f(x,y)= \begin{cases} \frac{y^3-x^8y}{x^6+y^2}& (x,y)\neq(0,0)\\\\ 0& (x,y)=(0,0) \end{cases}$$

Is $$f$$ differentiable at $$(0,0)?$$

Since for all $$x,y\text{ in }\mathbb{R},f(x,0)=0\text{ and }f(0,y)=y$$

Then if $$\nabla f(0)\text{ exists}$$ implies $$\nabla f(0)=(0,1)$$

That if the following limit exists and equals to $$0$$, $$f$$ must be differentiable at $$(0,0)$$

\begin{align} & \lim_{(x,y)\to(0,0)}\frac{f(x,y)-f(0,0)-(0,1)\cdot(x,y)}{\sqrt{x^2+y^2}}\\ & =\lim_{(x,y)\to(0,0)}\frac{f(x,y)-y}{\sqrt{x^2+y^2}} \\ & =\lim_{(x,y)\to(0,0)}\frac{\frac{y^3-x^8y}{x^6+y^2}-y}{\sqrt{x^2+y^2}} \\ & =\lim_{(x,y)\to(0,0)}-\frac{\left(yx^8+yx^6\right)\sqrt{y^2+x^2}}{\left(y^2+x^6\right)\left(y^2+x^2\right)}\\ & =\lim _{\left(x,\:y\right)\to \left(0,\:0\right)}-\frac{y}{\sqrt{y^2+x^2}}\cdot \frac{x^8+x^6}{y^2+x^6}\\ \end{align} $$\text{Update:}$$

$$\text{Let x=r\cos(\theta),y=r\sin(\theta) we have}$$ \begin{align} & =\lim _{r\to \:0}-\frac{r\sin \left(θ\right)}{\sqrt{\left(r\sin \left(θ\right)\right)^2+\left(r\cos \left(θ\right)\right)^2}}\cdot \frac{\left(r\cos \left(θ\right)\right)^8+\left(r\cos \left(θ\right)\right)^6}{\left(r\sin \left(θ\right)\right)^2+\left(r\cos \left(θ\right)\right)^6}\\ & =-\sin \left(θ\right)\cdot \lim _{r\to \:0}\frac{r}{\sqrt{\left(r\sin \left(θ\right)\right)^2+\left(r\cos \left(θ\right)\right)^2}}\cdot \lim _{r\to \:0}\frac{\left(r\cos \left(θ\right)\right)^8+\left(r\cos \left(θ\right)\right)^6}{\left(r\sin \left(θ\right)\right)^2+\left(r\cos \left(θ\right)\right)^6}\\ & \neq-\sin \left(θ\right)\cdot\sqrt{\lim _{r\to \:0}\frac{r^2}{\left(r\sin \left(θ\right)\right)^2+\left(r\cos \left(θ\right)\right)^2}}\cdot\lim _{r\to \:0}\frac{r^4\cos ^6\left(θ\right)\left(r^2\cos ^2\left(θ\right)+1\right)}{\sin ^2\left(θ\right)+r^4\cos ^6\left(θ\right)}\\ & =-\sin(\theta)\cdot \text{d.n.e}\cdot0=\text{d.n.e} \end{align}

Therefore $$f$$ isn't differentiable at $$(0,0).\tag*{\square}$$

Is this calculation correct $$?$$

Any help would be appreciated.

• As you can see from my answer limit doesn’t exist. In your update the derivation for the limit equal to zero is not correct. – user Oct 24 '19 at 23:48
• Notably $$\sqrt{\frac{r^2}{\left(r\sin \left(θ\right)\right)^2+\left(r\cos \left(θ\right)\right)^2}}=1$$ – user Oct 24 '19 at 23:50
• And what about here for $\sin \theta=0$ $$\lim _{r\to \:0}\frac{r^4\cos ^6\left(θ\right)\left(r^2\cos ^2\left(θ\right)+1\right)}{\sin ^2\left(θ\right)+r^4\cos ^6\left(θ\right)}$$ – user Oct 24 '19 at 23:53
• @user yes, i just notice that, the $1$ is the right limit, and i shouldn't use equal sign there, which the left limit is $-1$, so the first limit does not exists, thanks! – Manx Oct 25 '19 at 2:06

We have that limit doesn't exist

$$-\frac{\left(yx^8+yx^6\right)\sqrt{y^2+x^2}}{\left(y^2+x^6\right)\left(y^2+x^2\right)} =-\frac{y}{\sqrt{y^2+x^2}}\cdot \frac{x^8+x^6}{y^2+x^6}$$

indeed

$$-\frac{y}{\sqrt{y^2+x^2}}=-\sin \theta$$

and as $$y=t$$ and $$x=t\to 0$$

$$\frac{x^8+x^6}{y^2+x^6}=\frac{t^8+t^6}{t^2+t^6}\to 0$$

but as $$y=t^3$$ and $$x=t\to 0$$

$$\frac{x^8+x^6}{y^2+x^6}=\frac{t^8+t^6}{2t^6}\to \frac12$$