0
$\begingroup$

In the link here, an example is presented where a function in two variables is discontinuous at the origin and this results in the gradient not existing. This is because approaching the origin along the line $x=y$ leads to a jump (the function is 1/2 everywhere along $x=y$ but not at the origin, so the gradient at the origin along the direction of that line blows up).

$$ f(x,y)= \begin{cases} \frac{xy}{x^2+y^2},& \text{if } (x,y) \neq (0,0)\\ 0, & \text{otherwise} \end{cases} $$

Then in this link, the function is slightly modified in that $y$ is replaced by $y^2$. So, now the function becomes (it is framed slightly differently in the link but I believe is equivalent to):

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

Now, the curve along which the function is 1/2 is the parabola $x=y^2$ instead of the line $x=y$. So, now no matter what linear direction we travel in from the origin, the gradient can be calculated no problem.

In a way, when the jump in the function was along a linear approach to the origin, the gradient couldn't exist along that approach. But when the jump was along a quadratic approach, the gradient could exist because it is inherently linear.

So the question becomes, what can we say about the hessian in the case of the second function? We got rid of the problem with the gradient by making the direction of constancy quadratic instead of linear. But my intuition says that the hessian defines quadratic functions, so we should run into a problem with it. I just can't seem to make concrete how.

$\endgroup$
  • $\begingroup$ The function is not differentiable. Even if it is differentiable along every linear direction, this doesn't necessarily imply (total) differentiability. Your example about the $x = y^2$ curve and the axes shows that no linear function will approximate it. Hence there shouldn't be a second derivative (Hessian). $\endgroup$ – Theo Bendit Mar 4 '18 at 1:07
  • $\begingroup$ @TheoBendit - what is the difference between being differentiable in every direction and "total differentiability"? $\endgroup$ – Rohit Pandey Mar 4 '18 at 1:09
  • 1
    $\begingroup$ en.wikipedia.org/wiki/… $\endgroup$ – Theo Bendit Mar 4 '18 at 1:11
  • 1
    $\begingroup$ Your question rests on an incorrect assumption. The second function has directional derivatives in every direction, but it does not have a gradient. $\endgroup$ – Rahul Mar 4 '18 at 4:33
  • $\begingroup$ @Rahul - I'm still not sure how to test if the gradient exists. The link provided by Theo mentions checking the existence of the Jacobian, but doesn't detail how exactly we would do that test for a given function? $\endgroup$ – Rohit Pandey Mar 4 '18 at 5:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.