# Critical points of a function

If you have a 2 variable function $f(x,y)$ and it has $(0,y)$ as a critical point where y is a variable then how do we know it is maxima or minima or saddle point? For example $$f(x,y)=x^2ye^{-x^2-y^2}?$$

-

## 1 Answer

You need to find Hessian of your function, which is nothing but the matrix of second partial derivatives with respect to each variable. In your case $$H(x, y) = \left[ \begin{array}{cc} \frac{\partial^2 f }{\partial x^2} & \frac{\partial^2 f }{\partial x \partial y} \\ \frac{\partial^2 f }{\partial y \partial x} & \frac{\partial^2 f }{\partial y^2} \end{array} \right]$$ If it is positive definite at critical point – it's local minimum, if negative definite then local maximum, if the sign is indefinite then it's a saddle point.

-
Note that if the Hessian is singular, this test is inconclusive. – Harald Hanche-Olsen Nov 14 '12 at 8:28
You are absolutely right, I forgot to mention that. – Kaster Nov 14 '12 at 8:29
i am getting singular hessian,so what should I do next? – p.s Nov 16 '12 at 0:50