FindMinValue[f,x]
给出 f 的一个局部最小值.
FindMinValue[f,{x,x0}]
给出 f 的一个局部最小值,通过从点 x=x0 开始搜索求出.
FindMinValue[f,{{x,x0},{y,y0},…}]
给出多元函数的一个局部最小值.
FindMinValue[{f,cons},{{x,x0},{y,y0},…}]
给出约束 cons 下的一个局部最小值.
FindMinValue[{f,cons},{x,y,…}]
在约束定义的区域内的一个点开始.
FindMinValue
FindMinValue[f,x]
给出 f 的一个局部最小值.
FindMinValue[f,{x,x0}]
给出 f 的一个局部最小值,通过从点 x=x0 开始搜索求出.
FindMinValue[f,{{x,x0},{y,y0},…}]
给出多元函数的一个局部最小值.
FindMinValue[{f,cons},{{x,x0},{y,y0},…}]
给出约束 cons 下的一个局部最小值.
FindMinValue[{f,cons},{x,y,…}]
在约束定义的区域内的一个点开始.
更多信息和选项
- FindMinValue[…] 实际上等价于 First[FindMinimum[…]].
- 如果一个变量的起点以列表形式给出,则变量值采用有相同维的列表.
- cons 可以包含等式、不等式或它们的逻辑组合.
- 约束条件 cons 可以是下面所示情况的任意逻辑组合:
-
lhs==rhs 等式 lhs>rhs 或 lhs>=rhs 不等式 {x,y,…}∈reg 区域规范 - FindMinValue 首先局部化所有变量值,然后计算符号变量 f,然后重复进行计算数值结果.
- FindMinValue 有属性 HoldAll,并实际上用 Block 局部化变量.
- FindMinValue[f,{x,x0,x1}] 用 x0 和 x1 作为 x 的前 2 个值搜索 f 的局部最小值,避免使用导数.
- FindMinValue[f,{x,x0,xmin,xmax}] 搜索局部最小值,如果 x 超出了 xmin 到 xmax 的范围,停止搜索.
- 除了当 f 和 cons 都是线性的,FindMinValue 的结果可能是局部的,但不是全局的最大数.
- 在默认情况下,所有变量都假定为实数.
- 对于线性 f 和 cons,x∈Integers 可以用来指定一个变量仅采用整数值.
- FindMinValue 有和 FindMinimum 相同的选项.
-
AccuracyGoal Automatic 搜索的准确度 EvaluationMonitor None 当 f 计算时,计算的表达式 Gradient Automatic f 梯度分量的列表 MaxIterations Automatic 使用最大迭代数 Method Automatic 使用的方法 PrecisionGoal Automatic 搜索的精度 StepMonitor None 每个步骤计算的表达式 WorkingPrecision MachinePrecision 内部计算的精度
所有选项的列表
范例
打开所有单元 关闭所有单元基本范例 (4)
FindMinValue[2x ^ 2 - 3x + 5, x]FindMinValue[Sin[x]Sin[2y], {x, y}]FindMinValue[{x - 2y, x ^ 2 + y ^ 2 ≤ 1}, {x, y}]FindMinValue[{x + y, {x, y}∈Disk[]}, {x, y}]范围 (12)
FindMinValue[x Cos[x], {x, 5}]FindMinValue[x Cos[x], {x, 10}]FindMinValue[Sin[x]Sin[2y], {{x, 2}, {y, 2}}]FindMinValue[{Sin[x]Sin[2y], x ^ 2 + y ^ 2 < 3}, {{x, 2}, {y, 2}}]FindMinValue[{Sin[x]Sin[2y], x ^ 2 + y ^ 2 < 3}, {x, y}]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 约束:
FindMinValue[{-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];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, %}}]}}]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[%]]}}]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 -> %]Subscript[ℛ, 3] = Disk[{a, b}, r];FindMinValue[{r, ({0, 0} | {1, 0} | {0, 1})∈Subscript[ℛ, 3]}, {a, b, r}]使用 Circumsphere 可直接给出相同结果:
Circumsphere[{{0, 0}, {1, 0}, {0, 1}}]//Nℛ = Sphere[];FindMinValue[{x.{1, 2, 3}, x∈ℛ}, x]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 + %]}}]选项 (8)
AccuracyGoal 和 PrecisionGoal (2)
FindMinValue[Sin[x / 2], {x, 1}, AccuracyGoal -> 9, PrecisionGoal -> 8]FindMinValue[Sin[x / 2], {x, 1}, AccuracyGoal -> 20, PrecisionGoal -> 18]提高 WorkingPrecision,将使得过程收敛:
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"]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)
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"]FindMinValue[Abs[x + 1] + Abs[x + 1.01] + Abs[y + 1], {x, y}, Method -> "PrincipalAxis"]NMinimize 也可以使用直接搜索方式的范围:
NMinimize[{Abs[x + 1] + Abs[x + 1.01] + Abs[y + 1]}, {x, y}]StepMonitor (1)
在求函数的最小值过程中,FindMinValue 采用的步长:
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)
设置工作精度为
;缺省情况下 AccuracyGoal 和 PrecisionGoal 设置为
:
FindMinValue[Cos[x ^ 2 - 3 y] + Sin[x ^ 2 + y ^ 2], {x, y}, Method -> "Newton", WorkingPrecision -> 20]属性和关系 (1)
FindMinimum 给出最小值和最小化参数:
FindMinimum[{x - 2y, x ^ 2 + y ^ 2 ≤ 1}, {x, y}]FindArgMin 以列表方式给出最小值的坐标:
FindArgMin[{x - 2y, x ^ 2 + y ^ 2 ≤ 1}, {x, y}]FindMinValue 给出最小点的值:
FindMinValue[{x - 2y, x ^ 2 + y ^ 2 ≤ 1}, {x, y}]可能存在的问题 (4)
FindMinValue[{x + y, x ^ 2 + y ^ 2 ≥ 2 && x ^ 2 + y ^ 2 ≤ 1}, {x, y}]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]]FindMinValue[{x + y, x + 2y ≥ 3 && x > 1 && y > 1 && x∈Integers}, {x, y}, WorkingPrecision -> 20]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}}]相关指南
-
▪
- 最优化 ▪
- 凸优化 ▪
- 区域上的求解器 ▪
- 符号向量、矩阵和数组
文本
Wolfram Research (2008),FindMinValue,Wolfram 语言函数,https://reference.wolfram.com/language/ref/FindMinValue.html (更新于 2014 年).
CMS
Wolfram 语言. 2008. "FindMinValue." Wolfram 语言与系统参考资料中心. Wolfram Research. 最新版本 2014. https://reference.wolfram.com/language/ref/FindMinValue.html.
APA
Wolfram 语言. (2008). FindMinValue. Wolfram 语言与系统参考资料中心. 追溯自 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: 18-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: 18-June-2026]}