I'm trying to use NMinimize
to solve the 4th question of Hundred-dollar, Hundred-digit Challenge problems
What is the global minimum of the function $\exp(\sin(50x))+\sin(60e^y)+\sin(70\sin x)+\sin(\sin(80y))-\sin(10\left(x+y\right))+1/4\left(x^2+y^2\right)$ ?
The mathematica codes are as following:
f[x_, y_] :=
Exp[Sin[50 x]] + Sin[60 Exp[y]] + Sin[70 Sin[x]] + Sin[Sin[80 y]] -
Sin[10 (x + y)] + (x^2 + y^2)/4
NMinimize[f[x, y], {x, y}]
The above codes give the correct answer
{-3.30687, {x -> -0.0244036, y -> 0.210625}}
However, when I tried to specify the option WorkingPrecision
to obtain a higher precision answer, NMinimize
gave me a wrong answer:
NMinimize[f[x, y], {x, y}, WorkingPrecision -> 30]
(*{-3.14407941031143614721780738981, {x -> -0.0231677594567431947167213562978,
y -> -0.494212878682625029250540893094}}*)
So how to obtain the true answer when specifying the WorkingPrecision
option?