# Directional derivatives of a multivariate function not defined at $(0,0)$

Let $$f(x,y)=\left\{ \begin{matrix} \frac{x^2y}{x^4+y^2} & (x,y)\neq(0,0) \\0 & (x,y)=(0,0)\end{matrix}\right.$$

It is easy to prove that the $f$ is not continuous at $(0,0)$ (doing the limit along the curve $y=x^2$).

I want to know whether it is possible to define the partial derivatives of $f$ at $(0,0)$ and find the directions $\vec v$ such that $D_vf(0,0)$ is defined.

I've calculated the partial derivatives of $f$ for $(x,y)\neq(0,0)$: $$\frac{\partial f}{\partial x}=\frac{2xy(x^4+y^2)-4yx^5}{(x^4+y^2)^2}$$ $$\frac{\partial f}{\partial y}=\frac{x^2(x^4+y^2)-2x^2y^2}{(x^4+y^2)^2}$$

Neither of them is continuous at $(0,0)$. However, if we take for example the line $y=x$, then $$\lim_{(x,y)\to (0,0)}_{x=y}\frac{\partial f}{\partial x}=-2$$ $$\lim_{(x,y)\to (0,0)}_{x=y}\frac{\partial f}{\partial y}=-1$$

So I'm tempted to say that even though the partial derivatives do not exist at the origin, $D_{(1/\sqrt2),1/\sqrt2)}f(0,0)=\frac{1}{\sqrt2}(-2,-1)$.

Is this correct? If so, how could I find all the vectors $\vec v$ such that $D_\vec v f(0,0)$ is defined

• Directional derivative should be a number, not a vector. – Braindead May 3 '14 at 2:08

I found that $$\frac{f(0 + hv) - f(0)}{h} = \frac{v_1^2 v_2}{h^2v_1^4+v_2^2}$$

Thus, $$\lim_{h \to 0} \frac{f(0 + hv) - f(0)}{h} = \left\{\begin{matrix} v_1^2/v_2 & v_2 \neq 0 \\ 0 & v_2 = 0 \end{matrix}\right.$$

So it looks like the directional derivative exists for all $v \neq 0.$

• Wow thanks I'd never thought about using the definition. Thanks so much!! – Francisco May 3 '14 at 2:10

I worked out something related to this a few days ago; first, it is up to context whether to say that there are directional derivatives or not, and, say, the book you are reading. If we take a vector $(a,b)$ and take its path $(at,bt)$ through the origin, we get $t^3 a^2 b / (t^2 (a^4 t^2 + b^2)) = t a^2 b / (a^4 t^2 + b^2)$ and this, divided by $t,$ approaches $a^2 / b$ as $t \rightarrow 0.$

Next, slightly varied example:

Before I forget, $(x^2 \pm y)^2 \geq 0, 2 x^2 |y| \leq x^4 + y^2,$ so, below, $f \leq x^{2/5} \; |y|^{1/5} /2.$

Take $$f(0,0) = 0, \; \mbox{otherwise} \; \; f(x,y) = \frac{x^{12/5} \; y^{6/5}}{x^4 + y^2}$$

Using polar coordinates, with $r$ for usual positive radius, letter $c$ for $\cos \theta,$ letter $s$ for $\sin \theta,$ we find $$f(rc,rs) = \frac{r^{18/5} c^{12/5} s^{6/5} }{r^2 (c^4 r^2 + s^2)} = r^{8/5} \left( \frac{ c^{12/5} s^{6/5} }{ c^4 r^2 + s^2} \right)$$ So, $$\frac{f(rc,rs)}{r} = r^{3/5} \left( \frac{ c^{12/5} s^{6/5} }{ c^4 r^2 + s^2} \right) \leq r^{3/5} \left( \frac{ c^{12/5} }{ s^{4/5}} \right).$$ This says that $f$ is Gateaux differentiable. Not only that, all directional derivatives are $0.$ That is, the Gateaux derivatives obey the required linear relationship, the directional derivative in the direction of a vector $\vec{u} + \vec{v}$ really is the sum of the directional derivatives in the two directions $\vec{u}$ and $\vec{v}.$

However, even this strong condition is not enough to guarantee Frechet differentiability. Consider the function along a parabolic path $x=t,y = t^2.$ The distance of this from the origin is $\sqrt {t^2 + t^4},$ which is very close to $|t|$ as $t \rightarrow 0.$ For Frechet differentiablity, we want $f(a + h) = f(a) + \nabla f \cdot h + o(|h|).$ As $a=0,$ $f(0)=0,$ and $\nabla f = 0,$ we are just asking that $f(h) /|h| \rightarrow 0.$ However, what actually happens with $h = (t,t^2)$ is $$f(t,t^2) = \frac{t^{24/5}}{2 t^4} = \frac{t^{4/5}}{2 }.$$ As mentioned, we have $|h| = \sqrt {t^2 + t^4}.$ For Frechet differentiability, we are asking whether $$\frac{ f(t,t^2)}{\sqrt {t^2 + t^4}} = \frac{t^{4/5}}{2 \sqrt {t^2 + t^4} } = \frac{1}{2 |t|^{1/5} \sqrt {1 + t^2} }$$ goes to zero as $|t| \rightarrow 0.$ With, say, $|t| \leq \sqrt 3,$ we get $\sqrt {1 + t^2} \leq 2,$ and $$\frac{ f(t,t^2)}{\sqrt {t^2 + t^4}} \geq \frac{1}{4 |t|^{1/5} },$$ so the ratio goes to infinity rather than zero. The function $f$ is not Frechet differentiable at the origin. Indeed, while continuous, it is only Holder continuous, it is not even Lipschitz.

• Wow that's a very comprehensive answer. As @Nameless pointed out, $$D_vf(0,0)=\lim_{h \to 0} \frac{f(0 + hv) - f(0)}{h} = \left\{\begin{matrix} v_1^2/v_2 & v_2 \neq 0 \\ 0 & v_2 = 0 \end{matrix}\right.$$ Since D is not linear, my function $f$ is not Gateaux differentiable, is this correct? I'm kind of new to the formalism of continuity and derivatives – Francisco May 3 '14 at 12:35
• @Francisco, as i said, sometimes terminology needs to be checked in the particular text; my guess is that a discontinuous function is not said to be Gateaux differentiable, despite having directional derivatives in all directions. Anyway, i worked this out last week and typed it, so i thought i would include it here. – Will Jagy May 3 '14 at 16:53