# Directional Derivatives

• Oct 29th 2013, 11:44 AM
vidomagru
Directional Derivatives
Prove that the function

$g(x,y) = \begin{cases} \dfrac{xy^2}{x^2+y^4} & \text{if } (x,y) \neq (0,0)\\ 0 & \text{if } (x,y) = (0,0) \end{cases}$

has directional derivative at the point $(0,0)$ in any direction. Is the function $g(x,y)$ differentiable at $(0,0)$? Justify your answer.

HELP!
• Oct 29th 2013, 02:46 PM
HallsofIvy
Re: Directional Derivatives
If a function is differential at a point, then it must be continuous there. The "contrapositive" is that if a function is not differentiable at a point, then it is not differentiable there. Clearly, the limit, as you approach (0, 0) along the lines x= 0 or y= 0, is 0. Look at the limit as you approach (0, 0) along the line $x= y^2$
• Nov 1st 2013, 08:24 AM
vidomagru
Re: Directional Derivatives
Quote:

Originally Posted by HallsofIvy
If a function is differential at a point, then it must be continuous there. The "contrapositive" is that if a function is not differentiable at a point, then it is not differentiable there. Clearly, the limit, as you approach (0, 0) along the lines x= 0 or y= 0, is 0. Look at the limit as you approach (0, 0) along the line $x= y^2$

Ok so here is the solution I have come up with:

Problem:
Prove that the function

$g(x,y) = \begin{cases} \dfrac{xy^2}{x^2+y^4} & \text{if } (x,y) \neq (0,0)\\ 0 & \text{if } (x,y) = (0,0) \end{cases}$

has directional derivative at the point $(0,0)$ in any direction. Is the function $g(x,y)$ differentiable at $(0,0)$? Justify your answer.

Solution:
$f(x,y)$ is not continuous at $(0,0)$ therefore it is not differentiable at $(0,0)$. We will show that the directional derivative at the point $(0,0)$ exists in any direction. Let $U = (u_1,u_2) \in \mathbb{R}^3, ||U||=1$ and $\vec{0} = (0,0)$.Then we have:

$\lim_{t \to 0} \frac{f(\vec{0} + tU) - f(\vec{0})}{t} = \lim_{t \to 0} \frac{t^3u_1u_2^2}{t(t^2u_1^2 + t^4u_2^4} = \lim_{t \to 0} \frac{u_1u_2^2}{u_1^2 + t^2u_2^4} = \begin{cases} 0 & \text{if} u_2 = 0 \\ \dfrac{u_1^2}{u_2} & \text{if} u_2 \neq 0 \end{cases}$.

Therefore $D_0f((u_1,0)) = 0$ and $D_0f((u_1,u_2)) = \dfrac{u_1^2}{u_2}$ when $u_2 \neq 0$. So the directional derivative exists at $(0,0)$ in any direction.

Does that make sense, and is it sufficient?
• Nov 1st 2013, 09:40 AM
SlipEternal
Re: Directional Derivatives
You did not show that the function is not continuous at $(0,0)$, but you did show that the derivative does not exist. You mixed up the subscripts for your $u$'s. The result when $u_2 \neq 0$ should be $\dfrac{u_2^2}{u_1}$. Your function was $g(x,y)$, not $f(x,y)$. Also, I don't understand the notation: $D_0f((u_1,0)) = 0$. To me, that reads the derivative with respect to zero at the point $(u_1,0)$. Since zero is a constant, not a variable, I don't think that derivative is well-defined. Once you show that the limit changes as you approach $(0,0)$ from different directions, you have sufficiently showed that the derivative does not exist at $(0,0)$.
• Nov 1st 2013, 10:37 AM
vidomagru
Re: Directional Derivatives
Quote:

Originally Posted by SlipEternal
You did not show that the function is not continuous at $(0,0)$, but you did show that the derivative does not exist. You mixed up the subscripts for your $u$'s. The result when $u_2 \neq 0$ should be $\dfrac{u_2^2}{u_1}$. Your function was $g(x,y)$, not $f(x,y)$. Also, I don't understand the notation: $D_0f((u_1,0)) = 0$. To me, that reads the derivative with respect to zero at the point $(u_1,0)$. Since zero is a constant, not a variable, I don't think that derivative is well-defined. Once you show that the limit changes as you approach $(0,0)$ from different directions, you have sufficiently showed that the derivative does not exist at $(0,0)$.

Sorry it should read $D_{\vec{0}} g(u_1,0)) = 0$ is supposed to refer to the directional derivative when $u_2 = 0$. I am trying to show that the directional derivative exists at $(0,0)$ in any direction using the definition that for any unit vector $\vec{u}$, $D_{\vec{u}} f(\vec{p}) = \lim_{h \to 0} \dfrac{f({\bf{p}} + h\vec{u}) - f(\bf{p})}{h}$. This limit, if it exists, is called the directional derivative of $f$ at p in the direction $\vec{u}$.

$g(x,y)$ is continuous when the denominator is nonzero. We can find when the denominator is zero by setting $x^2+y^4 = 0$. This can only happen when $(x,y) = (0,0)$, so $g(x,y)$ is continuous away from the origin, i.e., it has a discontinuity at $(0,0)$.
• Nov 1st 2013, 10:41 AM
SlipEternal
Re: Directional Derivatives
Well, $\vec{0}$ is not a unit vector, so $D_{\vec{0}}g(u_1,0)$ is not defined. Perhaps you meant $D_{(\pm 1,0)}g(0,0) = D_{(0,\pm 1)}g(0,0) = 0$ but $D_{(u_1,u_2)}g(0,0) \neq 0$ when $u_1 \neq 0$ and $u_2\neq 0$.
• Nov 1st 2013, 10:53 AM
vidomagru
Re: Directional Derivatives
Quote:

