FindMinimum
✖
FindMinimum
searches for a local minimum in f, starting from an automatically selected point.
searches for a local minimum subject to the constraints cons.
Details and Options



- FindMinimum returns a list of the form {fmin,{x->xmin}}, where fmin is the minimum value of f found, and xmin is the value of x for which it is found.
- If the starting point for a variable is given as a list, the values of the variable are taken to be lists with the same dimensions.
- The constraints cons can contain equations, inequalities or logical combinations of these.
- The constraints cons can be any logical combination of:
-
lhs==rhs equations lhs>rhs or lhs>=rhs inequalities {x,y,…}∈reg region specification - FindMinimum first localizes the values of all variables, then evaluates f with the variables being symbolic, and then repeatedly evaluates the result numerically.
- FindMinimum has attribute HoldAll, and effectively uses Block to localize variables.
- FindMinimum[f,{x,x0,x1}] searches for a local minimum in f using x0 and x1 as the first two values of x, avoiding the use of derivatives.
- FindMinimum[f,{x,x0,xmin,xmax}] searches for a local minimum, stopping the search if x ever gets outside the range xmin to xmax.
- Except when f and cons are both linear, the results found by FindMinimum may correspond only to local, but not global, minima.
- By default, all variables are assumed to be real.
- For linear f and cons, x∈Integers can be used to specify that a variable can take on only integer values.
- The following options can be given:
-
AccuracyGoal Automatic the accuracy sought EvaluationMonitor None expression to evaluate whenever f is evaluated Gradient Automatic the list of gradient components for f MaxIterations Automatic maximum number of iterations to use Method Automatic method to use PrecisionGoal Automatic the precision sought StepMonitor None expression to evaluate whenever a step is taken WorkingPrecision MachinePrecision the 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 minimum, and the value of the function at the minimum.
- FindMinimum continues until either of the goals specified by AccuracyGoal or PrecisionGoal is achieved.
- Possible settings for Method include "ConjugateGradient", "PrincipalAxis", "LevenbergMarquardt", "Newton", "QuasiNewton", "InteriorPoint", and "LinearProgramming", with the default being Automatic.
Examples
open allclose allBasic Examples (4)Summary of the most common use cases
Find a local minimum, starting the search at :

https://wolfram.com/xid/0tzrw0wi-gieqn3


https://wolfram.com/xid/0tzrw0wi-f0x936

Extract the value of x at the local minimum:

https://wolfram.com/xid/0tzrw0wi-rajau

Find a local minimum, starting at , subject to constraints
:

https://wolfram.com/xid/0tzrw0wi-lh99qh

Find the minimum of a linear function, subject to linear and integer constraints:

https://wolfram.com/xid/0tzrw0wi-t5y4sr

Find a minimum of a function over a geometric region:

https://wolfram.com/xid/0tzrw0wi-ewyjra


https://wolfram.com/xid/0tzrw0wi-bema4a

Scope (12)Survey of the scope of standard use cases
With different starting points, you may get different local minima:

https://wolfram.com/xid/0tzrw0wi-bd0eo9


https://wolfram.com/xid/0tzrw0wi-gn7af6

Local minimum of a two-variable function starting from x=2, y=2:

https://wolfram.com/xid/0tzrw0wi-f4rnn

Local minimum constrained within a disk:

https://wolfram.com/xid/0tzrw0wi-jrsds

Starting point does not have to be provided:

https://wolfram.com/xid/0tzrw0wi-clcnhv

For linear objective and constraints, integer constraints can be imposed:

https://wolfram.com/xid/0tzrw0wi-67ordz


https://wolfram.com/xid/0tzrw0wi-n2rzg5

Or constraints can be specified:

https://wolfram.com/xid/0tzrw0wi-6q0ub3


https://wolfram.com/xid/0tzrw0wi-i9nmj9

https://wolfram.com/xid/0tzrw0wi-hkqjtu


https://wolfram.com/xid/0tzrw0wi-otv084

Find the minimum distance between two regions:

https://wolfram.com/xid/0tzrw0wi-dkte2m

https://wolfram.com/xid/0tzrw0wi-khhnmt


