Show that a function has directional derivatives at a point but is not differentiable there. Need help understanding proof
I simply need help understanding this example.
QUESTION: Show that the function $$ g(x) = \begin{cases} \frac{xy^2}{x^2 +y^4}, & \text{if $(x,y) \neq 0$}\\ 0, & \text{if $(x,y) = (0,0)$} \\ \end{cases} $$
has directional derivatives at $0 = (0,0)$ but is not differentiable at $0 = (0,0)$
(What does this even mean?)
In any case, the answer is given as:
ANSWER Direct computation yields for every $v=(x,y) \in \Bbb R^2$, $$D_v(g) = \lim_{t\to0} \frac {g(0+tv) - g(0)}{t} = \lim_{t\to0} \frac {txy^2}{x^2 + t^2y^4} = 0$$ Thus $g$ has directional derivatives in all directions at $(0,0)$
On the other hand we notice that $g(x^2,x) =\displaystyle \frac{1}{2} \not\to 0 = g(0,0)$ as $g(x^2,x) \to 0$ thus g is not continuous at $0$ and is there not differentiable.
Now I understand the first part.
But my concern is with the second one. Why are we discussing $g(x^2,x)$ in the matter of continuity? I understand the idea is to prove indifferentiablity but why $g(x^2,x)$ to be exact? I know it's simply an example. But I may be thrown off by the use of x in both vector components...
real-analysis multivariable-calculus
SiyandaSiyanda
$\begingroup$ "What does this even mean?" Maybe you need to re-read some of your definitions and try again? $\endgroup$ – Pedro Tamaroff♦ Apr 21 '13 at 0:01
$\begingroup$ $v$ should be unit vector --otherwise dir. derivative definition above would be wrong.. $\endgroup$ – Halil Duru Apr 21 '13 at 0:42
$\begingroup$ @HalilDuru No, that is not necessary. It varies from author to author. $\endgroup$ – Pedro Tamaroff♦ Apr 21 '13 at 1:00
$\begingroup$ then same direction with different magnitude will give different answers ,right? $\endgroup$ – Halil Duru Apr 21 '13 at 1:03
I take the question to be "How did someone come up with the particular choice of $x^2$ and $x$ to plug into $g$ and discover discontinuity?" Of course, not being a mind-reader, I don't know how it was actually done, but here's how it might have been done. The key observation is that, in the fraction that defines $g(x,y)$, the numerator $xy^2$ is the geometric mean of the two terms in the denominator, $x^2$ and $y^4$. (That might sound complicated, but it really just means that the exponents of $x$ and $y$ in the numerator are the averages of their exponents in the two terms of the denominator: For the exponents of $x$, $1$ is the average of $2$ and $0$, and for the exponents of $y$, $2$ is the average of $0$ and $4$.) So if we give $x$ and $y$ values that make the two denominator terms equal, then the numerator will automatically be equal to them also. So the numerator will match each of the terms in the denominator, and the fraction will be $1/2$. If we can find such values for $x$ and $y$ arbitrarily close to $0$, then that will make $g$ discontinuous at $(0,0)$. The easiest way to achieve this, meaning to make $x^2=y^4$, is to give $y$ an arbitrary value, say $t$, and to set $x=t^2$. So you set $(x,y)=(t^2,t)$ to find points, as close to $(0,0)$ as you like if $t$ is very small, where $g$ takes the value $1/2$.
Finally, if you're in a nasty mood, you re-name the variable $t$ as $x$, even though it serves as the value to substitute for $y$, just to confuse readers.
P.S. If you know how to use a program like Mathematica, you can have it plot the graph of $g$, and you'll probably be able to see a sort of a ridge in the graph, over the parabola $x=y^2$, at height $z=1/2$. So this might be another way to "guess" the substitution that proves discontinuity of $g$ at $(0,0)$.
Andreas BlassAndreas Blass
$\begingroup$ This makes sense. Thank you! $\endgroup$ – Siyanda Apr 21 '13 at 13:21
You lost a factor $\frac{1}{t}$ in your calculation of $D_v(g)$. The actual result is $$D_v(g)=\lim_{t\to 0}\frac {g(0+tv) - g(0)}{t} = \lim_{t\to0} \frac{xy^2}{x^2 + t^2y^4} = \begin{cases}\frac{y^2}{x} & x\neq 0 \\ 0 & x=0 \end{cases}.$$
As per your question: A function is differentiable only if its directional derivatives are a continuous function of direction, which is not satisfied in this case.
In a sense $g$ is differentiable in every direction, but these directional derivatives don't fit together to make an actual derivative. That's why we have to choose a strange path like $(x^2,x)$ as a counterexample, since a path that approaches from one specific direction would never work.
AbelAbel
$\begingroup$ Try again. I think you'll find that, that isn't the case. $\endgroup$ – Siyanda Apr 20 '13 at 23:49
$\begingroup$ I'm sorry, but I really think it is. $\endgroup$ – Abel Apr 20 '13 at 23:58
If a function is differentiable , it is continuous. So if it is not continuous , it is not differentiable. We only need to find one path of approach to the origin along which the limit as we go to the origin does not equal the value of the function at the origin. Since a limit, if it exists, is unique regardless of the path of approach, we can show by one such counter example that the limit does not equal the function and thus that the function is not continuous and not differentiable.
In this case, we chose the parabola $x=y^2$ as the path of approach because this substitution makes the powers of the terms in the denominator equal.
As for the definition of differentiability, consider single variable functions: $$\lim_{x\to a}\frac{f(x)-f(a)}{x-a}=f'(a)$$ $$\lim_{x\to a}\frac{f(x)-f(a)}{x-a}=\lim_{x\to a}\frac{f'(a)(x-a)}{x-a}$$ $$\lim_{x\to a}\frac{f(x)-f(a)-f'(a)(x-a)}{x-a}=0$$ $$\lim_{x\to a}\frac{f(x)-(f(a)+f'(a)(x-a))}{x-a}=0$$ Note that $f(a)+f'(a)(x-a)$ is the tangent line to $f$ at $a$.
For two variables, we use the tangent plane rather than the tangent line to approximate $f$, so we need $$\lim_{(x,y)\to (a,b)}\frac{f(x,y)-(f(a,b)+\frac{\partial{f}}{\partial{x}}(a,b)(x-a))+\frac{\partial{f}}{\partial{y}}(a,b)(y-b))}{||(x,y)-(a,b)||}=0$$
jimjim
Not the answer you're looking for? Browse other questions tagged real-analysis multivariable-calculus or ask your own question.
Derivative of matrix valued function $f(A)=AA^T$
Coincidence of directional derivatives and derivatives along paths?
Finding all directional derivatives of a function involving absolute value.
A continuous function with all directional derivatives but NOT differentiable??
Is there a function that's continuous and has all directional derivatives as a linear function of direction, but still fails to be differentiable?
Prove not differentiable at $(0,0)$ but directional derivatives every direction.
A function that doesn't have directional derivatives
Example of a continuous and Gâteaux differentiable function that is not Fréchet differentiable.
Show that the directional derivatives of $f$ and $g$ exist everywhere, but that there is a $u \neq 0$ for which $h'(0,u)$ does not
Show that f with a tangent plane has directional derivatives in all directions at the point $(0, 0).$
Prove that $f(x,y)$ is derivable for all direction in $(0,0)$ but it is not differentiable at $(0,0)$