What about using a Lagrange multiplier to reduce the optimization problem to one target function and then use Reduce
or Solve
, to find the local maxima and minima. This gives you analytic expressions and you just have to select the one which is the smallest:
expr1 = 1/2 x^2 y^2 + y^2 z^2 + z^2 x^2 + 96/(x + y + z + 1);
expr2 = x^2 + y^2 + z^2 - 5;
lagrangian = expr1 + l*expr2
$$l \left(x^2+y^2+z^2-5\right)+\frac{x^2 y^2}{2}+x^2
z^2+\frac{96}{x+y+z+1}+y^2 z^2$$
Now you calculate the partial derivatives and solve for the roots
problem = Flatten[{Thread[D[lagrangian, {{x, y, z, l}}] == 0], x > 0, y > 0, z > 0}];
sol = Solve[problem, {x, y, z, l}];
sol
contains now the analytic solutions. You could now put the numerical values into E
and into the constraints and see that the constraints are indeed fulfilled.
{expr1, expr2} /. N[sol]
(*
{{25.5712, 8.88178*10^-16},
{26.963, 1.42553*10^-13},
{24.9556, -1.72706*10^-12},
{24.6693, 2.04281*10^-14},
{24.6693, 1.66543*10^-10}}
*)
You see, that you get the additional symmetric solution belisarius was speaking about in his answer.
N[sol[[4]]]
(* {x -> 0.879965, y -> 2.00209, z -> 0.466144, l -> 0.663595} *)
Note that you have the solution given as large analytic expressions but they are too large to post them here.
NMinimize[{1/2 (x^2 y^2 + y^2 z^2 + z^2 x^2) + 96/(x + y + z + 1), x >= 0 && y >= 0 && z >= 0 && x^2 + y^2 + z^2 == 5}, {x, y, z}]
:D $\endgroup$