https://wolfram.com/xid/0tzrw0wi-bvatmu

Find the minimum such that the triangle and ellipse still intersect:

https://wolfram.com/xid/0tzrw0wi-ho0zb

https://wolfram.com/xid/0tzrw0wi-c896h8


https://wolfram.com/xid/0tzrw0wi-dy0urb

Find the disk of minimum radius that contains the given three points:

https://wolfram.com/xid/0tzrw0wi-fxoyak

https://wolfram.com/xid/0tzrw0wi-h8k62r


https://wolfram.com/xid/0tzrw0wi-m75xbi

Using Circumsphere gives the same result directly:

https://wolfram.com/xid/0tzrw0wi-ccn5a7

Use to specify that
is a vector in
:

https://wolfram.com/xid/0tzrw0wi-e7unye

https://wolfram.com/xid/0tzrw0wi-bfw719

Find the minimum distance between two regions:

https://wolfram.com/xid/0tzrw0wi-kgd51l

https://wolfram.com/xid/0tzrw0wi-cjdzl7


https://wolfram.com/xid/0tzrw0wi-ifh0j0

Options (7)Common values & functionality for each option
AccuracyGoal & PrecisionGoal (2)
This enforces convergence criteria and
:

https://wolfram.com/xid/0tzrw0wi-05x0hq

This enforces convergence criteria and
:

https://wolfram.com/xid/0tzrw0wi-ykixh5


Setting a high WorkingPrecision makes the process convergent:

https://wolfram.com/xid/0tzrw0wi-xk2rz

EvaluationMonitor (1)
Gradient (1)
Method (1)
In this case, the default derivative-based methods have difficulties:

https://wolfram.com/xid/0tzrw0wi-m77ild


https://wolfram.com/xid/0tzrw0wi-ptmgl8


Direct search methods that do not require derivatives can be helpful in these cases:

https://wolfram.com/xid/0tzrw0wi-mgtjz6

NMinimize also uses a range of direct search methods:

https://wolfram.com/xid/0tzrw0wi-1698y

StepMonitor (1)
Steps taken by FindMinimum in finding the minimum of a function:

https://wolfram.com/xid/0tzrw0wi-xmz5e

https://wolfram.com/xid/0tzrw0wi-hd3o67

WorkingPrecision (1)
Set the working precision to ; by default AccuracyGoal and PrecisionGoal are set to
:

https://wolfram.com/xid/0tzrw0wi-tjui3t

Applications (3)Sample problems that can be solved with this function
Annual returns (R) of long bonds from S&P 500 from 1973 to 1994:

https://wolfram.com/xid/0tzrw0wi-kptjyg
Compute the mean and covariance from the returns:

https://wolfram.com/xid/0tzrw0wi-b6q4i0


https://wolfram.com/xid/0tzrw0wi-dz9r7w


https://wolfram.com/xid/0tzrw0wi-bj60z9

Minimize the volatility subject to at least 10% return:

https://wolfram.com/xid/0tzrw0wi-l7nsab

Find the smallest square that can contain circles of given radii
for
that do not overlap. Specify the number of circles and the radius of each circle:

https://wolfram.com/xid/0tzrw0wi-m2255i
If is the center of circle
, then the objective is to minimize
. The objective can be transformed so as to minimize
and
:

https://wolfram.com/xid/0tzrw0wi-t7gqfm

https://wolfram.com/xid/0tzrw0wi-22nk9i

https://wolfram.com/xid/0tzrw0wi-yemsm5

https://wolfram.com/xid/0tzrw0wi-fazut5

The circles are contained in the square :

https://wolfram.com/xid/0tzrw0wi-obfv8i

Compute the fraction of square covered by the circles:

https://wolfram.com/xid/0tzrw0wi-40ke7i

Find a path through circular obstacles such that the distance between the start and end points is minimized:

https://wolfram.com/xid/0tzrw0wi-b7tj3j

The path is discretized into different points with distance of
between points, where
is the trajectory length being minimized:

https://wolfram.com/xid/0tzrw0wi-518i2b
The points cannot be inside the circular objects:

https://wolfram.com/xid/0tzrw0wi-509nls
The start and end points are known:

