[Math] hessian matrix not positive definite at a minimum

optimization

I have a function for which I want to find the global minimum. The function is:

V = 0.8173894901710712` x[1]^2 - 0.6243937065879472` x[1]^3 - 
  0.054869713607121895` x[1]^4 - 0.5870835253855531 x[1]^2 x[2] + 
  0.6314675008831476` x[1]^3 x[2] + 0.11141961113123644` x[2]^2 - 
  0.39237554582290146` x[1] x[2]^2 + 
  0.8517693920801945` x[1]^2 x[2]^2 + 0.8505504023577255` x[2]^3 - 
  1.181061391901573` x[1] x[2]^3 + 0.3521408332254805` x[2]^4 - 
  1.2099332478210738` x[1]^2 x[3] - 0.9444824939917837` x[1]^3 x[3] - 
  0.8502343788877882` x[1] x[2] x[3] + 
  1.6658720034730892` x[1]^2 x[2] x[3] + 
  0.21214890712030288` x[2]^2 x[3] - 
  1.3463026407140397` x[1] x[2]^2 x[3] + 
  0.46376735284215176` x[2]^3 x[3] + 0.7895259946338515` x[3]^2 + 
  1.107858358133044` x[1] x[3]^2 - 1.555309927136002` x[1]^2 x[3]^2 - 
  0.15079970734077408` x[2] x[3]^2 - 
  4.058588075710102` x[1] x[2] x[3]^2 - 
  0.03583016496989044` x[2]^2 x[3]^2 - 0.661973966244501` x[3]^3 + 
  0.936684017060188` x[1] x[3]^3 - 1.0759234055008484` x[2] x[3]^3 + 
  0.5948966067963419` x[3]^4

The variables are

var = Table[x[i], {i, 3}]

Now, I solve the gradient equations using NSolve command:

e = Table[D[V, x[i]], {i, 3}]
sol = NSolve[e == 0, var];
lsol = Length[sol];
(*Below routine sorts out real solutions*)
lrealsol = 0;
Do[
  tb = var /. sol[[i]];
  If[Total[Im[tb]^2] <= 10^(-7), lrealsol = lrealsol + 1];
  If[Total[Im[tb]^2] <= 10^(-7), realsol[lrealsol] = tb],
  {i, lsol}];
Print["no of real solutions = ", lrealsol];
Do[
 Print[Eigenvalues[
    Table[D[D[V, x[i]], x[j]], {i, 1, Dim}, {j, 1, Dim}]] /. 
   Thread[var -> realsol[i]]];
 Print[V /. Thread[var -> realsol[i]]],
 {i, lrealsol}]

In the above code, I am solving the equations, filtering out the real solutions and then computing the eigenvalues of the hessian matrix at each of the 7 real solutions. I also compute the potential at each of the 7 real solutions.
Now, the problem is, the hessian is positive definite (all evalues positive) when V is zero, so this should be a minimum. Because there is no other minimum, this is also the global minimum.
However, at another real solution, V is -39.2693, but there is one negative evalue at this point.
So how come the function value is smaller than the global minimum?!
Or am I doing some very silly mistake here?

Thanks in advance!

Best Answer

There is no global minimum. Along the $x_1$-coordinate axes, where $x_2=x_3=0$, the function simplifies to $$ 0.8173894902 x_1^2 - 0.6243937066 x_1^3 - 0.05486971361 x_1^4$$ which is unbounded from below (that is, attains arbitrarily large negative values).

Even when a multivariable function is bounded from below, the conclusion

Because there is no other minimum, this is also the global minimum

is unwarranted. A function of two or more variables may have a unique local minimum which fails to be the global minimum. Here is an example adopted from Wikipedia: $$f(x,y)=\arctan(x^2+y^2(1-x)^3)$$ The only critical point of this function is $(0,0)$ where $f(0,0)=0$. Yet, the global infimum (not attained) is $-\pi/2$.