Product 
更多信息和选项
- Product[f,{i,imax}] 可以输出为
f. - ∏ 可以输出为
prod
或 \[Product]. - Product[f,{i,imin,imax}] 可以输出为
f. - 在正常输出中,∏ 的限应为底标和顶标,而当嵌在其它文本中时为下标和上标.
- Product 用标准的 Wolfram 语言迭代指定.
- 迭代变量 i 通过使用 Block 视为局部的.
- 如果一个乘积范围是有限的,i 通常分配给一系列值,每个值计算 f.
- 在多重积中,首先给出最外层变量的范围.
- 一个乘积的极限不一定是数. 它们可以是 Infinity 或符号表达式.
- 如果一个乘积不能表示成有限项的乘积形式,Product 试图找到一个符号结果. 在这种情况下,f 首先进行符号计算.
- 定义了不定乘积
,以便有连续
的项的比率给出
. - 定和不定总和可以以任何顺序混合使用.
- 可以提供以下选项:
-
Assumptions $Assumptions 关于参数的假设 GenerateConditions False 是否产生涉及参数条件的答案 GeneratedParameters None 如何命名产生的参数 Method Automatic 使用的方法 Regularization None 使用哪种正规化 VerifyConvergence True 是否验证收敛性 - Regularization 的可能值包括 None 和 "Dirichlet". {reg1,reg2,…} 在多重积中,对不同的变量指定不同的方案.
- Product 实际上执行标准表给出的所有乘积.
- Product 用 ∏ 以 StandardForm 形式输出.
- Parallelize[Product[f,iter]] 或 ParallelProduct[f,iter] 在所有子内核中并行计算 Product[f,iter]. »
范例
打开所有单元 关闭所有单元基本范例 (5)
Product[i ^ 2, {i, 1, 6}]Product[i ^ 2, {i, 1, n}]Subsuperscript[∏, i = 1, n]i ^ 2Product[1 - 1 / i ^ 4, {i, 2, Infinity}]Product[2 ^ (j + i), {i, 1, p}, {j, 1, i}]范围 (28)
基本用途 (9)
Product[f[i], {i, 1, 4}]Product[f[i], {i, 1, 4, 2}]Product[f[i], {i, {a, b, c}}]{DiscretePlot[(11 / 12) ^ i (2 + Sin[i 2Pi / 15]), {i, 50}, PlotRange -> All], DiscretePlot[Product[(11 / 12) ^ i(2 + Sin[i 2Pi / 15]), {i, j}], {j, 50}, PlotRange -> All]}Product[f[i, j], {i, 1, 3}, {j, 1, 3}]Product[f[i, j], {i, 1, 3, 2}, {j, 1, 3, 1 / 2}]Grid@{{DiscretePlot3D[(1 + (11 / 12) ^ i * Sin[i 2Pi / 15]) (1 + 1 / j ^ 2), {i, 25}, {j, 25}, PlotRange -> All, ExtentSize -> Full, ImageSize -> 250], DiscretePlot3D[Log[1 + Product[(1 + (11 / 12) ^ i * Sin[i 2Pi / 15]) (1 + 1 / j ^ 2), {i, i}, {j, l}]], {i, 25}, {l, 25}, PlotRange -> All, ExtentSize -> Full, ImageSize -> 250]}}Product[f[i, j], {i, 1, 3}, {j, 1, i}]Product[f[i, j], {i, {a, b, c}}, {j, 1, 3}]list = Table[Graphics[{c, Disk[]}, ImageSize -> 20], {c, {Red, Green, Blue}}];Product[f[i, j], {i, list}, {j, 1, 3}]Product[(1 + 1 / i ^ 2), {i, ∞}]Product[1 + 1 / (i ^ 2 + 1), {i, -∞, ∞}]Product[1 + 1 / (1 + i + j) ^ 3, {i, ∞}, {j, ∞}]//QuietProduct[a^i, {i, n}]Product[a ^ i, {j, m}, {i, j}]p = Product[i, i]DiscreteRatio[p, i](p /. i -> n + 1) / (p /. i -> 1)Product[i, {i, n}]Product[i j, i, j]DiscreteRatio[%, i, j]//FullSimplifyProduct[i j, {i, 1, n}, j]使用 GenerateConditions 获得答案是正确的的条件:
Product[1 + a ^ i, {i, ∞}, GenerateConditions -> True]Refine 得到的答案:
Refine[%, Abs[a] < 1]使用 Assumptions 直接提供对 Product 的假设:
Product[1 + a ^ i, {i, ∞}, Assumptions -> -1 / 2 < a < 1 / 2, GenerateConditions -> True]对未经计算的式子运用 N 实际上相当于使用 NProduct:
Product[1 - 1 / (3 ^ i i ^ 5), {i, 1, Infinity}]N[%]特殊不定乘积 (10)
Product[f[i + 1] / f[i], i]Product[DiscreteRatio[a^f[i], i], i]Product[a ^ i, i]Sum[i, i]{Product[a ^ (1 / (i(i + 1))), i], a ^ Sum[1 / (i(i + 1)), i]}First[%] / Last[%]//Simplify{Product[a ^ (b ^ i), i], a ^ Sum[b ^ i, i]}First[%] / Last[%]//SimplifyProduct[(i + 1)(i + 2), i]Product[(i + 1) / (i + 2), i]Product[(i + 1) / (i + 2) / (i + 1 / 2), i]Product[(i^2 + 1/i^5 + 1), i]超几何项序列可以用 BarnesG 来表达:
Product[i!, i]对所有超几何项序列, DiscreteRatio 是有理数:
DiscreteRatio[i!, i]hl = {a ^ i, i!, Gamma[i], Pochhammer[a, i], FactorialPower[a, i], Binomial[i, a], Binomial[b, i], CatalanNumber[i]};DiscreteRatio[hl, i]DiscreteRatio[Times@@RandomChoice[hl, 3], i]它们的乘积一般需要 BarnesG:
Product[Gamma[i]Pochhammer[a, i] / CatalanNumber[i], i]Product[3 q^2i + 5, i]p[x_] := (x - 1 / 2)(x + 3 / 2)(x + 200)p[q ^ i]Product[%, i]q 有理函数的乘积总是可以用 q 有理数和 q 阶乘来表示:
Product[(q^8 (i + 1) + 11/q^8 i + 11), i]Product[DiscreteRatio[(q^i + 2 q^2i/q^i + 5 + 7), i](2 q^i + 1), i]r[x_] := (x/x^5 + 11x + 2)r[q ^ i]一般需要 Root 对象:
Product[%, i]DiscreteRatio[%, i]Product[Sin[3i + 5], i]Product[Sin[3i + 5] + Cos[3i], i]Product[Tan[3i + 5], i]Product[Sinh[3i + 5], i]Product[Cosh[2i - 5] + Tanh[2i], i]Product[(2i + 3)^3i + 7, i]Product[((i + 1/i^2 + 3))^3i + 7, i]Product[Ceiling[i + 1 / 2], i, Assumptions -> i∈Integers]Product[Floor[i^2 + 1], i, Assumptions -> i∈Integers]Product[Cos[Floor[i + 3 / 2]], i, Assumptions -> i > 2]Product[Cos[i + 1], i]DiscretePlot[1 + Mod[i^2 + 1, 3], {i, 25}, PlotRange -> {0, 3}]Product[1 + Mod[i^2 + 1, 3], i]Product[(1/1 + Sin[i 2Pi / 3]), i]DiscretePlot[Sin[(1/1 + Mod[i ^ 2, 3])], {i, 25}, PlotRange -> {0, 1}]Product[Sin[(1/1 + Mod[i ^ 2, 3])], i]Product[((1/i(i + 1)))^Mod[i, 3], i]Product[2 + Sin[i π / 2] + (1/i), i]Product[DiscreteRatio[f[i] ^ 2, i], i]Product[DiscreteRatio[Cos[b i + x]^b i + x + Sin[b i + x], i], i]特殊有限乘积 (9)
Product[a^1 / i, {i, 1, n}]Product[a^1 / i^2, {i, 1, ∞}]Product[a^HarmonicNumber[i] / i ^ 2, {i, 1, ∞}]Product[1 - 1 / (13i ^ 2), {i, 1, n}]Product[1 - 1 / (13i ^ 2), {i, 1, ∞}]Product[(i^3 - 1/i^3 + 1), {i, 2, ∞}]Product[1 + 1 / i, {i, 1, ∞}]超几何项的乘积可以用 BarnesG 来表达:
Product[i!, {i, 0, n}]Product[(i!Pochhammer[a, i]Binomial[a - i, i]/(2i)!! Beta[i + 1, a - 1]), {i, n}]Product[q^3 i + 1, {i, 0, n}]Product[(q^8 (i + 1) + 11/q^8 i + 11), {i, a, b}]Product[(q^3i/q^2i + q^i + 1), {i, n}]Product[(2^i/4^i + Sqrt[2]^i + 1), {i, n}]Product[1 + Sin[3i + 5], {i, 1, n}]Product[1 + 1 / Sinh[3i + 5], {i, 1, n}]Product[ (i^3/1 + Max[i^2 - 1, i^3 - 3]), {i, ∞}]Product[1 + (1/k^2)FractionalPart[(2k^2 + 5/3k^2 + 2)], {k, 1, ∞}]Product[1 + (1/k^2 + Floor[ (k/k + 1) + Floor[(12/1 + k^2)]]), {k, 1, ∞} ]Product[1 + 1 / Prime[i] ^ s, {i, ∞}]Product[1 + z ^ 2 ^ i, {i, n}]Product[((i + 1) ^ 2 / (i(i + 2))) ^ (Log[i] / Log[2]), {i, 1, ∞}]Product[1 - (4 / 3)Sin[x / 3 ^ i] ^ 2, {i, ∞}]Product[DiscreteRatio[f[i], i], {i, 1, n}]Product[DiscreteRatio[Sin[b i + x], i], {i, 1, n}]Product[i j, {j, 1, p}, {i, 1, q}]推广和延伸 (1)
ParallelProduct 并行计算 Product:
ParallelProduct[N[π^(1/i)], {i, 10 ^ 6}]Product 可以有效使用 ParallelProduct 自动并行运行:
Parallelize[Product[N[π^(1/i)], {i, 10 ^ 6}]]选项 (4)
Assumptions (1)
用 Assumptions 来研究在不同条件下参数的行为:
Product[1 - q ^ i, {i, Infinity}, Assumptions -> Abs[q] > 1]Product[1 - q ^ i, {i, Infinity}, Assumptions -> Abs[q] < 1]GenerateConditions (1)
Regularization (1)
Product[Prime[i], {i, Infinity}]使用 Regularization 给这个乘积分配一个有限值:
Product[Prime[i], {i, Infinity}, Regularization -> "Dirichlet"]VerifyConvergence (1)
Product[i, {i, 1, Infinity}]在这种情况下,设置 VerifyConvergence 为 False 可能会分配一个有限值:
Product[i, {i, Infinity}, VerifyConvergence -> False]应用 (6)
乘积定义的函数 (1)
许多特殊函数是由乘积定义的,包括 Factorial:
Product[i, {i, n}]Product[x + i, {i, 0, n - 1}]FullSimplify[% - Pochhammer[x, n]]Product[x - i, {i, 0, n - 1}]FullSimplify[% - FactorialPower[x, n]//FunctionExpand, n∈Integers && n > 0]Product[1 - a q ^ i, {i, 0, n - 1}]Product[i ^ i, {i, n}]以及 BarnesG:
Product[Gamma[i], {i, n - 1}]常数的乘积表达 (1)
许多常数可以用乘积来表达,包括 Pi:
2 Product[(4 k ^ 2) / ((2 k - 1) (2 k + 1)), {k, 1, ∞}]2 E Product[(1 + 2 / k) ^ ((-1) ^ (k + 1) k), {k, 1, ∞}]E:
2 Product[1 + 1 / (k ^ 2 Pi ^ 2), {k, 1, Infinity}]//TrigToExp2 Product[1 + 4 / ((2 k - 1) ^ 2 Pi ^ 2), {k, 1, Infinity}]//TrigToExp(%% + %) / 2E ^ (EulerGamma / 12) (2 Pi) ^ (1 / 12) Product[k ^ (1 / k ^ 2), {k, 1, Infinity}] ^ (1 / (2 Pi ^ 2))//FullSimplify函数的乘积表达 (1)
Product[1 - z ^ 2 / (Pi ^ 2 i ^ 2), {i, 1, ∞}]Product[1 - (4 z ^ 2) / (Pi ^ 2 (2 i - 1) ^ 2), {i, 1, ∞}]Product[Pi ^ 2 (2 i - 1) ^ 2 / (Pi ^ 2 (2 i - 1) ^ 2 - 4 z ^ 2), {i, 1, ∞}](1 / z) Product[(Pi ^ 2 i ^ 2) / (Pi ^ 2 i ^ 2 - z ^ 2), {i, 1, ∞}]使用拉格朗日插值的近似表达 (1)
LagrangePolynomial[data_, x_] /; MatrixQ[data] :=
Module[{n = Length[data], xl, yl},
{xl, yl} = Transpose[data];
Sum[Product[(x - xl[[i]]) / (xl[[j]] - xl[[i]]), {i, Complement[Range[n], {j}]}]yl[[j]], {j, n}]
]LagrangePolynomial[data_, x_] /; VectorQ[data] :=
LagrangePolynomial[Transpose[{Range[Length[data]], data}], x]q = LagrangePolynomial[{{x1, y1}, {x2, y2}, {x3, y3}}, x]Table[q, {x, {x1, x2, x3}}]r = InterpolatingPolynomial[{{x1, y1}, {x2, y2}, {x3, y3}}, x]Simplify[q - r]乘积优化表达 (1)
s = Product[(3 / 2) ^ i, {i, 1, n}]formula = Table[{n, Timing[s;][[1]]}, {n, 2 ^ Range[3, 12]}]procedure = Table[{n, Timing[Product[(3 / 2) ^ i, {i, 1, n}];][[1]]}, {n, 2 ^ Range[3, 12]}]ListLogPlot[{formula, procedure}, Filling -> Axis, PlotRange -> All, Joined -> True]估计参数的似然函数 (1)
likelihood[f_, data_] := Product[Evaluate[PDF[f, x]], {x, data}]一个小数据集 ExponentialDistribution 的似然函数:
l = likelihood[ExponentialDistribution[λ], {1, 5, 4, 3, 7}]Maximize[{l, λ ≥ 0}, λ]BernoulliDistribution 的似然函数:
l = likelihood[BernoulliDistribution[θ], {1, 0, 0, 0, 1, 1, 1}]Maximize[{l, 0 ≤ θ ≤ 1}, θ]属性和关系 (4)
NProduct 用数值方法计算乘积:
NProduct[1 + 5 / i ^ 2, {i, 1, Infinity}]Product[1 + 5 / i ^ 2, {i, 1, Infinity}]N[%]将 N 应用到一个未计算的乘积上,等价于使用 NProduct:
Product[1 - 1 / (2 ^ i i ^ 3), {i, 1, Infinity}]N[%]DiscreteRatio 是不定乘积的逆:
DiscreteRatio[Product[f[i], i], i]Product[DiscreteRatio[f[i], i], i]Product 本质上求解一个特定的微分方程,类似求解 RSolve:
RSolve[y[n + 1] == 2y[n] && y[0] == 1, y[n], n]Product[2, {i, 1, n}]RSolve[y[n + 1] == (n + 1)y[n] && y[1] == 1, y[n], n]Product[i, {i, 1, n}]//FunctionExpand可能存在的问题 (2)
Product[1 + 1 / i, {i, 1, Infinity}]Product[i, {i, 1, n}]% /. n -> 5.5Product[i, {i, 1, 5.5}]使用 GenerateConditions 得到明确的假设:
Product[i, {i, 1, n}, GenerateConditions -> True]% /. n -> 5.5Product[i, {i, a, b, δ}]使用 GenerateConditions,假设是明确的:
Product[i, {i, a, b, δ}, GenerateConditions -> True]巧妙范例 (2)
Product[(4i - 1) ^ (4i - 1), {i, n}]Product[i ^ E ^ (-a i), {i, 1, Infinity}]flist = {{((k + 1)^3 (k + 5)/k^2), 1, n}, {k!, 0, n}, {1 + (1/k^2), 1, Infinity}, {1 - (4/3) Sin[(x/3^k)]^2, 1, Infinity}, {1 + (1/Prime[k]^s), 1, Infinity}, {((k + 3/k + 1))^k, 1, n}, {(Sin[3 k + 5]/Cos[3 k + 1]), 1, n}};Grid[Join[{{f[k], Text["Infinite Product"]}}, Transpose[{flist[[ ;; , 1]], Map[Product[#[[1]], {k, #[[2]], #[[3]]}]&, flist]}]], Background -> {None, {{None, GrayLevel[.9]}}, {{1, 1} -> Hue[.6, .4, 1], {1, 2} -> Hue[.6, .4, 1]}}, BaseStyle -> {FontFamily -> Times, FontSize -> 12}, Dividers -> All, FrameStyle -> Hue[.6, .4, .8], Spacings -> {2, 1}]//TraditionalForm技术笔记
历史
1988年引入 (1.0) | 在以下年份被更新:1996 (3.0) ▪ 2008 (7.0) ▪ 2019 (12.0)
文本
Wolfram Research (1988),Product,Wolfram 语言函数,https://reference.wolfram.com/language/ref/Product.html (更新于 2019 年).
CMS
Wolfram 语言. 1988. "Product." Wolfram 语言与系统参考资料中心. Wolfram Research. 最新版本 2019. https://reference.wolfram.com/language/ref/Product.html.
APA
Wolfram 语言. (1988). Product. Wolfram 语言与系统参考资料中心. 追溯自 https://reference.wolfram.com/language/ref/Product.html 年
BibTeX
@misc{reference.wolfram_2026_product, author="Wolfram Research", title="{Product}", year="2019", howpublished="\url{https://reference.wolfram.com/language/ref/Product.html}", note=[Accessed: 28-November-2026]}
BibLaTeX
@online{reference.wolfram_2026_product, organization={Wolfram Research}, title={Product}, year={2019}, url={https://reference.wolfram.com/language/ref/Product.html}, note=[Accessed: 28-November-2026]}