Hey, coming at you with another math question. This time just for general understanding.
I just read a slide that says that the necessary condition for an extremum of a 2-variable function is that the partial derivatives of both variables are zero, analogously to the 1d case.
But the sufficient condition is not only that the second-order derivatives of either variable be positive (negative), but additionally, their product must also be larger than the square of the mixed second order derivative.
I understand that it's not sufficient to know that both second-order derivatives are ≠0, such as in 1d, because if a point is a maximum of one variable and a minimum of the other, then it's a saddle point and not an extremum. But if I already know that both variables have a maximum (minimum) at a point, how can this not be sufficient for a maximum (minimum) of the function?
Can someone maybe give me a simple example of a function where the necessary condition is met and df/dx² and df/dy² are both <0 but the function does not have a maximum at that point?
Hey, coming at you with another math question. This time just for general understanding.
I just read a slide that says that the necessary condition for an extremum of a 2-variable function is that the partial derivatives of both variables are zero, analogously to the 1d case.
But the sufficient condition is not only that the second-order derivatives of either variable be positive (negative), but additionally, their product must also be larger than the square of the mixed second order derivative.
I understand that it's not sufficient to know that both second-order derivatives are ≠0, such as in 1d, because if a point is a maximum of one variable and a minimum of the other, then it's a saddle point and not an extremum. But if I already know that both variables have a maximum (minimum) at a point, how can this not be sufficient for a maximum (minimum) of the function?
Can someone maybe give me a simple example of a function where the necessary condition is met and df/dx² and df/dy² are both <0 but the function does not have a maximum at that point?
f(x,y) = -xy has extreme value at (0,0) and 2nd order partial derivatives f_xx(x,y) = f_xy(x,y) = f_yx(x,y) = f_yy(x,y) = -1, however the determinant of it's Hessian matrix has value zero so it has a saddle point at (0,0).
edit: see comment below
f(x,y) = -xy has extreme value at (0,0) and 2nd order partial derivatives f_xx(x,y) = f_xy(x,y) = f_yx(x,y) = f_yy(x,y) = -1, however the determinant of it's Hessian matrix has value zero so it has a saddle point at (0,0).
edit: see comment below
It can be a saddle, oriented diagonally like this - https://imgur.com/a/A7sjD
It can be a saddle, oriented diagonally like this - https://imgur.com/a/A7sjD
zxpf(x,y) = -xy has extreme value at (0,0) and 2nd order partial derivatives f_xx(x,y) = f_xy(x,y) = f_yx(x,y) = f_yy(x,y) = -1, however the determinant of it's Hessian matrix has value zero so it has a saddle point at (0,0).
Uh? Why is the second derivative -1?
First derivative in both cases is a constant, so surely the seconds are all zero?
[quote=zxp]f(x,y) = -xy has extreme value at (0,0) and 2nd order partial derivatives f_xx(x,y) = f_xy(x,y) = f_yx(x,y) = f_yy(x,y) = -1, however the determinant of it's Hessian matrix has value zero so it has a saddle point at (0,0).[/quote]
Uh? Why is the second derivative -1?
First derivative in both cases is a constant, so surely the seconds are all zero?
GooglerIt can be a saddle, oriented diagonally like this - https://imgur.com/a/A7sjD
Not sure if I'm viewing it right, but seems to me that some of the white curves still have a maximum at the point while others have a minimum. Is this not the case? Did you model that saddle yourself, if so have an .obj that I could look at and rotate?
[quote=Googler]It can be a saddle, oriented diagonally like this - https://imgur.com/a/A7sjD[/quote]
Not sure if I'm viewing it right, but seems to me that some of the white curves still have a maximum at the point while others have a minimum. Is this not the case? Did you model that saddle yourself, if so have an .obj that I could look at and rotate?
https://imgur.com/a/KpOQj the red lines are intersections with the x and y axis - both variables on their own have a local maximum at that point. But the blue guide lines lines have a minimum. obj - https://mega.nz/#!OlgjTDhQ!6mm3oZqd0k_uqgj9Aa-tLJMG-rtGc6Ar4QbRaffFGHU
https://imgur.com/a/KpOQj the red lines are intersections with the x and y axis - both variables on their own have a local maximum at that point. But the blue guide lines lines have a minimum. obj - https://mega.nz/#!OlgjTDhQ!6mm3oZqd0k_uqgj9Aa-tLJMG-rtGc6Ar4QbRaffFGHU
Oh, yes I see that, but is it actually possible to construct this saddle as a combination of the red lines only?
What would the function of this saddle be exactly?
Oh, yes I see that, but is it actually possible to construct this saddle as a combination of the red lines only?
What would the function of this saddle be exactly?
oh woops, try f(x,y) = 3x^2 - 12xy +3y^2,
then (f_x,f_y) = (6x-12y,6y-12x), so critical point at origin and
f_xx = 6 = f_yy
f_xy = -12,
(-12)^2 - 6*6 = 144 - 36 = 108 > 0 so f has a saddle point at (0,0), and not a minimum. For a maximum analogy you can just take g(x,y) = -f(x,y).
oh woops, try f(x,y) = 3x^2 - 12xy +3y^2,
then (f_x,f_y) = (6x-12y,6y-12x), so critical point at origin and
f_xx = 6 = f_yy
f_xy = -12,
(-12)^2 - 6*6 = 144 - 36 = 108 > 0 so f has a saddle point at (0,0), and not a minimum. For a maximum analogy you can just take g(x,y) = -f(x,y).
zxpoh woops, try f(x,y) = 3x^2 - 12xy +3y^2,
then (f_x,f_y) = (6x-12y,6y-12x), so critical point at origin and
f_xx = 6 = f_yy
f_xy = -12,
(-12)^2 - 6*6 = 144 - 36 = 108 > 0 so f has a saddle point at (0,0), and not a minimum. For a maximum analogy you can just take g(x,y) = -f(x,y).
Oh, I see now. So the partial derivatives can actually represent slopes along a diagonal path through the function, and don't necessarily line up with the saddles. I couldn't visualize that before but now I get it.
Googlerhttps://mega.nz/#!OlgjTDhQ!6mm3oZqd0k_uqgj9Aa-tLJMG-rtGc6Ar4QbRaffFGHU
makes sense now. Thanks both of you for the help! :)
[quote=zxp]oh woops, try f(x,y) = 3x^2 - 12xy +3y^2,
then (f_x,f_y) = (6x-12y,6y-12x), so critical point at origin and
f_xx = 6 = f_yy
f_xy = -12,
(-12)^2 - 6*6 = 144 - 36 = 108 > 0 so f has a saddle point at (0,0), and not a minimum. For a maximum analogy you can just take g(x,y) = -f(x,y).[/quote]
Oh, I see now. So the partial derivatives can actually represent slopes along a diagonal path through the function, and don't necessarily line up with the saddles. I couldn't visualize that before but now I get it. [quote=Googler]https://mega.nz/#!OlgjTDhQ!6mm3oZqd0k_uqgj9Aa-tLJMG-rtGc6Ar4QbRaffFGHU[/quote] makes sense now. Thanks both of you for the help! :)