FindInstance[expr,vars]
求出满足 expr 为 True 的 vars 的一个解.
FindInstance[expr,vars,dom]
求出 dom 定义域内的一个解,其中 dom 值包括 Complexes、Reals、Integers 和 Booleans.
FindInstance[expr,vars,dom,n]
求出 n 个具体解.
FindInstance
FindInstance[expr,vars]
求出满足 expr 为 True 的 vars 的一个解.
FindInstance[expr,vars,dom]
求出 dom 定义域内的一个解,其中 dom 值包括 Complexes、Reals、Integers 和 Booleans.
FindInstance[expr,vars,dom,n]
求出 n 个具体解.
更多信息和选项
- FindInstance[expr,{x1,x2,…}] 给出结果的形式和 Solve 相同:其中,如果存在一个解,则用 {{x1->val1,x2->val2,…}} 显示结果,如果不存在,显示 {}.
- expr 可以包含方程、不等式、定义域和量词,与 Reduce 的形式相同.
- 语句 expr 可以是下列的任意逻辑组合:
-
lhs==rhs 方程 lhs!=rhs 不等式 lhs>rhs 或者 lhs>=rhs 不等式 expr∈dom 定义域指定 {x,y,…}∈reg 值域指定 ForAll[x,cond,expr] 通用量词 Exists[x,cond,expr] 存在量词 - 对于明确的符号输入,FindInstance 给出明确的结果.
- 即使两个输入定义相同的数学集合,FindInstance 仍可以选择不同的解返回.
- FindInstance 返回的解一般对应于集合里的特定点或所选择的点.
- 在默认情况下,FindInstance[expr,vars] 认为不等式中的代数数量为实数,其它数量是复数形式.
- FindInstance[expr,vars,Integers] 求出丢番图方程的解.
- FindInstance[expr,vars,Booleans] 解出 expr 的布尔满足性.
- FindInstance[expr,vars,Reals] 认为 vars 和 expr 的所有函数值都为实数. FindInstance[expr&&vars∈Reals,vars] 指定只有 vars 为实数.
- FindInstance[…,x∈reg,Reals] 包括 x 在区域 reg 中. x 的不同坐标可以使用 Indexed[x,i] 指代.
- 即使 Reduce 不能给出完全解,FindInstance 也能给出具体解.
- 缺省情况下,每次只要用给定输入运行 FindInstance,它将返回同样的输出.
- 若解总数少于 n 时,FindInstance[expr,vars,dom,n] 将返回一个更短的列表.
- 可以给出下列选项:
-
Method Automatic 使用的方法 Modulus 0 假定的整数的模 RandomSeeding 1234 怎样初始化随机数 WorkingPrecision Infinity 内部计算使用的精度
范例
打开所有单元 关闭所有单元基本范例 (6)
FindInstance[x ^ 2 + y ^ 2 + z ^ 2 == -1 && z ^ 2 == 2x - 5 y, {x, y, z}]FindInstance[x ^ 2 + y ^ 2 + z ^ 2 ≤ 1 && 9z ^ 3 == 2x - 5 y - 7, {x, y, z}, Reals]FindInstance[x ^ 2 - 3y ^ 2 == 1 && 10 < x < 100, {x, y}, Integers]FindInstance[Xor[a, b, c, d] && (a || b) && !(c || d), {a, b, c, d}, Booleans]FindInstance[x ^ 2 - 3y ^ 2 == 1 && 10 < x < 1000, {x, y}, Integers, 3]FindInstance[{x, y}∈InfiniteLine[{{0, 0}, {2, 1}}] && {x, y}∈Circle[], {x, y}]Graphics[{{Blue, InfiniteLine[{{0, 0}, {2, 1}}], Circle[]}, {Red, Point[{x, y}] /. %}}]范围 (57)
复数域 (11)
FindInstance[2 x + 3y - 5z == 1 && 3x - 4y + 7z == 3, {x, y, z}]FindInstance[x ^ 3 - 2x + 1 == 0, x]FindInstance[x ^ 1234567 + 9x ^ 2 + 7x - 1 == 0, x, 5]FindInstance[x ^ 2 - y z == 1, {x, y, z}]FindInstance[x ^ 2 + y ^ 3 == z && x + 2y == 3z + 1 && x y z ≠ 0, {x, y, z}]FindInstance[x ^ 2 + y ^ 3 == z && x + 2y == 3z + 1 && x y z ≠ 0, {x, y, z}, 3]如果无解,FindInstance 将返回空列表:
FindInstance[x ^ 2 + y ^ 3 == 3 && x + 2y == 4 && x y == 5, {x, y}]如果解的数量比要求的数字少时,FindInstance 返回所有解:
FindInstance[x ^ 2 + y ^ 2 == 1 && x == 2y + 1, {x, y}, 5]FindInstance[x ^ 10000 == y ^ 2 + 3y + 2 && y ^ 10000 == z ^ 2 + 3z + 2 && z ^ 10000 == x ^ 2 + 3x + 2, {x, y, z}, 5]FindInstance[ForAll[x, Exists[y, a x ^ 2 + b y ^ 2 - 3y == 1 && a y ≠ 0]], {a, b}]FindInstance[Sqrt[x + 2y] - 3x + 4y == 5 && x + y ^ (1 / 3) == 1, {x, y}]FindInstance[Sin[x] == 1 / 3, x]FindInstance[ 4 ^ (x ^ 2)2 ^ x == 8, x]FindInstance[Log[x] == 75 / 11 I Pi + 17, x]一个在超越 Root 条件下的解:
FindInstance[Sin[Cos[x ^ 2 - 1]] - x == 1 && Abs[x] < 3, x]FindInstance[Sin[FresnelS[x] + BesselJ[3, x ^ 2 - 1]] == 2 ^ Cos[x] - 3, x, 5]FindInstance[Sin[x + y] == 1 / 2 && E ^ x - y == 1, {x, y}]{{x -> Root[{-1 - 2*Sin[1 - E^#1 - #1] & , 0.24542910765918454774059398459939984605`15.15051499783199}], y -> -1 + E^Root[{-1 - 2*Sin[1 - E^#1 - #1] & , 0.24542910765918454774059398459939984605`15.15051499783199}]}}FindInstance[Gamma[x + y + 1] - Sin[x y] == 1 && Erf[x ^ 2 - y] - E ^ y - x + 4 == 0, {x, y}]FindInstance[Sin[x + y] == x y + 1 && Cos[x - y] == AiryAi[x y] + 2, {x, y}, 3]实数域 (13)
FindInstance[2 x + 3y - 5z == 1 && 3x - 4y + 7z == 3, {x, y, z}, Reals]FindInstance[x ^ 5 - 2x + 1 == 0, x, Reals]FindInstance[x ^ 5 - 2x + 1 < 0, x, Reals]FindInstance[x ^ 2 - y z == 1, {x, y, z}, Reals]FindInstance[x ^ 2 - 2y + z ^ 2 ≥ 1, {x, y, z}, Reals]FindInstance[x ^ 2 + y z == 1 && x + 2y ≤ 3z + 1 && x y z > 7, {x, y, z}, Reals]FindInstance[x ^ 2 + y z == 1 && x + 2y ≤ 3z + 1 && x y z > 7, {x, y, z}, Reals, 4]如果无解,FindInstance 将返回空列表:
FindInstance[x ^ 2 + y ^ 3 == 3 && x + 2y ≥ 4 && x y == 5, {x, y}, Reals]如果解的数量比要求的数字少时,FindInstance 返回所有解:
FindInstance[x ^ 2 + y ^ 2 == 1 && x == 2y + 1, {x, y}, Reals, 5]FindInstance[ForAll[x, Exists[y, a x ^ 2 + b y ^ 2 - 3y == 1 && y < 0]], {a, b}, Reals]FindInstance[Sqrt[x + 2y] - 3x + 4y ≥ 5 && x + y ^ (1 / 3) == 1, {x, y}, Reals]FindInstance[Abs[(x + Abs[x + 2]) ^ 2 - 1] ^ 2 == 9 && x ≠ 0, x, Reals]FindInstance[Max[x, y] == Min[y ^ 2 - x, x] && x > 0, {x, y}, Reals]FindInstance[Abs[3x ^ 2 - 7x - 6] < Abs[x ^ 2 + x], x, Reals]FindInstance[1 < Floor[x ^ 2 + Ceiling[x ^ 2]] < 10, x, Reals]FindInstance[E ^ x - x == 7, x, Reals]FindInstance[ 27^2x - 1^(1/(x)) == Sqrt[9^2x - 1], x, Reals]一个在超越 Root 条件下的解:
FindInstance[E ^ x - Log[x] + x ^ 2 == 1, x]FindInstance[1 / 4 < Sin[x] < 1 / 3, x, Reals]FindInstance[ (1/2^x - 1) > (1/1 - 2^x - 1), x, Reals]FindInstance[Sin[x + y] == 1 / 2 && E ^ x - y ≤ 1, {x, y}, Reals]FindInstance[ 3^x - 2^2y == 77 && Sqrt[3^x] - 2^y == 7, {x, y}, Reals]FindInstance[2 ^ z Sin[x + y] == z - 1 && x Gamma[y + z] == Sin[x y] + 1 && z > E ^ x, {x, y, z}, Reals]整数域 (12)
FindInstance[2 x + 3y - 5z == 1 && 3x - 4y + 7z == 3, {x, y, z}, Integers]FindInstance[2 x + 3y == 4 && 3x - 4y ≤ 5 && x - 2y > -21, {x, y, z}, Integers]FindInstance[2 x + 3y == 4 && 3x - 4y ≤ 5 && x - 2y > -21, {x, y, z}, Integers, 5]FindInstance[x ^ 1000 - 2x ^ 777 + 1 == 0, x, Integers]FindInstance[x ^ 5 - 2x + 1 < 0, x, Integers]FindInstance[x ^ 2 + x y + y ^ 2 == 109, {x, y}, Integers]FindInstance[x ^ 2 - 3y ^ 2 == 22 && x > 0 && y > 0, {x, y}, Integers]FindInstance[x ^ 2 - 6 x y + 9y ^ 2 - x + 2y == 1, {x, y}, Integers]FindInstance[x ^ 3 - 2x ^ 2 y + y ^ 3 == 2, {x, y}, Integers]如果解的数量比要求的数字少时,FindInstance 返回所有解:
FindInstance[x ^ 3 - 2x ^ 2 y + y ^ 3 == 2, {x, y}, Integers, 3]FindInstance[x ^ 2 + y ^ 2 + z ^ 2 + t ^ 2 == 123456789, {x, y, z, t}, Integers]FindInstance[x ^ 2 + y ^ 2 == z ^ 2 && 100 < x < y < z, {x, y, z}, Integers]FindInstance[x ^ 4 + y ^ 4 + z ^ 4 ≤ 500 && x + y ^ 2 + z ^ 3 == 32, {x, y, z}, Integers]FindInstance[2x ^ 7 + 8y ^ 15 + 14 x y z == 3, {x, y, z}, Integers]FindInstance[Exp[y ^ 2] < x && Abs[x] < 5 && Abs[y] < 5, {x, y}, Integers]FindInstance[Exp[x ^ 2 - 5y ^ 2 + 1] + x ^ 2 - 5y ^ 2 == 0 && x > 0 && y > 0, {x, y}, Integers]FindInstance[Mod[x ^ 2 + y ^ 2, 2] == 1 && Mod[x - 2y, 3] == 2, {x, y}, Integers]模域 (5)
FindInstance[2 x + 3y - 5z == 1 && 3x - 4y + 7z == 3, {x, y, z}, Modulus -> 12]FindInstance[x ^ 3 - 2x + 1 == 0, x, Modulus -> 5]FindInstance[x ^ 2 - y z == 1, {x, y, z}, Modulus -> 4]FindInstance[x ^ 2 - y z == 1, {x, y, z}, 7, Modulus -> 4]FindInstance[x ^ 2 + y ^ 3 == z && x + 2y == 3z + 1 && x y z ≠ 0, {x, y, z}, Modulus -> 7]FindInstance[ForAll[x, Exists[y, a x ^ 2 + b y ^ 2 - 3y == 1 && y ≠ 0]], {a, b}, Modulus -> 3]有限域 (4)
ℱ = FiniteField[53, 4];
FindInstance[x ^ 5 + ℱ[123]x == ℱ[234], x]FindInstance[x ^ 7 + 2 x + 3 == 0, x, ℱ]ℱ = FiniteField[71, 2];
FindInstance[ℱ[123]x + ℱ[234]y == ℱ[345] && ℱ[321]x + ℱ[432]y == ℱ[543], {x, y}]FindInstance[ℱ[1234]x + ℱ[2345]y + ℱ[3456]z == ℱ[4567] && ℱ[1]x + ℱ[2]y + ℱ[3]z == ℱ[4], {x, y, z}]ℱ = FiniteField[7, 5];
FindInstance[x ^ 2 + y ^ 2 + z ^ 2 == 21, {x, y, z}, ℱ]FindInstance[ℱ[321]x ^ 3 + ℱ[432]y ^ 3 + ℱ[543]z ^ 3 == ℱ[654] && x ^ 2 == ℱ[333]y z + ℱ[111], {x, y, z}, 3]ℱ = FiniteField[2, 5];
FindInstance[Exists[z, ℱ[1]x + ℱ[3]y + ℱ[5]z == ℱ[7] && ℱ[21]x + ℱ[23]y + ℱ[25]z == ℱ[27]], {x, y}]FindInstance[Exists[{y, z}, ℱ[1]x ^ 2 + ℱ[2]y ^ 3 + ℱ[3]z ^ 4 == ℱ[4] && ℱ[5]x ^ 4 + ℱ[6]y ^ 3 + ℱ[7]z ^ 2 == ℱ[8] && x y z != ℱ[0]], x]混合域 (3)
FindInstance[x ^ 2 + y ^ 2 == -1 && Element[x, Reals], {x, y}]FindInstance[x ^ 2 + y ^ 2 < -1 && Element[x, Reals], {x, y}, Complexes]包括 Abs[z] 的不等式:
pts = {Re[z], Im[z]} /. FindInstance[1 < Abs[ (z - 2/2z - 1)] < 2, z, 7]Block[{z = u + I v}, RegionPlot[1 < Abs[ (z - 2/2z - 1)] < 2, {u, -1, 1}, {v, -1, 1}, Epilog -> {Blue, PointSize[Large], Point[pts]}]]几何区域 (9)
Subscript[ℛ, 1] = Circle[];
Subscript[ℛ, 2] = Line[{{-2, 1}, {1, -2}}];FindInstance[{x, y}∈Subscript[ℛ, 1], {x, y}∈Subscript[ℛ, 2]]Graphics[{{Blue, Subscript[ℛ, 1], Subscript[ℛ, 2]}, {Red, Point[{x, y}] /. %}}]Subscript[ℛ, 1] = Sphere[];
Subscript[ℛ, 2] = InfinitePlane[{{0, 0, 0}, {0, 1, 0}, {1, 0, 1}}];FindInstance[2 x y ≤ z^2 && {x, y, z}∈Subscript[ℛ, 1] && {x, y, z}∈Subscript[ℛ, 2], {x, y, z}, Reals]Show[{ContourPlot3D[2 x y == z^2, {x, -1.2, 1.2}, {y, -1.2, 1.2}, {z, -1.2, 1.2}, Mesh -> None, ContourStyle -> Opacity[0.5]], Graphics3D[{{Opacity[0.5], Green, Subscript[ℛ, 1]}, {Opacity[0.5], Yellow, Subscript[ℛ, 2]}, {PointSize[Large], Red, Point[{x, y, z} /. %]}}]}]ℛ = Cone[{{1, 2, 3}, {3, 2, 1}}, 1];FindInstance[Subscript[∃, z]{x, y, z}∈ℛ, {x, y}, Reals, 100];Graphics3D[{{Green, ℛ}, {Red, Point[{x, y, 0} /. %]}}]ℛ = ImplicitRegion[a + 2 b - 3 c ≥ 1 && a b c == 7, {a, b, c}];FindInstance[{x, y, z}∈ℛ, {x, y, z}, Reals]ℛ = ParametricRegion[{s + t, s - t, s t}, {s, t}];FindInstance[x y > z && {x, y, z}∈ℛ, {x, y, z}, Reals]Subscript[ℛ, 1] = Disk[{0, 0}, 2];
Subscript[ℛ, 2] = Circle[{1, 1}, 2];
Subscript[ℛ, 3] = RegionIntersection[Subscript[ℛ, 1], Subscript[ℛ, 2]];FindInstance[x^2 ≥ x y + 1, {x, y}∈Subscript[ℛ, 3]]Show[{RegionPlot[x^2 ≥ x y + 1, {x, -2, 3}, {y, -2, 3}], Graphics[{{Opacity[0.5], Yellow, Subscript[ℛ, 1]}, {Green, Subscript[ℛ, 2]}, {Red, Point[{x, y} /. %]}}]}]Subscript[ℛ, 1] = InfiniteLine[{{2, 0}, {0, t}}];
Subscript[ℛ, 2] = Circle[];FindInstance[Subscript[∃, {x, y}]({x, y}∈Subscript[ℛ, 1] && {x, y}∈Subscript[ℛ, 2]), t, Reals]Subscript[ℛ, 1] = Circle[{a, b}, r];
Subscript[ℛ, 2] = Circle[{a + 1, b}, r];
Subscript[ℛ, 3] = RegionIntersection[Subscript[ℛ, 1], Subscript[ℛ, 2]];FindInstance[({0, 1} | {0, -1})∈Subscript[ℛ, 3], {a, b, r}, Reals]Show[{Graphics[{{Blue, Subscript[ℛ, 1]}, {Green, Subscript[ℛ, 2]}, {Red, Point[{{0, 1}, {0, -1}}]}} /. %]}]ℛ = RegionIntersection[Circle[], Line[{{-2, -1}, {1, 2}}]];FindInstance[x∈ℛ, x]ℛ = Sphere[];FindInstance[x.{1, 2, 3} == 0 && x.{-3, -2, -1} < 0, x∈ℛ]选项 (3)
Modulus (1)
RandomSeeding (1)
FindInstance[x ^ 2 + y ^ 2 ≤ 1, {x, y}, 3]在默认的情况下,FindInstance 每次选择相同解:
FindInstance[x ^ 2 + y ^ 2 ≤ 1, {x, y}, 3]用 RandomSeedingAutomatic 每次生成潜在的新实例:
FindInstance[x ^ 2 + y ^ 2 ≤ 1, {x, y}, 3, RandomSeeding -> Automatic]WorkingPrecision (1)
TimeConstrained[FindInstance[x ^ 77 + 3x - 11 == E && y ^ 5 - x ^ 2 y + 21 == Pi && x ^ 2y ^ 3 + z ^ 4 == E ^ Pi, {x, y, z}, Reals], 60]按限定的 WorkingPrecision,FindInstance 找到一个近似解:
FindInstance[x ^ 77 + 3x - 11 == E && y ^ 5 - x ^ 2 y + 21 == Pi && x ^ 2y ^ 3 + z ^ 4 == E ^ Pi, {x, y, z}, Reals, WorkingPrecision -> 100]//Timing应用 (11)
几何问题 (6)
区域 ℛ 是 的子集,如果
为空. 显示 Disk[{0,0},{2,1}] 是 Rectangle[{-2,-1},{2,1}] 的子集:
ℛ = Disk[{0, 0}, {2, 1}];
𝒮 = Rectangle[{-2, -1}, {2, 1}];FindInstance[{x, y}∈RegionDifference[ℛ, 𝒮], {x, y}, Reals]Graphics[{{LightRed, EdgeForm[Gray], 𝒮}, {LightBlue, EdgeForm[Gray], ℛ}}]显示 Rectangle[] 不是 Disk[{0,0},7/5] 的子集:
ℛ = Rectangle[];
𝒮 = Disk[{0, 0}, 7 / 5];FindInstance[{x, y}∈RegionDifference[ℛ, 𝒮], {x, y}, Reals]Graphics[{{LightRed, EdgeForm[Gray], 𝒮}, {LightBlue, EdgeForm[Gray], ℛ}, {Red, Point[{x, y} /. %]}}]显示 Cylinder[]⊆Ball[{0,0,0},2]:
ℛ = Cylinder[];
𝒮 = Ball[{0, 0, 0}, 2];FindInstance[{x, y, z}∈RegionDifference[ℛ, 𝒮], {x, y, z}, Reals]Graphics3D[{{Opacity[0.3], 𝒮}, {LightBlue, EdgeForm[Gray], ℛ}}]显示 Cylinder[]⊈Ball[{0,0,0},7/5]:
ℛ = Cylinder[];
𝒮 = Ball[{0, 0, 0}, 7 / 5];FindInstance[{x, y, z}∈RegionDifference[ℛ, 𝒮], {x, y, z}, Reals]Graphics3D[{{Opacity[0.3], 𝒮}, {LightBlue, Opacity[0.3], EdgeForm[Gray], ℛ}, {Red, PointSize[Large], Point[{x, y, z} /. %]}}]p = {x, y} /. FindInstance[x ^ 2 - y ^ 3 ≤ 2 && x ^ 2 + (y + 2) ^ 2 ≤ 1, {x, y}]r1 = RegionPlot[x ^ 2 - y ^ 3 ≤ 2, {x, -3, 3}, {y, -3, 3}, PlotStyle -> Directive[Opacity[0.5], Hue[0.3]]];
r2 = RegionPlot[x ^ 2 + (y + 2) ^ 2 ≤ 1, {x, -3, 3}, {y, -3, 3}, PlotStyle -> Directive[Opacity[0.5], Hue[0.7]]];Show[{r1, r2, Graphics[{Red, PointSize[Large], Point[p]}]}]triangle = a > 0 && b > 0 && c > 0 && a + b > c && a + c > b && b + c > a;
s = 1 / 2(a + b + c);
F = Sqrt[s(s - a)(s - b)(s - c)];
conjecture = 27(b ^ 2 + c ^ 2 - a ^ 2) ^ 2(a ^ 2 + c ^ 2 - b ^ 2) ^ 2(a ^ 2 + b ^ 2 - c ^ 2) ^ 2 ≤ (4F) ^ 6;FindInstance[triangle && !conjecture, {a, b, c}, Reals]acute = a ^ 2 + b ^ 2 > c ^ 2 && a ^ 2 + c ^ 2 > b ^ 2 && b ^ 2 + c ^ 2 > a ^ 2;FindInstance[triangle && acute && !conjecture, {a, b, c}, Reals]布尔问题 (2)
statement = (a && ((a && !(b || (a && c))) || b || (a && c))) || !a || !((a && !(b || (a && c))) || b || (a && c));FindInstance[!statement, {a, b, c}, Booleans]用 TautologyQ 证明:
TautologyQ[statement]statement = (b && ((a && !(b || (a && c))) || b || (a && c))) || !a || !((a && !(b || (a && c))) || b || (a && c));FindInstance[!statement, {a, b, c}, Booleans]用 SatisfiabilityInstances 也可以做到:
SatisfiabilityInstances[!statement, {a, b, c}]整数问题 (3)
FindInstance[x ^ 2 + y ^ 2 == 5 ^ 2 && y > x > 0, {x, y}, Integers]Table[z -> FindInstance[x ^ 2 + y ^ 2 == z ^ 2 && y > x > 0, {x, y}, Integers], {z, 30}]Table[z -> FindInstance[x ^ 2 + y ^ 2 == z ^ 2 && y > x > 0, {x, y}, Integers, 10], {z, 30}]FindInstance[x ^ 2 + y ^ 2 + z ^ 2 == 1 ^ 2, {x, y, z}, Integers, 1000]sol = Table[FindInstance[x ^ 2 + y ^ 2 + z ^ 2 == d ^ 2, {x, y, z}, Integers, 1000], {d, 20}];Graphics3D[Point[{x, y, z}] /. sol]FindInstance[a + c == b + d == a + b == c + d && a ≠ b ≠ c ≠ d, {a, b, c, d}, Integers]属性和关系 (10)
system = x ^ 2 + y ^ 2 + z ^ 2 ≤ 1 && x ^ 2 - y ^ 3 + 2z ≤ 3;system /. FindInstance[system, {x, y, z}, 7]用 RootReduce 证明代数数字满足方程:
system = x ^ 2 + y ^ 3 + 2x y == 1;system /. FindInstance[system, {x, y}, 2]RootReduce[%]如果无解,FindInstance 将返回空列表:
FindInstance[x ^ 2 + y ^ 2 < 0, {x, y}, Reals]如果实际解比要求数字少,FindInstance 返回所有解:
FindInstance[x ^ 2 - 1 == 0, x, 3]使用 Reduce 设置得到解的完全集:
Reduce[x ^ 2 + y ^ 2 + z ^ 2 ≤ 1 && x ^ 2 - y ^ 3 + 2z ≤ 3, {x, y, z}, Reals]Reduce[a x ^ 2 + b x + c == 0, x]用 Solve 得到复合方程系统的解系统:
Solve[a x ^ 2 + b x + c == 0, x]FindInstance[x ^ 2 + y ^ 2 + z ^ 2 == 12345678, {x, y, z}, Integers]使用 SquaresR 找到平方和问题的数字解:
SquaresR[3, 12345678]FindInstance[x ^ 3 + y ^ 3 + z ^ 3 == 1234567 && x > 0 && y > 0 && z > 0, {x, y, z}, Integers]用 PowersRepresentations 列举所有解:
PowersRepresentations[1234567, 3, 3]statement = (a || b || c) && (!a || !b || !c);FindInstance[statement, {a, b, c}, 2]使用SatisfiabilityInstances 来获取表示为布尔向量的解:
SatisfiabilityInstances[statement, {a, b, c}, 2]FindInstance 表明多项式
为非负:
f = x ^ 2 + 2y ^ 2 + 3 z ^ 2 - x y - x z - y z;FindInstance[f < 0, {x, y, z}]使用 PolynomialSumOfSquaresList 将
表示为平方和的形式:
PolynomialSumOfSquaresList[f, {x, y, z}]f - %.%//Expandm = x ^ 4 y ^ 2 + x ^ 2 y ^ 4 - 3 x ^ 2 y ^ 2 + 1;FindInstance[m < 0, {x, y}]PolynomialSumOfSquaresList[m, {x, y}]巧妙范例 (1)
pts = {x, y} /. FindInstance[x ^ 4 - 4 x ^ 3 y - x ^ 2 y ^ 2 + 4 x y ^ 3 + y ^ 4 == 1, {x, y}, Integers, 100]ContourPlot[x ^ 4 - 4 x ^ 3 y - x ^ 2 y ^ 2 + 4 x y ^ 3 + y ^ 4 == 1, {x, -10, 10}, {y, -10, 10}, Epilog -> {PointSize[Large], Red, Point[pts]}]技术笔记
-
▪
- 不等式 ▪
- 不同域上的方程和不等式 ▪
- 复数多项式系统
历史
2003年引入 (5.0) | 在以下年份被更新:2014 (10.0) ▪ 2017 (11.2) ▪ 2024 (14.0)
文本
Wolfram Research (2003),FindInstance,Wolfram 语言函数,https://reference.wolfram.com/language/ref/FindInstance.html (更新于 2024 年).
CMS
Wolfram 语言. 2003. "FindInstance." Wolfram 语言与系统参考资料中心. Wolfram Research. 最新版本 2024. https://reference.wolfram.com/language/ref/FindInstance.html.
APA
Wolfram 语言. (2003). FindInstance. Wolfram 语言与系统参考资料中心. 追溯自 https://reference.wolfram.com/language/ref/FindInstance.html 年
BibTeX
@misc{reference.wolfram_2026_findinstance, author="Wolfram Research", title="{FindInstance}", year="2024", howpublished="\url{https://reference.wolfram.com/language/ref/FindInstance.html}", note=[Accessed: 20-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_findinstance, organization={Wolfram Research}, title={FindInstance}, year={2024}, url={https://reference.wolfram.com/language/ref/FindInstance.html}, note=[Accessed: 20-June-2026]}