https://wolfram.com/xid/0tzrw0wi-7yhvw9

https://wolfram.com/xid/0tzrw0wi-wofkjz
Minimize the length subject to the constraints:

https://wolfram.com/xid/0tzrw0wi-7o04by


https://wolfram.com/xid/0tzrw0wi-8fgbp9

Properties & Relations (2)Properties of the function, and connections to other functions
FindMinimum tries to find a local minimum; NMinimize attempts to find a global minimum:

https://wolfram.com/xid/0tzrw0wi-8v0aqv


https://wolfram.com/xid/0tzrw0wi-ny4nl7


https://wolfram.com/xid/0tzrw0wi-dlfdes

Minimize finds a global minimum and can work in infinite precision:

https://wolfram.com/xid/0tzrw0wi-zkfa6a


https://wolfram.com/xid/0tzrw0wi-rq075c

FindMinimum gives both the value of the minimum and the minimizer point:

https://wolfram.com/xid/0tzrw0wi-c60bbs

FindArgMin gives the location of the minimum:

https://wolfram.com/xid/0tzrw0wi-540j8q

FindMinValue gives the value at the minimum:

https://wolfram.com/xid/0tzrw0wi-1wr2eh

Possible Issues (6)Common pitfalls and unexpected behavior
With machine-precision arithmetic, even functions with smooth minima may seem bumpy:

https://wolfram.com/xid/0tzrw0wi-e724l1



https://wolfram.com/xid/0tzrw0wi-de0ghh

https://wolfram.com/xid/0tzrw0wi-dd83h6

Going beyond machine precision often avoids such problems:

https://wolfram.com/xid/0tzrw0wi-hiyaum

If the constraint region is empty, the algorithm will not converge:

https://wolfram.com/xid/0tzrw0wi-vy9gjh


If the minimum value is not finite, the algorithm will not converge:

https://wolfram.com/xid/0tzrw0wi-mongm3



https://wolfram.com/xid/0tzrw0wi-wql3uj


The integer linear programming algorithm is only available for machine-number problems:

https://wolfram.com/xid/0tzrw0wi-uzrdll


Sometimes providing a suitable starting point can help the algorithm to converge:

https://wolfram.com/xid/0tzrw0wi-n09ud0


https://wolfram.com/xid/0tzrw0wi-mx1mby

It can be time-consuming to compute functions symbolically:

https://wolfram.com/xid/0tzrw0wi-qq24op

https://wolfram.com/xid/0tzrw0wi-tptg2r


Restricting the function definition prevents symbolic evaluation:

https://wolfram.com/xid/0tzrw0wi-ktvle7

https://wolfram.com/xid/0tzrw0wi-4ebq4m


Wolfram Research (1988), FindMinimum, Wolfram Language function, https://reference.wolfram.com/language/ref/FindMinimum.html (updated 2014).
Text
Wolfram Research (1988), FindMinimum, Wolfram Language function, https://reference.wolfram.com/language/ref/FindMinimum.html (updated 2014).
Wolfram Research (1988), FindMinimum, Wolfram Language function, https://reference.wolfram.com/language/ref/FindMinimum.html (updated 2014).
CMS
Wolfram Language. 1988. "FindMinimum." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2014. https://reference.wolfram.com/language/ref/FindMinimum.html.
Wolfram Language. 1988. "FindMinimum." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2014. https://reference.wolfram.com/language/ref/FindMinimum.html.
APA
Wolfram Language. (1988). FindMinimum. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/FindMinimum.html
Wolfram Language. (1988). FindMinimum. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/FindMinimum.html
BibTeX
@misc{reference.wolfram_2025_findminimum, author="Wolfram Research", title="{FindMinimum}", year="2014", howpublished="\url{https://reference.wolfram.com/language/ref/FindMinimum.html}", note=[Accessed: 09-July-2025
]}
BibLaTeX
@online{reference.wolfram_2025_findminimum, organization={Wolfram Research}, title={FindMinimum}, year={2014}, url={https://reference.wolfram.com/language/ref/FindMinimum.html}, note=[Accessed: 09-July-2025
]}