# How does this prove the function has derivatives in all directions?

This is the function I'm analyzing: $$g(x,y)= \begin{cases} \dfrac{xy(x^2-y^2)}{x^2+y^2} & \text{if } (x,y)\neq(0,0)\\ 0 & \text{if } (x,y) = (0,0)\\ \end{cases}$$

I need to prove it has derivatives in all directions at $(0,0)$, so I applied the definition using a generic vector $v=(A,B)$:

$$\lim_{h\to 0} \frac {g(0+hA;0+hB)-g(0,0)}{h}$$

and I finally got to $A^3Bh-AB^3h$

Now I'm not sure what the conclusion is. Have I proven the function has derivatives in all directions at $(0,0)$?

Also, how can I tell a function doesn't have derivatives in all directions?

EDIT: corrected my result to add the missing $h$. However, my question remains the same: how does this prove the directional derivatives exist? What would a result be if they didn't exist?

Thanks.

## 1 Answer

You should be using $$\lim_{h \to 0}\frac{f(0+hA, 0+hB)-f(0,0)}{h\sqrt{A^2+B^2}}.$$

But the main thing is you forgot a factor of $h$ when evaluating $f(0+hA,0+hB)$. The ratio is \begin{align} \frac{h^2AB(A^2-B^2)/(A^2+B^2)}{h\sqrt{A^2+B^2}} &= h \frac{AB(A^2-B^2)}{(A^2+B^2)^{3/2}} \overset{h\to 0}{\longrightarrow} 0. \end{align}

• So, if I get a number (in this case, 0) as the limit result, then it means the directional derivatives exist in all directions? And if the limit doesn't exist then they don't exist? – Floella Nov 29 '16 at 2:55
• @Anarelle For a given direction, if the limit exists, then the directional derivative exists in that direction and is equal to that limit. Then you need to check this for all directions. It just so happens that in this example, the directional derivative in all directions is the same. – angryavian Nov 30 '16 at 23:12