Question: How to produce a very accurate (and still reliable) result which is not sensitive to the precision?

It says that one may specify the number of significant (decimal) digits when performing calculations. However, it appears that setting a higher precision does not yield more satisfactory results. Actually, the recommended solver (in the Optimization package) can report that a maximization succeeded, and yet the reported solution can be, in effect, incorrect.

restart;

kernelopts(version);

         Maple 2023.0, X86 64 WINDOWS, Mar 06 2023, Build ID 1689885

 

fun := ((2*(x+y+z))*(sqrt(y*z*(z+x)*(x+y))/(z+2*x+y)+sqrt(z*x*(x+y)*(y+z))/(x+2*y+z)+sqrt(x*y*(y+z)*(z+x))/(y+2*z+x))-9*x*y*z/(x+y+z)-2*(x*y+x*z+y*z))/(sqrt(x*y*z/(x+y+z))*(x+y+z-sqrt(27*x*y*z/(x+y+z))))

Digits := 5

Optimization['Maximize'](fun, assume = nonnegative, initialpoint = ({seq})(w = (rand())(), `in`(w, [x, y, z])))

Warning, no iterations performed as initial point satisfies first-order conditions

 

[2.56454435679811255, [x = HFloat(8.44225460865e11), y = HFloat(1.5121750086e11), z = HFloat(3.58747328735e11)]]

(1)

Digits := 10

Optimization['Maximize'](fun, assume = nonnegative, initialpoint = ({seq})(w = (rand())(), `in`(w, [x, y, z])))

Warning, no iterations performed as initial point satisfies first-order conditions

 

[2.54449612902387834, [x = HFloat(9.50923834782e11), y = HFloat(8.94868300574e11), z = HFloat(2.30179425858e11)]]

(2)

Digits := 15

Optimization['Maximize'](fun, assume = nonnegative, initialpoint = ({seq})(w = (rand())(), `in`(w, [x, y, z])))

Warning, no iterations performed as initial point satisfies first-order conditions

 

[2.53798179305501392, [x = HFloat(9.91986977089e11), y = HFloat(5.97663762096e11), z = HFloat(4.31192847449e11)]]

(3)

Digits := 20

Optimization['Maximize'](fun, assume = nonnegative, initialpoint = ({seq})(w = (rand())(), `in`(w, [x, y, z])))

[2.5281266501331255053, [x = 583804136381.99996354, y = 332585592469.99985371, z = 642614553072.00010884]]

(4)

Digits := 25

Optimization['Maximize'](fun, assume = nonnegative, initialpoint = ({seq})(w = (rand())(), `in`(w, [x, y, z])))

Error, (in Optimization:-NLPSolve) complex value encountered

 

Digits := 30

Optimization['Maximize'](fun, assume = nonnegative, initialpoint = ({seq})(w = (rand())(), `in`(w, [x, y, z])))

Warning, undefined value encountered

 

[Float(infinity), [x = 996095848033.138573379019582678, y = 0., z = 473765214257.250967995851222582]]

(5)


 

Download NMaxValue.mw

It is said that the approximate supremum of fun is 3e0 (under the assumptions). 

fun:=`assuming`((2*(x+y+z)*(sqrt(y*z*(z+x)*(x+y))/(z+2*x+y\
)+sqrt(z*x*(x+y)*(y+z))/(x+2*y+z)+sqrt(x*y*(y+z)*(z+x))/(y\
+2*z+x))-(9*x*y*z/(x+y+z)+2*(y*z+z*x+x*y)))/(sqrt(x*y*z/(x+y+z))*(x+y+z-sqrt(27*x*y*z/(x+y+z)))),[(x,y,z)>~0]):

I am not sure if the DirectSearch toolbox performs better. But is there a way to obtain significantly accurate output natively?

Please Wait...