NProduct
✖
NProduct
Details and Options


- NProduct can be used for products with both finite and infinite limits.
- NProduct[f,{i,…},{j,…},…] can be used to evaluate multidimensional products.
- The following options can be given:
-
AccuracyGoal Infinity number of digits of final accuracy sought EvaluationMonitor None expression to evaluate whenever f is evaluated Method Automatic method to use PrecisionGoal Automatic number of digits of final precision sought VerifyConvergence True whether to explicitly test for convergence WorkingPrecision MachinePrecision the precision used in internal computations - Possible settings for the Method option include:
-
"EulerMaclaurin" Euler–Maclaurin summation method "WynnEpsilon" Wynn epsilon extrapolation method - With the Euler–Maclaurin method, the options AccuracyGoal and PrecisionGoal can be used to specify the accuracy and precision to try and get in the final answer. NProduct stops when the error estimates it gets imply that either the accuracy or precision sought has been reached.
- You should realize that in sufficiently pathological cases, the algorithms used by NProduct can give wrong answers. In most cases, you can test the answer by looking at its sensitivity to changes in the setting of options for NProduct.
- VerifyConvergence is only used for products with infinite limits.
- N[Product[…]] calls NProduct.
- NProduct first localizes the values of all variables, then evaluates f with the variables being symbolic, and then repeatedly evaluates the result numerically.
- NProduct has attribute HoldAll, and effectively uses Block to localize variables.
Examples
open allclose allBasic Examples (1)Summary of the most common use cases
Scope (5)Survey of the scope of standard use cases
Approximate the value of a finite product:

https://wolfram.com/xid/0y8osy-bhymr8

This is effectively the ratio of two infinite products:

https://wolfram.com/xid/0y8osy-zcyib

Approximate a multidimensional product:

https://wolfram.com/xid/0y8osy-je2e8x

Approximate a multidimensional product with the second index depending on the first:

https://wolfram.com/xid/0y8osy-pw7nwp

Complex infinite product approximation:

https://wolfram.com/xid/0y8osy-ohg49o

Multiply the even factors of an infinite product:

https://wolfram.com/xid/0y8osy-fewhjy

An equivalent way of specifying the same multiplication:

https://wolfram.com/xid/0y8osy-kwz6o5

Options (8)Common values & functionality for each option
AccuracyGoal and PrecisionGoal (1)
Approximate a product with the default tolerances:

https://wolfram.com/xid/0y8osy-iu4wep

Find the error versus the exact value:

https://wolfram.com/xid/0y8osy-bv1rtv


https://wolfram.com/xid/0y8osy-cflxjl

The error with smaller absolute and relative tolerances:

https://wolfram.com/xid/0y8osy-b0xwq6

The error with larger absolute and relative tolerances:

https://wolfram.com/xid/0y8osy-gs1rof

EvaluationMonitor (3)
Get the number of evaluation points used in a product approximation:

https://wolfram.com/xid/0y8osy-l16plx

The evaluation points used in a product approximated by an integration method:

https://wolfram.com/xid/0y8osy-k1c2o6

The evaluation points used in a product approximated by a sequence extrapolation method:

https://wolfram.com/xid/0y8osy-e9546p

Method (1)
Use the Wynn epsilon method to approximate an infinite product:

https://wolfram.com/xid/0y8osy-evwiuu


https://wolfram.com/xid/0y8osy-v25dv


https://wolfram.com/xid/0y8osy-k3ak

The error is smaller with the default method:

https://wolfram.com/xid/0y8osy-nktbd

NProductFactors (1)
By default NProduct uses 15 factors at the beginning before approximating the tail:

https://wolfram.com/xid/0y8osy-y9wilg

The error for this example is large because the factors peak at 20:

https://wolfram.com/xid/0y8osy-1gb3n


https://wolfram.com/xid/0y8osy-n0n8nx


https://wolfram.com/xid/0y8osy-lnvw3c

Increasing NProductFactors to include this feature improves the approximation:

https://wolfram.com/xid/0y8osy-i0jcsm


https://wolfram.com/xid/0y8osy-gekq3d

VerifyConvergence (1)
Applications (2)Sample problems that can be solved with this function
Properties & Relations (2)Properties of the function, and connections to other functions
Use Product to compute exact formulas:

https://wolfram.com/xid/0y8osy-x3v3j7

The results of Product and NProduct agree closely:

https://wolfram.com/xid/0y8osy-d5dpzh

A product is equivalent to the exponential of a sum of logarithms of factors:

https://wolfram.com/xid/0y8osy-dm579i


https://wolfram.com/xid/0y8osy-glkpxs

Possible Issues (2)Common pitfalls and unexpected behavior
NProduct may not detect divergence for some infinite products:

https://wolfram.com/xid/0y8osy-3sflac



Convergence verification is based on a ratio test that is inconclusive when equal to 1:

https://wolfram.com/xid/0y8osy-4lnp0x

You should realize that in sufficiently pathological cases, the algorithms used by NProduct can give wrong answers:

https://wolfram.com/xid/0y8osy-lz8x26

Compare to the result from Product:

https://wolfram.com/xid/0y8osy-8u6n6h

One option is increasing the WorkingPrecision and NProductFactors:

https://wolfram.com/xid/0y8osy-634amg

Wolfram Research (1988), NProduct, Wolfram Language function, https://reference.wolfram.com/language/ref/NProduct.html (updated 2003).
Text
Wolfram Research (1988), NProduct, Wolfram Language function, https://reference.wolfram.com/language/ref/NProduct.html (updated 2003).
Wolfram Research (1988), NProduct, Wolfram Language function, https://reference.wolfram.com/language/ref/NProduct.html (updated 2003).
CMS
Wolfram Language. 1988. "NProduct." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2003. https://reference.wolfram.com/language/ref/NProduct.html.
Wolfram Language. 1988. "NProduct." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2003. https://reference.wolfram.com/language/ref/NProduct.html.
APA
Wolfram Language. (1988). NProduct. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/NProduct.html
Wolfram Language. (1988). NProduct. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/NProduct.html
BibTeX
@misc{reference.wolfram_2025_nproduct, author="Wolfram Research", title="{NProduct}", year="2003", howpublished="\url{https://reference.wolfram.com/language/ref/NProduct.html}", note=[Accessed: 21-May-2025
]}
BibLaTeX
@online{reference.wolfram_2025_nproduct, organization={Wolfram Research}, title={NProduct}, year={2003}, url={https://reference.wolfram.com/language/ref/NProduct.html}, note=[Accessed: 21-May-2025
]}