Maximize
is a well done command of Mathematica. However, there are spots on the Sun too. Trying in version 13.1 on Windows 10
Maximize[{Sqrt[x*y]/(z + 1) + Sqrt[y*z]/(x + 1) + Sqrt[x*z]/(y + 1),
1/(x + 1) + 1/(y + 1) + 1/(z + 1) == 2 && x > 0 && y > 0 &&z > 0}, {x, y, z}]
, I obtain (in a dozen minutes) a warning
Maximize::wksol:Warning:there is no maximum in the region in which the objective function is defined and the constraints are satisfied;a result on the boundary will be returned.
which is OK and
Sqrt[2], {x -> -1, y -> 0, z -> -1}}
which is not correct.
The change of variables {x->r^2,y->s^2,z->t^2}
does not help and produces another incorrect result.
Maximize[{r*s/(t^2 + 1) + t*s/(r^2 + 1) + r*t/(s^2+1),
1/(r^2 + 1) + 1/(s^2 + 1) + 1/(t^2 + 1) == 2 && r > 0 && s > 0 && t > 0}, {r, s, t}]
{\[Infinity], {r -> Indeterminate, s -> Indeterminate, t -> Indeterminate}}
and the same warning. The NMaximize
command produces
NMaximize[{Sqrt[x*y]/(z + 1) + Sqrt[y*z]/(x + 1) + Sqrt[x*z]/(y + 1),
1/(x + 1) + 1/(y + 1) + 1/(z + 1) == 2 && x > 0 && y > 0 &&z > 0}, {x, y, z}]
{1.41417,{x->24842.9,y->0.0000201261,z->0.0000201261}}
without any warning.
The question arises: what is a workaround?
Addition. Another example of such sort is
Minimize[{x/Sqrt[1 - x^2] + y/Sqrt[1 - y^2] + z/Sqrt[1 - z^2],
x^2 + y^2 + z^2 == 1 && {x, y, z} >= 0 && {x, y, z} < 1}, {x, y, z}]
where Mathematica is running without any response for a long time.
r*t/(s^+1)
should ber*t/(s^2+1)
. $\endgroup$Maximize
returns{Sqrt[2], {x -> 0, y -> 0, z -> ComplexInfinity}}
in Mathematica v12.2 , which seems to be correct! $\endgroup$