# Is f differentiable in (0,0) ?

#### mathmari

##### Well-known member
MHB Site Helper
Hey!!

We consider the function\begin{align*}f:\mathbb{R}^2 &\rightarrow\mathbb{R} \\ (x,y)&\mapsto \begin{cases}\frac{x^3}{x^2+y^2} & \text{ if } (x,y)\neq(0,0) \\ 0 & \text{ if } (x,y)=(0,0) \end{cases}\end{align*}
(a) Show that all directional derivatives of $f$ in $(0,0)$ exist.
(b) Is $f$ differentiable in $(0,0)$ ?

For (a) Ihave donethe following:
$$\partial_vf(0,0)=\lim_{h\rightarrow 0}\frac{f(hv_1, hv_2)-f(0,0)}{h}=\lim_{h\rightarrow 0}\frac{v_1^3}{v_1^2+v_2^2}=\frac{v_1^3}{v_1^2+v_2^2}\in \mathbb{R}$$ The limit exists for all $(v_1,v_2)\neq (0,0)$ and so all directional derivatives of $f$ in $(0,0)$ exist.

Is that correct?

For (b) I thought to find a sequence $a_n$ that converges to $(0,0)$ such that $f(a_n)$ doesn't converge to $0$, but I haven't found yet such an examle. Can we maybe not find such an example because $f$ is differentiable in $(0,0)$ ?

#### Klaas van Aarsen

##### MHB Seeker
Staff member
For (a) Ihave donethe following:
$$\partial_vf(0,0)=\lim_{h\rightarrow 0}\frac{f(hv_1, hv_2)-f(0,0)}{h}=\lim_{h\rightarrow 0}\frac{v_1^3}{v_1^2+v_2^2}=\frac{v_1^3}{v_1^2+v_2^2}\in \mathbb{R}$$ The limit exists for all $(v_1,v_2)\neq (0,0)$ and so all directional derivatives of $f$ in $(0,0)$ exist.
Hey mathmari !!

Looks correct to me.

For (b) I thought to find a sequence $a_n$ that converges to $(0,0)$ such that $f(a_n)$ doesn't converge to $0$, but I haven't found yet such an examle. Can we maybe not find such an example because $f$ is differentiable in $(0,0)$ ?
How is it relevant whether $f(a_n)$ converges to $0$ or not?
We're not checking continuity are we?
Or are you trying to prove that $f$ is not continuous in $(0,0)$, and therefore it is not differentiable either?
Either way, $f$ is continuous in $(0,0)$, so that won't work.

Shouldn't we check instead whether $\frac{\|f(a_n)-f(0,0)-\nabla f(0,0)\cdot a_n\|}{\|a_n\|}$ converges to $0$ or not?

Note that since the directional derivatives exist, the partial derivatives exist as well, and $\nabla f(0,0)$ is well defined.

Last edited:

#### Country Boy

##### Well-known member
MHB Math Helper
Hey!!

We consider the function\begin{align*}f:\mathbb{R}^2 &\rightarrow\mathbb{R} \\ (x,y)&\mapsto \begin{cases}\frac{x^3}{x^2+y^2} & \text{ if } (x,y)\neq(0,0) \\ 0 & \text{ if } (x,y)=(0,0) \end{cases}\end{align*}
(a) Show that all directional derivatives of $f$ in $(0,0)$ exist.
(b) Is $f$ differentiable in $(0,0)$ ?

For (a) Ihave donethe following:
$$\partial_vf(0,0)=\lim_{h\rightarrow 0}\frac{f(hv_1, hv_2)-f(0,0)}{h}=\lim_{h\rightarrow 0}\frac{v_1^3}{v_1^2+v_2^2}=\frac{v_1^3}{v_1^2+v_2^2}\in \mathbb{R}$$ The limit exists for all $(v_1,v_2)\neq (0,0)$ and so all directional derivatives of $f$ in $(0,0)$ exist.

Is that correct?[/tex]
Except that you jumped over the most important point- showing that the limit does exist!

