This is documentation for Mathematica 6, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)

NMinimize

Updated In 6 Graphic
NMinimize[f, {x, y, ...}]
minimizes f numerically with respect to x, y, ....
NMinimize[{f, cons}, {x, y, ...}]
minimizes f numerically subject to the constraints cons.
  • NMinimize returns a list of the form {fmin, {x->xmin, y->ymin, ...}}.
  • cons can contain equations, inequalities or logical combinations of these.
  • NMinimize always attempts to find a global minimum of f subject to the constraints given.
  • By default, all variables are assumed to be real.
  • xIntegers can be used to specify that a variable can take on only integer values.
  • If f and cons are linear, NMinimize can always find global minima, over both real and integer values.
  • Otherwise, NMinimize may sometimes find only a local minimum.
  • The following options can be given:
AccuracyGoalAutomaticnumber of digits of final accuracy sought
EvaluationMonitorNoneexpression to evaluate whenever f is evaluated
MaxIterations100maximum number of iterations to use
MethodAutomaticmethod to use
PrecisionGoalAutomaticnumber of digits of final precision sought
StepMonitorNoneexpression to evaluate whenever a step is taken
WorkingPrecisionMachinePrecisionthe precision used in internal computations
  • The settings for AccuracyGoal and PrecisionGoal specify the number of digits to seek in both the value of the position of the maximum, and the value of the function at the minimum.
  • Possible settings for the Method option include "NelderMead", "DifferentialEvolution", "SimulatedAnnealing" and "RandomSearch".
New in 5 | Last modified in 6