# Show that $\frac{x^3}{x^2+y^2}$ is not differentiable at $(0,0)$, even though all directional derivatives exist

Consider the function : $$f: \mathbb{R}^2 \rightarrow \mathbb{R} , (x,y) \mapsto \begin{cases} 0 & \text{for } (x,y)=(0,0) \\ \frac{x^3}{x^2+y^2} & \text{for } (x,y) \neq (0,0) \end{cases}$$

Show that $f$ not differentiable at $(0,0)$ but all directional derivatives exist.

I don't know how to tackle this problem. Can someone give some hints or solve the problem? Thanks :)

Take some (unitary) $$u$$. Then show that $$f'(\vec 0;u)=\lim_{h\to 0 }\frac{f(h\cdot u)-f(\vec 0)}h$$ always exists for any choice of $$u$$. You'll be dealing with $$\mathop {\lim }\limits_{h \to 0} \frac{\frac{{{h^3}u_1^3}}{{{h^2}(u_1^2 + u_2^2)}}}{h}$$

where $$u=(u_1,u_2)$$.

If your function were differentiable at the origin, then we would have $$f'(\vec 0)(u)=f'(\vec 0;u)$$ where the right hand side is the directional derivative at $$\vec 0$$ with direction $$u$$, and the left hand side is the total derivative at $$(0,0)$$ at evaluated at $$u$$. Now, $$f'(\vec 0)$$ would be linear, so $$f'(\vec 0)(1,1)=f'(\vec 0)(0,1)+f'(\vec 0)(1,0)$$

The right hand side is just the partial derivatives at the origin, which gives $$0+1=1$$. What does the left hand side give? Remember it is just the directional derivative at $$\vec 0$$ with direction $$(1,1)$$.

• but how you gonna prove that $f$ is not differentiable at zero. By definition $\displaystyle \lim_{||(a,b)||\rightarrow 0}\frac{||f(a,b)||}{||(a,b)||}=\left( \frac{a}{\sqrt{a^2+b^2}} \right)\not=0$ I am stuck at this point.? – Cancan Apr 25 '13 at 2:17
• @Cancan I haven't addressed the question of non-differentiability, just that of the existence of all directional derivatives, but looking at this plot you should help – Pedro Tamaroff Apr 25 '13 at 2:32
• @cancan I added something. – Pedro Tamaroff Apr 25 '13 at 3:17

Since someone has already shown that all directional derivatives exist, I will only argue why $$f$$ is not differentiable at $$0$$.

The Jacobi Matrix $$A:=Df(0,0)=(1,0)$$. Therefore if $$f$$ is differentiable $$\lim_{|\epsilon| \to 0}\frac{f(0+\epsilon)-f(0)-A\epsilon}{|\epsilon|}=0 .$$ Since $$f(0)=0$$ and $$A=(1,0)$$ this is equivalent to, $$\lim_{|\epsilon| \to 0}\frac{f(\epsilon)-(1,0)\epsilon}{|\epsilon|}=0$$ Let $$(x_k)_{k \in \mathbb{N}} \subset \mathbb{R}^2$$ be a series with $$x_k=(a_k,b_k)$$ and $$|x_k| \to 0$$ for $$(k \to \infty)$$. Therefore if $$f$$ is differentiable.

$$0=\lim_{k \to \infty}\frac{f(x_k)-(1,0)x_k}{|x_k|}=\lim_{k \to \infty}\frac{\frac{a_k^3}{a_k^2+b_k^2}-a_k}{\sqrt{a_k^2+b_k^2}}= \lim_{k \to \infty}\frac{-a_k b_k^2}{\sqrt{a_k^2+b_k^2}^3}$$

If we set $$x_k=(a_k,b_k)= (\frac {1}{k\sqrt{3}},\frac{\sqrt{2}}{k\sqrt{3}})$$ then $$|x_k|=\sqrt{a_k^2+b_k^2}=1/k$$ and

$$\lim_{k \to \infty}\frac{-a_k b_k^2}{\sqrt{a_k^2+b_k^2}^3}=\lim_{k \to \infty}\frac{-\frac {1}{k\sqrt{3}} \frac{2}{3k^2}}{(1/k)^3}=\lim_{k \to \infty}-k^3\frac{2}{k^3\sqrt{3}^3}=\frac{-2}{\sqrt{3}^3}\neq 0$$ We get a contradiction therefore $$f$$ is not differentiable in 0.

• How did you figure out the correct $a_k$ and $b_k$??? – EternusVia May 10 '19 at 15:45
• Ah, it works just as well for $(a_k,b_k)=(\frac{1}{n},\frac{1}{n})$, or any power of $n$ in the denominator. – EternusVia May 10 '19 at 15:50
• I think I chose the series like this so that |xk|=1/k. But yes most series should work – A. P May 10 '19 at 15:52

The directional derivative is $$\lim_{t\to0} \frac{f((0,0)-(th_1,th_2)) - f(0,0)}{t}= \lim_{t\to 0} \frac{(th_1)^3}{t(t^2 h_1^2 + t^2 h_2^2)} = \frac{h_1^3}{h_1^2+h_2^2}$$

If we set $$h=(1,0)$$ and $$h = (0,1)$$, we get $$\partial f/\partial x$$ and $$\partial f/\partial y$$ respectively. So $$Df(0,0) = (1,0).$$

$$\lim_{h \to 0} \frac{f(0 + h) - f(0) - Df(0,0)h}{|h|} = \lim_{h \to 0} \frac{ \frac{h_1^3}{h_1^2 + h_2^2} - h_1 }{\sqrt{h_1^2 + h_2^2}} = \lim_{h \to 0} = \frac{-h_2^2h_1}{(h_1^2 + h_2^2)^{3/2}}.$$

If you let $$h_1 = h_2m$$ where $$m \in \mathbb{R}$$, then you can show this limit doesn't exist. Therefore $$f$$ is not differentiable.

When $$x>0$$, then $$df\ \frac{(1,k)}{\sqrt{1+k^2}} = \lim_x\ \frac{ f(x,kx) -0 }{ |(x,kx)|} = \frac{1}{\sqrt{1+k^2}^3}$$

Hence we consider directional derivatives at $$(0,0)$$ : $$df\ (1,0)=1\geq df\ \frac{(1,k)}{\sqrt{1+k^2}} \geq df\ (0,1)=0$$

If $$f$$ is differentiable at $$(0,0)$$, then directional derivative is given by the formula $$df\ v ={\rm grad}\ f\cdot v$$.

Hence $${\rm grad}\ f = (1,0)$$ so that $$(1,0) \cdot \frac{(1,k)}{\sqrt{1+k^2} } \neq df\ \frac{(1,k)}{\sqrt{1+k^2}} = \frac{1}{\sqrt{1+k^2}^3}$$