# Directional derivatives at the origin and conditions for differentiability

Let $$f:\mathbb{R^2} \to \mathbb{R}$$ $$f(x) = \left\{ \begin{array}{ll} \frac{xy^2}{x^2+y^4}, & (x,y)\ne0 \\ 0, & (x,y) =0 \\ \end{array} \right.$$ Find the directional derivatives at the origin $$D_af(0,0)$$ for every direction $$a=(a_1,a_2)$$, when $$||a||=1.$$ Show that $$f$$ is not differentiable at the origin.

For the partials I found that $$\frac{\partial}{\partial x} = \frac{y^2(y^4-x^2)}{(x^2+y^4)^2}$$ and $$\frac{\partial}{\partial y} = \frac{2xy(x^2-y^4)}{(x^2+y^4)^2}$$

so $$\nabla f=(\frac{y^2(y^4-x^2)}{(x^2+y^4)^2}, \frac{2xy(x^2-y^4)}{(x^2+y^4)^2})$$.

The directional derivative is then $$D_af=\nabla f\cdot a = (\frac{y^2(y^4-x^2)}{(x^2+y^4)^2}, \frac{2xy(x^2-y^4)}{(x^2+y^4)^2})\cdot(a_1,a_2)$$

I'm not sure I understand what they mean by $$D_af(0,0) = \nabla f(0,0)\cdot a$$ this would lead to division by $$0$$ right?

Also for the differentiability I tried to use the definition of the partials and see if they're both continuous at the origin, but that lead to a very messy expression for instance $$\frac{\partial}{\partial x} = \frac{f(x+h,y)-f(x,y)}{h} = \frac{\frac{(x+h)y^2}{(x+h)+y^4}-\frac{xy}{x^2+y^4}}{h}$$

and this didn't seem to simplify to anything usable... What should I do here?

• Hint: $f$ is not even continuous at the origin – Ninad Munshi Sep 23 '20 at 7:25
• How can I show this? Simply looking at $x=0$ and $y=0$ separately didn't lead me to anything. Is there some kind of educated guess I should make to find directions which would lead to different limits? – user713999 Sep 23 '20 at 7:29
• The formula $\mathrm D_af=\nabla f\cdot a$ only holds if $f$ is differentiable in the first place. You shouldn't use it if you're not sure wether $f$ is differentiable (and certainly not if the exercise tells you that it's not) – Vercassivelaunos Sep 23 '20 at 8:07
• @Vercassivelaunos What other options do I have in order to find the directional derivative then? – user713999 Sep 23 '20 at 8:22
• Use its definition: $\mathrm D_af(x)=\lim_{h\to 0}\frac{f(x +ah)-f(x)}{h}$. – Vercassivelaunos Sep 23 '20 at 8:41

We are requested to find the directional derivatives at the origin that is for $$a\cdot b \neq 0$$

$$\lim_{(ah,bh)\to(0,0)} \frac{\frac{ab^2h^3}{a^2h^2+b^4h^4}-0}{h} =\lim_{(ah,bh)\to(0,0)} \frac{ab^2h^3}{a^2h^3+b^4h^5}=\frac{b^2}a$$

with $$f_x=f_y=0$$.

For differentiability just note that for $$x=y^2$$

$$\lim_{(x,y)\to(0,0)} \frac{xy^2}{x^2+y^4}=\lim_{(y^2,y)\to(0,0)} \frac{y^4}{y^4+y^4}=\frac12$$

therefore $$f(x,y)$$ is not continuous at the origin and then it is not differentiable.

• Using the definition I came up with $\lim_{h\to 0}\frac{f(x +ha, y)-f(x, 0)}{h} = \lim_{h\to 0}\frac{f(0 + ha, 0)-f(0, 0)}{h} = \lim_{h\to 0}\frac{\frac{(ha)\cdot 0}{(ha)^2 + 0} - 0}{h} = \lim_{h\to 0} \frac{0}{h^2a^2} = 0$. How did you get a different result for this? – user713999 Sep 23 '20 at 9:49
• @Daniel The definition for directinal derivatives at $(0,0)$ is $$\lim_{h\to 0}\frac{f(x +ha, y+hb)-f(0, 0)}{h}$$ – user Sep 23 '20 at 9:52