Factor
更多信息和选项
- Factor 在一个表达式中仅用于顶级. 可以使用 Map 或再次使用 Factor 达到其它级.
- Factor[poly,GaussianIntegers->True] 允许高斯整数系数分解因式.
- 如果在 poly 中有任意系数是复数,则因式分解允许高斯整数系数.
- 变量的指数不必是正整数. Factor 可以处理指数是符号表达式的线性组合的情形.
- 当给定一个有理表达式时,Factor 实际上先调用 Together,然后对分子和分母分解因式.
- Factor 接受以下选项:
-
Extension None 要使用的系数域 GaussianIntegers False 是否在高斯整数上进行因式分解 Modulus 0 假设的整数模数 Trig False 是否进行三角和代数变换 - 在默认设置 Extension->None 下,Factor[poly] 会把 poly 中的代数数系数当作独立自变量一样处理.
- Factor[poly,Extension->Automatic] 会扩展系数域,直至包含任何出现在 poly 中的代数数. »
- Factor 自动逐项作用于列表、方程、不等式和逻辑函数.
范例
打开所有单元 关闭所有单元基本范例 (3)
范围 (13)
基本用法 (6)
Factor[x ^ 3 - 6x ^ 2 + 11x - 6]Factor[2x ^ 3 y - 2a ^ 2x y - 3a ^ 2x ^ 2 + 3a ^ 4]Factor[(x ^ 3 + 2x ^ 2) / (x ^ 2 - 4y ^ 2) - (x + 2) / (x ^ 2 - 4y ^ 2)]Factor[2 ^ (3x) - 1]Factor 可作用于列表的各项:
Factor[{x ^ 2 - 1, x ^ 4 - 1, x ^ 8 - 1}]Factor 可作用于等式和不等式:
Factor[1 < 1 + 2 x + x ^ 2 + 1 / (1 + x) < 2]高级用法 (7)
Factor[x ^ 2 + 1, GaussianIntegers -> True]Factor[x ^ 4 - 2, Extension -> Sqrt[2]]Factor[x ^ 3 + 1, Modulus -> 3]ℱ = FiniteField[17, 3];Factor[ℱ[3]x ^ 2 + ℱ[1771]]Factor[x ^ 3 + 5x + 19, Extension -> ℱ]ℱ = FiniteField[29, 3];
𝒢 = FiniteField[29, 6];
ℰ = FiniteFieldEmbedding[ℱ, 𝒢];在把
嵌入更大的域
后,本在
上不可约的多项式此时可以因式分解:
Factor[ℱ[12]x ^ 2 + ℱ[34]x + ℱ[56]]Factor[ℱ[12]x ^ 2 + ℱ[34]x + ℱ[56], Extension -> ℰ]Factor[x ^ (2s) + 2x ^ s + 1]Factor[x ^ (2 / 3s) + 2x ^ s + 1]Factor[Exp[2s] + 2Exp[s] + 1]rpoly[n_] := RandomInteger[{-2 ^ 10, 2 ^ 10}, {n + 1}].x ^ Range[0, n]
SeedRandom[1234];
p = rpoly[1000]; q = rpoly[1000];
r = Expand[p q];Factor[r]//Short//AbsoluteTiming选项 (7)
Extension (4)
Factor[1 + x ^ 4, Extension -> Sqrt[2]]Factor[1 + x ^ 4, Extension -> {Sqrt[2], I}]Extension->Automatic 自动扩展到涵盖系数的域上:
Factor[2 + 2Sqrt[2]x + x ^ 2]Factor[2 + 2Sqrt[2]x + x ^ 2, Extension -> Automatic]ℱ = FiniteField[73, 4];Factor[x ^ 4 + 21x + 3, Extension -> ℱ]ℱ = FiniteField[7, 2];Factor[ℱ[1]x ^ 4 + ℱ[234]x + ℱ[567]]𝒢 = FiniteField[7, 4];
ℰ = FiniteFieldEmbedding[ℱ, 𝒢];Factor[ℱ[1]x ^ 4 + ℱ[234]x + ℱ[567], Extension -> ℰ]GaussianIntegers (1)
Modulus (1)
应用 (3)
使用多项式对行为进行建模时,确定多项式何时为零非常重要. 例如,假设可用以下表达式对生产视频游戏系统的成本进行建模:
cost[x_] := -.03x ^ 3 + 4x ^ 2 - x + 500Plot[cost[x], {x, 0, 100}]revenue[x_] := .03x ^ 2 - 4x + 200Plot[revenue[x], {x, 0, 100}]profit[x_] := revenue[x] - cost[x]Plot[profit[x], {x, 0, 100}]然后用 Factor 算出利润函数为零的数量:
Factor[profit[x]]Plot[profit[x], {x, 130, 140}]x ^ 2 == xSubtractSides[%, x]用 Factor 求多项式何时为零:
Factor[%]0 ^ 21 ^ 2Factor[-x ^ 2 + x]Factor[x ^ 4 - 1]可以看出它们共有的因式为
. 用 PolynomialGCD 确认该结果:
PolynomialGCD[-x ^ 2 + x, x ^ 4 - 1]属性和关系 (3)
Factor[x ^ 50 - 1]Expand[Factor[x ^ 50 - 1]]FactorList 给出因子列表:
FactorList[x ^ 8 + 11x ^ 7 + 43x ^ 6 + 59x ^ 5 - 35x ^ 4 - 151x ^ 3 - 63x ^ 2 + 81x + 54]FactorSquareFree 仅合并多重因子:
f = x ^ 9 + 9x ^ 8 + 21x ^ 7 - 27x ^ 6 - 153x ^ 5 - 81x ^ 4 + 239x ^ 3 + 207x ^ 2 - 108x - 108;Factor[f]FactorSquareFree[f]技术笔记
-
▪
- 变换代数表达式 ▪
- 以不同形式表示表达式 ▪
- 有理式的结构运算 ▪
- 多项式的结构运算 ▪
- 多项式模素数 ▪
- 关于内部实现的一些注释: 代数和微积分
历史
1988年引入 (1.0) | 在以下年份被更新:1996 (3.0) ▪ 2007 (6.0) ▪ 2022 (13.2) ▪ 2023 (13.3)
文本
Wolfram Research (1988),Factor,Wolfram 语言函数,https://reference.wolfram.com/language/ref/Factor.html (更新于 2023 年).
CMS
Wolfram 语言. 1988. "Factor." Wolfram 语言与系统参考资料中心. Wolfram Research. 最新版本 2023. https://reference.wolfram.com/language/ref/Factor.html.
APA
Wolfram 语言. (1988). Factor. Wolfram 语言与系统参考资料中心. 追溯自 https://reference.wolfram.com/language/ref/Factor.html 年
BibTeX
@misc{reference.wolfram_2026_factor, author="Wolfram Research", title="{Factor}", year="2023", howpublished="\url{https://reference.wolfram.com/language/ref/Factor.html}", note=[Accessed: 09-September-2026]}
BibLaTeX
@online{reference.wolfram_2026_factor, organization={Wolfram Research}, title={Factor}, year={2023}, url={https://reference.wolfram.com/language/ref/Factor.html}, note=[Accessed: 09-September-2026]}