Originally Posted by SlipEternal
Well, $\vec{0}$ is not a unit vector, so $D_{\vec{0}}g(u_1,0)$ is not defined. Perhaps you meant $D_{(\pm 1,0)}g(0,0) = D_{(0,\pm 1)}g(0,0) = 0$ but $D_{(u_1,u_2)}g(0,0) \neq 0$ when $u_1 \neq 0$ and $u_2\neq 0$.

I think I actually mean $D_{{\bf{U}}}g(u_1,0)$. In the definition I gave, ${\bf{p}} = (0,0)$.
• Nov 1st 2013, 10:58 AM
SlipEternal
Re: Directional Derivatives
Quote:

Originally Posted by vidomagru
I think I actually mean $D_{{\bf{U}}}g(u_1,0)$. In the definition I gave, ${\bf{p}} = (0,0)$.

So, you are calculating the directional derivative at the point $(u_1,0)$, not at $\vec{p} = (0,0)$.
• Nov 1st 2013, 11:59 AM
vidomagru
Re: Directional Derivatives
Quote:

Originally Posted by SlipEternal
So, you are calculating the directional derivative at the point $(u_1,0)$, not at $\vec{p} = (0,0)$.

Ok I think I am calculating correctly but with bad notation, let me redo this a bit:

$g(x,y)$ is continuous when the denominator is nonzero. We can find when the denominator is zero by setting $x^2+y^4 = 0$. This can only happen when $(x,y) = (0,0)$, so $g(x,y)$ is continuous away from the origin, i.e., it has a discontinuity at $(0,0)$. Since $g(x,y)$ is not continuous at $(0,0)$ therefore it is not differentiable at $(0,0)$.

Now we will show that the directional derivative at the point $(0,0)$ exists in any direction. Let $U = \in \mathbb{R}^3, ||U||=1$ and $\vec{0} = (0,0)$. Using the definition:

For any unit vector $\vec{u}$, $D_{\vec{u}} f(\vec{p}) = \lim_{h \to 0} \dfrac{f({\bf{p}} + h\vec{u}) - f(\bf{p})}{h}$. This limit, if it exists, is called the directional derivative of $f$ at p in the direction $\vec{u}$, we can write:

$\lim_{h \to 0} \frac{g(\vec{0} + hU) - g(\vec{0})}{h} = \lim_{h \to 0} \frac{g(hU)}{h} = \lim_{h \to 0} \frac{g(hu_1, hu_2)}{h} = \lim_{h \to 0} \frac{h^3u_1u_2^2}{h(h^2u_1^2 + h^4u_2^4)} = \lim_{h \to 0} \frac{u_1u_2^2}{u_1^2 + h^2u_2^4} = \begin{cases} 0 & \text{if } u_2 = 0 \\ \dfrac{u_2^2}{u_1} & \text{if } u_2 \neq 0 \end{cases}$.

So we can write $D_{\bf{U}} g(\vec{0}) = \lim_{h \to 0} \frac{g(\vec{0} + hU) - g(\vec{0})}{h} = \begin{cases} 0 & \text{if } u_2 = 0 \\ \dfrac{u_2^2}{u_1} & \text{if } u_2 \neq 0 \end{cases}$. Thus all directional derivatives of $g(x,y)$ exist.
• Nov 1st 2013, 12:17 PM
SlipEternal
Re: Directional Derivatives
$g(x,y)$ does not have a denominator when $x=y=0$. It is defined to be zero at $(0,0)$. So, while it may be true that the function is not continuous at $(0,0)$, you have not proven it. It is difficult to show that a multivariable function is discontinuous at a point, but not impossible. If you prove that the function is not continuous at $(0,0)$, then you are done. You don't need to check directional derivatives at all. But, if you are not going to prove that, then you should remove the statement that it is discontinuous at that point.

You show that while the directional derivatives exist, they are not equal. So, the derivative does not exist.
• Nov 1st 2013, 12:43 PM
SlipEternal
Re: Directional Derivatives
If you want to show that $g$ is not continuous at $(0,0)$, you can do that. To show that the function is continuous, you would want to show that $\lim_{\stackrel{x \to 0}{y \to 0}} g(x,y) = g(0,0)$. So, as HallsofIvy suggested consider $\lim_{y \to 0} g(y^2,y)$. As $y \to 0$, $(y^2,y) \to (0,0)$, so if this limit does not yield 0, then $g(x,y)$ is not continuous at $(0,0)$. If it is not continuous, then the derivative does not exist. Note: what you are doing above is the same as single variable calculations for derivative. You can show $\lim_{h\to 0^-} \dfrac{f(x+h) - f(x)}{h}$ and $\lim_{h \to 0^+} \dfrac{f(x+h) - f(x)}{h}$ both exist, but if they are not equal, then the derivative does not exist. Those would be the single variable directional derivatives. Anyway, to show that $g(x,y)$ is not continuous at $(0,0)$, we have:

\begin{align*}\lim_{y \to 0} g(y^2,y) & = \lim_{y \to 0} \dfrac{y^4}{y^4+y^4} \\ & = \lim_{y \to 0} \dfrac{y^4}{2y^4} \\ & = \dfrac{1}{2} \neq 0 = g(0,0)\end{align*}

So, you don't need to check any directional derivatives at all.