# 2nd Partial Derivative Test in two variables

1. Dec 30, 2008

### BackEMF

Hi.

I came across http://en.wikipedia.org/wiki/Second_partial_derivative_test" [Broken] page on Wikipedia regarding the 2nd derivative test. It says that if the determinant of the 2x2 Hessian is negative, then

$$f_{xx} f_{yy} < f_{xy}^2$$

So far, so good...

But then it draws, seemingly from the above statement only, that if one of the non-mixed 2nd order derivatives is negative, the other must be positive. I don't see why this MUST be the case. Isn't it quite possible that they are both negative, but the resulting inequality is still valid (since the mixed partial is still bigger...).

Thanks...

Last edited by a moderator: May 3, 2017
2. Dec 31, 2008

### jostpuur

At this point it seems that that could be possible, but I believe that it turns out that in the end it isn't. Do you know what diagonalization is? I didn't check this carefully yet, but I believe that by using some diagonalization results, it follows that without loss of generality you might as well assume that $f_{xy}=0$.

3. Dec 31, 2008

### HallsofIvy

Staff Emeritus
Well, its very oddly stated! Yes, Wikipedia does say at first that
"If M < 0 then $f_{xx}f_{yy}< f_{xy}^2$. If either $f_{xx}$ or $f_{yy}$ are negative, the other must be positive"

But then a few lines later it says
"This leaves the last case of M < 0 so $f_{xx}f_{yy}< f_{xy}^2$. and fxx and fyy having the same sign." which contradicts the statement that if one is negative the other must be positive! They should NOT say, in the first statement, that the second derivitives MUST have the same sign but only that they are really just considering the case in which they have the different signs and the case in which the signs are the same, separately.

An example is $f(x,y)= 2xy- (1/2)(x^2+ y^2)$ which has second derivatives $f_{xx}= f_{yy}= -1$ and $f_{xy}= 2$ so that the determinant of the Hessian is 1- 4= -3 and both $f_{xx}$ and $f_{yy}$ are negative.

What is true is that there always exist coordinates, x', y', not necessarily orthogonal (the "principal coordinates") in which the mixed second derivatives are 0 at the point so the Hessian matrix and the determinant is just the product of the two unmixed second derivatives. Since the determinant is invariant under such a change of coordinates, if it is negative in the x,y coordinates, it must be negative in the x', y' so the two second derivatives must have different signs. That is the "diagonalization" Jostpuur is talking about.

In the example, above, $f(x,y)= 2xy- (1/2)(x^2+ y^2)$, if we let x'= x- y and y'= x+ y (the "principal directions"), then $f(x',y')= (1/4)y'^2- (3/4)x'^2$ which has second derivatives $f_{y'y'}= 1/2$, $f_{x'x'}= -3/2$, of different sign, and $f_{x'y'}= 0$.

Last edited by a moderator: May 3, 2017
4. Dec 31, 2008

### jostpuur

hm hm..... what I said about loss of generality seemingly is not true then.

5. Dec 31, 2008

### HallsofIvy

Staff Emeritus
Well, it depends on the "diagonalization results" you use!

6. Jan 11, 2009

### BackEMF

Thanks lads. You've cleared that up for me very nicely.

I've been doing some reading on it and I finally see an application for quadratic forms I learned when doing linear algebra. I knew I'd come across a reason for learning it eventually! And I see how you can make a change of basis, diagonalising the Hessian, but leaving the determinant unchanged.

Cheers.