I would have done this: every line through (0, 0) (except the vertical line) can be written y= mx for some constant m. Then $$\frac{x^3}{x^2+ y^2}= \frac{x^3}{x^3+ m^3x^2}= \frac{x^3}{x^2(m^2+ 1}= \frac{1}{m^2+ 1} x$$.
Hey!!

We consider the function\begin{align*}f:\mathbb{R}^2 &\rightarrow\mathbb{R} \\ (x,y)&\mapsto \begin{cases}\frac{x^3}{x^2+y^2} & \text{ if } (x,y)\neq(0,0) \\ 0 & \text{ if } (x,y)=(0,0) \end{cases}\end{align*}
(a) Show that all directional derivatives of $f$ in $(0,0)$ exist.
(b) Is $f$ differentiable in $(0,0)$ ?

For (a) Ihave donethe following:
$$\partial_vf(0,0)=\lim_{h\rightarrow 0}\frac{f(hv_1, hv_2)-f(0,0)}{h}=\lim_{h\rightarrow 0}\frac{v_1^3}{v_1^2+v_2^2}=\frac{v_1^3}{v_1^2+v_2^2}\in \mathbb{R}$$ The limit exists for all $(v_1,v_2)\neq (0,0)$ and so all directional derivatives of $f$ in $(0,0)$ exist.

Is that correct?
It's good except that you have skipped over the important part- showing that the limit does exist. You just stated that it did.

I would have done this: any line (except a vertical line) through the origin can be written y= mx for some constant m. Then $$f(x,y)= f(x,mx)= \frac{x^3}{x^2+ m^2x^2}= \frac{x^3}{x^2(m^2+ 1)}= \frac{1}{m^2+ 1}x$$. So the difference quotient, along that line is $$\frac{\frac{1}{m^2+ 1}h}{h}= \frac{1}{1+ m^2}$$. The directional derivative is the limit of that as h goes to 0, $$\frac{1}{m^2+ 1}$$ which certainly exists!

(Along the vertical line through the origin, x= 0 so the function is $$\frac{0^3}{0^2+ y^2}= 0$$, a constant so the derivative is 0.)

For (b) I thought to find a sequence $a_n$ that converges to $(0,0)$ such that $f(a_n)$ doesn't converge to $0$, but I haven't found yet such an examle. Can we maybe not find such an example because $f$ is differentiable in $(0,0)$ ?

For (b) I thought to find a sequence $a_n$ that converges to $(0,0)$ such that $f(a_n)$ doesn't converge to $0$, but I haven't found yet such an examle. Can we maybe not find such an example because $f$ is differentiable in $(0,0)$ ?

#### mathmari

##### Well-known member
MHB Site Helper
Shouldn't we check instead whether $\frac{\|f(a_n)-f(0,0)-\nabla f(0,0)\cdot a_n\|}{\|a_n\|}$ converges to $0$ or not?

Note that since the directional derivatives exist, the partial derivatives exist as well, and $\nabla f(0,0)$ is well defined.
We have that (ifI have doneall calculations correctly) $$\frac{\|f\left ((0,0)+(h_1, h_2)\right )-f(0,0)-\nabla f(0,0)\cdot (h_1,h_2)\|}{\|h\|}=\frac{\|f\left (h_1, h_2\right )-0-(1,0)\cdot (h_1,h_2)\|}{\sqrt{h_1^2+h_2^2}}=\frac{\|f\left (h_1, h_2\right )-h_1\|}{\sqrt{h_1^2+h_2^2}}=\frac{|h_1|\cdot h_2^2}{\sqrt{h_1^2+h_2^2}^3}$$ How do we calculate the last limit?

#### mathmari

##### Well-known member
MHB Site Helper
So can we not just say, at the way I did it, that for every $(v_1, v_2)\neq (0,0)$ the limit is a real number and so it exists?

#### Klaas van Aarsen

##### MHB Seeker
Staff member
$$\frac{\|f\left ((0,0)+(h_1, h_2)\right )-f(0,0)-\nabla f(0,0)\cdot (h_1,h_2)\|}{\|h\|}=\frac{\|f\left (h_1, h_2\right )-0-(1,0)\cdot (h_1,h_2)\|}{\sqrt{h_1^2+h_2^2}}=\frac{\|f\left (h_1, h_2\right )-h_1\|}{\sqrt{h_1^2+h_2^2}}=\frac{|h_1|\cdot h_2^2}{\sqrt{h_1^2+h_2^2}^3}$$ How do we calculate the last limit?
Can we find a path $(h_1(t), h_2(t))$ such that the limit is not $0$?

#### mathmari

##### Well-known member
MHB Site Helper
Can we find a path $(h_1(t), h_2(t))$ such that the limit is not $0$?
For $h_1=h_2$ we get $$\frac{|h_1|\cdot h_1^2}{\sqrt{h_1^2+h_1^2}^3}=\frac{|h_1|^3}{\sqrt{2h_1^2}^3}=\frac{|h_1|^3}{\sqrt{2}\cdot |h_1|^3}=\frac{1}{\sqrt{2}}\rightarrow \frac{1}{\sqrt{2}}\neq 0$$ Since this doesn't converge to $0$, it follows that $f$ is not differentiable.

Is that correct? Or can we not just take $h_1=h_2$ ?

#### Klaas van Aarsen

##### MHB Seeker
Staff member
For $h_1=h_2$ we get $$\frac{|h_1|\cdot h_1^2}{\sqrt{h_1^2+h_1^2}^3}=\frac{|h_1|^3}{\sqrt{2h_1^2}^3}=\frac{|h_1|^3}{\sqrt{2}\cdot |h_1|^3}=\frac{1}{\sqrt{2}}\rightarrow \frac{1}{\sqrt{2}}\neq 0$$ Since this doesn't converge to $0$, it follows that $f$ is not differentiable.
All correct.

MHB Site Helper