This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)

NProduct

NProduct
gives a numerical approximation to the product .
NProduct
uses a step di in the product.
  • NProduct can be used for products with both finite and infinite limits.
  • NProduct can be used to evaluate multidimensional products.
  • The following options can be given:
AccuracyGoalInfinitynumber of digits of final accuracy sought
EvaluationMonitorNoneexpression to evaluate whenever f is evaluated
MethodAutomaticmethod to use
PrecisionGoalAutomaticnumber of digits of final precision sought
VerifyConvergenceTruewhether to explicitly test for convergence
WorkingPrecisionMachinePrecisionthe 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.
  • NProduct first localizes the values of all variables, then evaluates f with the variables being symbolic, and then repeatedly evaluates the result numerically.
Approximate an infinite product numerically:
The error versus the exact value of :
Approximate an infinite product numerically:
In[1]:=
Click for copyable input
Out[1]=
The error versus the exact value of :
In[2]:=
Click for copyable input
Out[2]=
Approximate the value of a finite product:
This is effectively the ratio of two infinite products:
Approximate a multidimensional product:
Approximate a multidimensional product with the second index depending on the first:
Complex infinite product approximation:
Multiply the even factors of an infinite product:
An equivalent way of specifying the same multiplication:
Approximate a product with the default tolerances:
Find the error versus the exact value:
The error with smaller absolute and relative tolerances:
The error with larger absolute and relative tolerances:
Get the number of evaluation points used in a product approximation:
The evaluation points used in a product approximated by an integration method:
The evaluation points used in a product approximated by a sequence extrapolation method:
Use the Wynn epsilon method to approximate an infinite product:
Compare to the exact value:
The error is smaller with the default method:
By default NProduct uses 15 factors at the beginning before approximating the tail:
The error for this example is large because the factors peak at 20:
Increasing to include this feature improves the approximation:
By default the factor's convergence is verified:
Generally, if the convergence is not verified the computation is faster:
Use higher precision to get a better approximation:
Find the error versus the exact value:
Estimate the infinite product of a BesselJ sequence:
Use a product representation to approximate the Sin function:
Use Product to compute exact formulas:
The results of Product and NProduct agree closely:
A product is equivalent to the exponential of a sum of logarithms of factors:
NProduct may not detect divergence for some infinite products:
Convergence verification is based on a ratio test that is inconclusive when equal to 1:
New in 1