FindMinValue[f,x]
gives the value at a local minimum of f.
FindMinValue[f,{x,x0}]
gives the value at a local minimum of f, found by a search starting from the point x=x0.
FindMinValue[f,{{x,x0},{y,y0},…}]
gives the value at a local minimum of a function of several variables.
FindMinValue[{f,cons},{{x,x0},{y,y0},…}]
gives the value at a local minimum subject to the constraints cons.
FindMinValue[{f,cons},{x,y,…}]
starts from a point within the region defined by the constraints.
FindMinValue
FindMinValue[f,x]
gives the value at a local minimum of f.
FindMinValue[f,{x,x0}]
gives the value at a local minimum of f, found by a search starting from the point x=x0.
FindMinValue[f,{{x,x0},{y,y0},…}]
gives the value at a local minimum of a function of several variables.
FindMinValue[{f,cons},{{x,x0},{y,y0},…}]
gives the value at a local minimum subject to the constraints cons.
FindMinValue[{f,cons},{x,y,…}]
starts from a point within the region defined by the constraints.
Details and Options
- FindMinValue[…] is effectively equivalent to First[FindMinimum[…]].
- 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.
- 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 - FindMinValue first localizes the values of all variables, then evaluates f with the variables being symbolic, and then repeatedly evaluates the result numerically.
- FindMinValue has attribute HoldAll, and effectively uses Block to localize variables.
- FindMinValue[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.
- FindMinValue[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 FindMinValue 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.
- FindMinValue takes the same options as FindMinimum.
-
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
List of all options
Examples
open all close allBasic Examples (4)
Find a minimum value of the univariate function:
FindMinValue[2x ^ 2 - 3x + 5, x]Find a minimum value of a multivariate function:
FindMinValue[Sin[x]Sin[2y], {x, y}]Find a minimum value of a function subject to constraints:
FindMinValue[{x - 2y, x ^ 2 + y ^ 2 ≤ 1}, {x, y}]Find a minimum value of a function over a geometric region:
FindMinValue[{x + y, {x, y}∈Disk[]}, {x, y}]Scope (12)
With different starting points, get the values of different local minima:
FindMinValue[x Cos[x], {x, 5}]FindMinValue[x Cos[x], {x, 10}]Value at a local minimum of a two-variable function starting from x=2, y=2:
FindMinValue[Sin[x]Sin[2y], {{x, 2}, {y, 2}}]Value at a local minimum constrained within a disk:
FindMinValue[{Sin[x]Sin[2y], x ^ 2 + y ^ 2 < 3}, {{x, 2}, {y, 2}}]Starting point does not have to be provided:
FindMinValue[{Sin[x]Sin[2y], x ^ 2 + y ^ 2 < 3}, {x, y}]For linear objective and constraints, integer constraints can be imposed:
FindMinValue[{x + y, 3x + 2y ≥ 7 && x ≥ 0 && y ≥ 0}, {x, y}]FindMinValue[{x + y, 3x + 2y ≥ 7 && x ≥ 0 && y ≥ 0 && x∈Integers}, {x, y}]Or constraints can be specified:
FindMinValue[{-x - y, x ^ 2 + y ^ 2 ≤ 1 || (x + 2) ^ 2 + (y + 2) ^ 2 ≤ 1}, {x, y}]Find the minimum value of a function over a geometric region:
t = RotationTransform[{{0, 0, 1}, {1, 1, 1}}];
ℛ = TransformedRegion[Ellipsoid[{0, 0, 0}, {1, 2, 3}], t];FindMinValue[{z, {x, y, z}∈ℛ}, {x, y, z}]Graphics3D[{Opacity[0.5], {Green, GeometricTransformation[Ellipsoid[{0, 0, 0}, {1, 2, 3}], t]}, {Red, InfinitePlane[{{0, 0, %}, {1, 0, %}, {0, 1, %}}]}}]Find the minimum distance between two regions:
Subscript[ℛ, 1] = Disk[];
Subscript[ℛ, 2] = InfiniteLine[{{-2, 0}, {0, 2}}];FindMinValue[{(x - u)^2 + (y - v)^2, {{x, y}∈Subscript[ℛ, 1], {u, v}∈Subscript[ℛ, 2]}}, {x, y, u, v}]Graphics[{{LightBlue, Subscript[ℛ, 1]}, {Green, Subscript[ℛ, 2]}, {Blue, Circle[{0, 0}, 1 + Sqrt[%]]}}]Find the minimum
such that the triangle and ellipse still intersect:
Subscript[ℛ, 1] = Triangle[{{0, 0}, {1, 0}, {0, 1}}];
Subscript[ℛ, 2] = Disk[{1, 1}, {2r, r}];FindMinValue[{r, {x, y}∈Subscript[ℛ, 1] && {x, y}∈Subscript[ℛ, 2]}, {r, x, y}]Graphics[{LightBlue, Subscript[ℛ, 1], Subscript[ℛ, 2]} /. r -> %]Find the minimum radius of a disk that contains the given three points:
Subscript[ℛ, 3] = Disk[{a, b}, r];FindMinValue[{r, ({0, 0} | {1, 0} | {0, 1})∈Subscript[ℛ, 3]}, {a, b, r}]Using Circumsphere gives the same result directly:
Circumsphere[{{0, 0}, {1, 0}, {0, 1}}]//NUse
to specify that
is a vector in
:
ℛ = Sphere[];FindMinValue[{x.{1, 2, 3}, x∈ℛ}, x]Find the minimum distance between two regions:
Subscript[ℛ, 1] = Triangle[{{0, 0}, {1, 0}, {0, 1}}];
Subscript[ℛ, 2] = Disk[{2, 2}, 1];FindMinValue[{EuclideanDistance[x, y], {x∈Subscript[ℛ, 1], y∈Subscript[ℛ, 2]}}, {x, y}]Graphics[{{LightBlue, Subscript[ℛ, 1], Subscript[ℛ, 2]}, {Blue, Circle[{2, 2}, 1 + %]}}]Options (8)
AccuracyGoal & PrecisionGoal (2)
This enforces convergence criteria
and
:
FindMinValue[Sin[x / 2], {x, 1}, AccuracyGoal -> 9, PrecisionGoal -> 8]This enforces convergence criteria
and
:
FindMinValue[Sin[x / 2], {x, 1}, AccuracyGoal -> 20, PrecisionGoal -> 18]Setting a high WorkingPrecision makes the process convergent:
FindMinValue[Sin[x / 2], {x, 1}, AccuracyGoal -> 20, PrecisionGoal -> 18, WorkingPrecision -> 40]EvaluationMonitor (1)
Gradient (2)
FindMinValue[Sin[x]Sin[2 y], {x, y}, Gradient -> {Cos[x] Sin[2 y], 2 Cos[2 y] Sin[x]}, Method -> "Newton"]Supply both gradient and Hessian:
FindMinValue[Sin[x]Sin[2y], {x, y}, Gradient -> {Cos[x] Sin[2 y], 2 Cos[2 y] Sin[x]}, Method -> {"Newton", Hessian -> {{-Sin[x] Sin[2 y], 2 Cos[x] Cos[2 y]}, {2 Cos[x] Cos[2 y], -4 Sin[x] Sin[2 y]}}}]Method (1)
In this case, the default derivative-based methods have difficulties:
FindMinValue[Abs[x + 1] + Abs[x + 1.01] + Abs[y + 1], {x, y}]FindMinValue[Abs[x + 1] + Abs[x + 1.01] + Abs[y + 1], {x, y}, Method -> "ConjugateGradient"]Direct search methods that do not require derivatives can be helpful in these cases:
FindMinValue[Abs[x + 1] + Abs[x + 1.01] + Abs[y + 1], {x, y}, Method -> "PrincipalAxis"]NMinimize also uses a range of direct search methods:
NMinimize[{Abs[x + 1] + Abs[x + 1.01] + Abs[y + 1]}, {x, y}]StepMonitor (1)
Steps taken by FindMinValue in finding the minimum of a function:
pts = Reap[FindMinValue[(1 - x) ^ 2 + 100(-x ^ 2 - y) ^ 2 + 1, {{x, -1.2}, {y, 1}}, StepMonitor :> Sow[{x, y}]]][[2, 1]];
pts = Join[{{-1.2, 1}}, pts];ContourPlot[(1 - x) ^ 2 + 100(-x ^ 2 - y) ^ 2 + 1//Log, {x, -1.3, 1.5}, {y, -1.5, 1.4}, Epilog -> {Red, Line[pts], Point[pts]}]WorkingPrecision (1)
Set the working precision to
; by default, AccuracyGoal and PrecisionGoal are set to
:
FindMinValue[Cos[x ^ 2 - 3 y] + Sin[x ^ 2 + y ^ 2], {x, y}, Method -> "Newton", WorkingPrecision -> 20]Properties & Relations (1)
FindMinimum gives both the value of the minimum and the minimizing argument:
FindMinimum[{x - 2y, x ^ 2 + y ^ 2 ≤ 1}, {x, y}]FindArgMin gives the location of the minimum as a list:
FindArgMin[{x - 2y, x ^ 2 + y ^ 2 ≤ 1}, {x, y}]FindMinValue gives the value at the minimum:
FindMinValue[{x - 2y, x ^ 2 + y ^ 2 ≤ 1}, {x, y}]Possible Issues (4)
If the constraint region is empty, the algorithm will not converge:
FindMinValue[{x + y, x ^ 2 + y ^ 2 ≥ 2 && x ^ 2 + y ^ 2 ≤ 1}, {x, y}]If the minimum value is not finite, the algorithm will not converge:
FindMinValue[Tan[x], {x, 2}]FindMinValue[{-x ^ 2 - y ^ 2, x ^ 2 + y ^ 2 > 10}, {x, y}]Plot3D[-x ^ 2 - y ^ 2, {x, -10, 10}, {y, -10, 10}, RegionFunction -> Function[{x, y}, x ^ 2 + y ^ 2 > 10]]Integer linear programming algorithm is only available for machine-number problems:
FindMinValue[{x + y, x + 2y ≥ 3 && x > 1 && y > 1 && x∈Integers}, {x, y}, WorkingPrecision -> 20]Sometimes providing a suitable starting point can help the algorithm to converge:
FindMinValue[{Cos[x] - Exp[(x - 0.5) y], x ^ 2 + y ^ 2 < 1}, {x, y}]FindMinValue[{Cos[x] - Exp[(x - 0.5) y], x ^ 2 + y ^ 2 < 1}, {{x, -1}, {y, -1}}]Related Guides
Text
Wolfram Research (2008), FindMinValue, Wolfram Language function, https://reference.wolfram.com/language/ref/FindMinValue.html (updated 2014).
CMS
Wolfram Language. 2008. "FindMinValue." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2014. https://reference.wolfram.com/language/ref/FindMinValue.html.
APA
Wolfram Language. (2008). FindMinValue. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/FindMinValue.html
BibTeX
@misc{reference.wolfram_2026_findminvalue, author="Wolfram Research", title="{FindMinValue}", year="2014", howpublished="\url{https://reference.wolfram.com/language/ref/FindMinValue.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_findminvalue, organization={Wolfram Research}, title={FindMinValue}, year={2014}, url={https://reference.wolfram.com/language/ref/FindMinValue.html}, note=[Accessed: 13-June-2026]}