# Thread: Directional derivatives, not differentiable function

1. ## Directional derivatives, not differentiable function

Let $f(x,y)= \begin{cases} \frac{x|y|}{\sqrt{x^2+y^2}} \hspace{2cm} \text{if (x,y)} \neq (0,0) \\ 0 \hspace{3.1cm} \text{if (x,y) =0} \end{cases}$.
Demonstrate that $f$ has directional derivatives in all directions in $(0,0)$ but that $f$ is not differentiable in $(0,0)$.
My attempt :
I notice I can't use the theorem that states that if $f$ is differentiable in a point, then it has directional derivatives in all directions in this point.
I believe $f$ is continuous in $(0,0)$... I didn't prove it via the definition but I've failed at showing that it is not continuous. I realize that it would have been easy if $f$ wasn't continuous because $f$ could not be differentiable but this is not the case.
I'm stuck at starting the exercise.
I guess I have to use the definition to show that $f$ is not differentiable, i.e. that there does not exist a linear function $\varphi$ such that $\lim _{\vec h \to 0} \frac{f(\vec {x_0} + \vec h)-f(\vec x_0)- \varphi (\vec h)}{\| h \|}=0$.
Seems quite hard, I don't know how to start.

2. Originally Posted by arbolis
Let $f(x,y)= \begin{cases} \frac{x|y|}{\sqrt{x^2+y^2}} \hspace{2cm} \text{if (x,y)} \neq (0,0) \\ 0 \hspace{3.1cm} \text{if (x,y) =0} \end{cases}$.
Demonstrate that $f$ has directional derivatives in all directions in $(0,0)$ but that $f$ is not differentiable in $(0,0)$.
My attempt :
I notice I can't use the theorem that states that if $f$ is differentiable in a point, then it has directional derivatives in all directions in this point.
I believe $f$ is continuous in $(0,0)$... I didn't prove it via the definition but I've failed at showing that it is not continuous. I realize that it would have been easy if $f$ wasn't continuous because $f$ could not be differentiable but this is not the case.
I'm stuck at starting the exercise.
I guess I have to use the definition to show that $f$ is not differentiable, i.e. that there does not exist a linear function $\varphi$ such that $\lim _{\vec h \to 0} \frac{f(\vec {x_0} + \vec h)-f(\vec x_0)- \varphi (\vec h)}{\| h \|}=0$.
Seems quite hard, I don't know how to start.
the first part of the problem is straightforward. for the second part, suppose $f$ is differentiable at the origin. then there must exist functions $g,h : \mathbb{R}^2 \longrightarrow \mathbb{R},$ which are defined in some punctured

neighbourhood of the origin, $\lim_{(x,y)\to(0,0)}g(x,y)= \lim_{(x,y)\to(0,0)}h(x,y)=0,$ and for all (x,y) sufficiently close to (0,0) we have: $f(x,y)=f(0,0) + xf_x(0,0) + yf_y(0,0) + xg(x,y)+yh(x,y).$ since

$f(0,0)=f_x(0,0)=f_y(0,0)=0,$ we get: $\frac{x|y|}{\sqrt{x^2+y^2}}=f(x,y)=xg(x,y)+yh(x,y) .$ put $y=x$ to get $\frac{1}{\sqrt{2}}=g(x,x)+h(x,x),$ which is a contradiction because $\lim_{x\to0}g(x,x)=\lim_{x\to0}h(x,x)=0.$