WOLFRAM NOTEBOOK

WOLFRAM|DEMONSTRATIONS PROJECT

Global Minimum of a Non-Convex Function

method
DifferentialEvolution
RandomSearch
SimulatedAnnealing
NelderMead
graphical
λ
2
β
2
γ
0.2
Consider the function family
f(x)=1/2
2
(x-β)
+γ
2
x
cos(πx)-λsin(2πx)+cos(4πx)sin(πx)
, which depends on three parameters
β
,
γ
, and
λ
that you can vary. For the specified domain
-20<x<20
,
f(x)
has many local minima, the locations of which depend on the parameters. Because
f(x)
is nonlinear there is no guarantee that Mathematica's built-in function NMinimize will find a global minimum for a given set of its arguments. This Demonstration determines the position of all the local minima and maxima as well as the global minimum of
f(x).
To do so, all roots of
f'(x)=0
are computed using a graphical method developed by Wagon [1]. When
f'(x)=0
, local minima occur at
f''(x)>0
(cyan dots) and local maxima at
f''(x)<0
(the dark blue dots). The green dot indicates the position of the purported global minimum. Finally, the result obtained using the built-in Mathematica function NMinimize is given for comparison. You can select from four of the methods used by NMinimize to assess a method's capability to find the global minimum of
f(x)
in the range
-20<x<20
.
Wolfram Cloud

You are using a browser not supported by the Wolfram Cloud

Supported browsers include recent versions of Chrome, Edge, Firefox and Safari.


I understand and wish to continue anyway »

You are using a browser not supported by the Wolfram Cloud. Supported browsers include recent versions of Chrome, Edge, Firefox and Safari.