FindArgMin[f,x]
gives the position xmin of a local minimum of f.
FindArgMin[f,{x,x0}]
gives the position xmin of a local minimum of f, found by a search starting from the point x=x0.
FindArgMin[f,{{x,x0},{y,y0},…}]
gives the position {xmin,ymin,…} of a local minimum of a function of several variables.
FindArgMin[{f,cons},{{x,x0},{y,y0},…}]
gives the position of a local minimum subject to the constraints cons.
FindArgMin[{f,cons},{x,y,…}]
starts from a point within the region defined by the constraints.
FindArgMin
FindArgMin[f,x]
gives the position xmin of a local minimum of f.
FindArgMin[f,{x,x0}]
gives the position xmin of a local minimum of f, found by a search starting from the point x=x0.
FindArgMin[f,{{x,x0},{y,y0},…}]
gives the position {xmin,ymin,…} of a local minimum of a function of several variables.
FindArgMin[{f,cons},{{x,x0},{y,y0},…}]
gives the position of a local minimum subject to the constraints cons.
FindArgMin[{f,cons},{x,y,…}]
starts from a point within the region defined by the constraints.
Details and Options
- FindArgMin[…,{x,y,…}] is effectively equivalent to {x,y,…}/.Last[FindMinimum[…,{x,y,…},…]].
- 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 - FindArgMin first localizes the values of all variables, then evaluates f with the variables being symbolic, and then repeatedly evaluates the result numerically.
- FindArgMin has attribute HoldAll, and effectively uses Block to localize variables.
- FindArgMin[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.
- FindArgMin[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 FindArgMin 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.
- FindArgMin 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 point {x} at which the univariate function 2x^2+3x-5 has a minimum:
FindArgMin[2x ^ 2 + 3x - 5, x]Find a point {x,y} at which the function Sin[x]Sin[2y] has a minimum:
FindArgMin[Sin[x]Sin[2y], {x, y}]Find a point at which a function is a minimum subject to constraints:
FindArgMin[{-x + 2y, x ^ 2 + y ^ 2 ≤ 1}, {x, y}]Find a minimizer point in a geometric region:
NArgMin[{x + y, {x, y}∈Disk[]}, {x, y}]Show[ContourPlot[x + y, {x, y}∈Disk[]], Graphics[{Red, PointSize[Large], Point[%]}]]Scope (12)
With different starting points, get the locations of different local minima:
FindArgMin[x Cos[x], {x, 5}]FindArgMin[x Cos[x], {x, 10}]Location of a local minimum of a two-variable function starting from x=2, y=2:
FindArgMin[Sin[x]Sin[2y], {{x, 2}, {y, 2}}]Location of a local minimum constrained within a disk:
FindArgMin[{Sin[x]Sin[2y], x ^ 2 + y ^ 2 < 3}, {{x, 2}, {y, 2}}]Starting point does not have to be provided:
FindArgMin[{Sin[x]Sin[2y], x ^ 2 + y ^ 2 < 3}, {x, y}]For linear objective and constraints, integer constraints can be imposed:
FindArgMin[{x + y, 3x + 2y ≥ 7 && x ≥ 0 && y ≥ 0}, {x, y}]FindArgMin[{x + y, 3x + 2y ≥ 7 && x ≥ 0 && y ≥ 0 && x∈Integers}, {x, y}]Or constraints can be specified:
FindArgMin[{-x - y, x ^ 2 + y ^ 2 ≤ 1 || (x + 2) ^ 2 + (y + 2) ^ 2 ≤ 1}, {x, y}]t = RotationTransform[{{0, 0, 1}, {1, 1, 1}}];
ℛ = TransformedRegion[Ellipsoid[{0, 0, 0}, {1, 2, 3}], t];FindArgMin[{z, {x, y, z}∈ℛ}, {x, y, z}]Graphics3D[{{Opacity[0.5], Green, GeometricTransformation[Ellipsoid[{0, 0, 0}, {1, 2, 3}], t]}, {Red, PointSize[Large], Point[%]}}]Find the minimum distance between two regions:
Subscript[ℛ, 1] = Disk[];
Subscript[ℛ, 2] = InfiniteLine[{{-2, 0}, {0, 2}}];FindArgMin[{(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]}, {Red, Point[Partition[%, 2]]}}]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}];FindArgMin[{r, {x, y}∈Subscript[ℛ, 1] && {x, y}∈Subscript[ℛ, 2]}, {r, x, y}]Graphics[{{LightBlue, Subscript[ℛ, 1], Subscript[ℛ, 2]}, {Red, Point[{x, y}]}} /. Thread[{r, x, y} -> %]]Find the disk of minimum radius that contains the given three points:
Subscript[ℛ, 3] = Disk[{a, b}, r];FindArgMin[{r, ({0, 0} | {1, 0} | {0, 1})∈Subscript[ℛ, 3]}, {a, b, r}]Graphics[{{LightBlue, Subscript[ℛ, 3]} /. Thread[{a, b, r} -> %], {Red, Point[{{0, 0}, {1, 0}, {0, 1}}]}}]Using Circumsphere gives the same result directly:
Circumsphere[{{0, 0}, {1, 0}, {0, 1}}]//NUse
to specify that
is a vector in
:
ℛ = Sphere[];FindArgMin[{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];FindArgMin[{EuclideanDistance[x, y], {x∈Subscript[ℛ, 1], y∈Subscript[ℛ, 2]}}, {x, y}]Graphics[{{LightBlue, Subscript[ℛ, 1], Subscript[ℛ, 2]}, {Red, Point[%]}}]Options (7)
AccuracyGoal & PrecisionGoal (2)
This enforces convergence criteria
and
:
FindArgMin[Sin[x / 2], {x, 1}, AccuracyGoal -> 9, PrecisionGoal -> 8]This enforces convergence criteria
and
:
FindArgMin[Sin[x / 2], {x, 1}, AccuracyGoal -> 20, PrecisionGoal -> 18]Setting a high WorkingPrecision makes the process convergent:
FindArgMin[Sin[x / 2], {x, 1}, AccuracyGoal -> 20, PrecisionGoal -> 18, WorkingPrecision -> 40]EvaluationMonitor (1)
Gradient (1)
Use a given gradient; the Hessian is computed automatically:
FindArgMin[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:
FindArgMin[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:
FindArgMin[RealAbs[x + 1] + RealAbs[x + 1.01] + RealAbs[y + 1], {x, y}]FindArgMin[RealAbs[x + 1] + RealAbs[x + 1.01] + RealAbs[y + 1], {x, y}, Method -> "ConjugateGradient"]Direct search methods that do not require derivatives can be helpful in these cases:
FindArgMin[RealAbs[x + 1] + RealAbs[x + 1.01] + RealAbs[y + 1], {x, y}, Method -> "PrincipalAxis"]NMinimize also uses a range of direct search methods:
NMinimize[{RealAbs[x + 1] + RealAbs[x + 1.01] + RealAbs[y + 1]}, {x, y}]StepMonitor (1)
Steps taken by FindArgMin in finding the minimum of a function:
pts = Reap[FindArgMin[(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
:
FindArgMin[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 minimizer point:
FindMinimum[{x - 2y, x ^ 2 + y ^ 2 ≤ 1}, {x, y}]FindArgMin gives the location of the minimum:
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:
FindArgMin[{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:
FindArgMin[Tan[x], {x, 2}]FindArgMin[{-x ^ 2 - y ^ 2, x ^ 2 + y ^ 2 > 10}, {x, y}]Integer linear programming algorithm is only available for machine-number problems:
FindArgMin[{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:
FindArgMin[x * Sin[1 / x] ^ 2, {x}]FindArgMin[x * Sin[1 / x] ^ 2, {x, .3}]Related Guides
Text
Wolfram Research (2008), FindArgMin, Wolfram Language function, https://reference.wolfram.com/language/ref/FindArgMin.html (updated 2014).
CMS
Wolfram Language. 2008. "FindArgMin." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2014. https://reference.wolfram.com/language/ref/FindArgMin.html.
APA
Wolfram Language. (2008). FindArgMin. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/FindArgMin.html
BibTeX
@misc{reference.wolfram_2026_findargmin, author="Wolfram Research", title="{FindArgMin}", year="2014", howpublished="\url{https://reference.wolfram.com/language/ref/FindArgMin.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_findargmin, organization={Wolfram Research}, title={FindArgMin}, year={2014}, url={https://reference.wolfram.com/language/ref/FindArgMin.html}, note=[Accessed: 13-June-2026]}