This is documentation for Mathematica 6, which was
based on an earlier version of the Wolfram Language.
 Built-in Mathematica Symbol Tutorials »| See Also »| More About »

# NIntegrate

 NIntegrate[f, {x, xmin, xmax}]gives a numerical approximation to the integral . NIntegrate[f, {x, xmin, xmax}, {y, ymin, ymax}, ...] gives a numerical approximation to the multiple integral .
• Multiple integrals use a variant of the standard iterator notation. The first variable given corresponds to the outermost integral, and is done last.
• NIntegrate by default tests for singularities at the boundaries of the integration region, and at the boundaries of regions specified by settings for the Exclusions option.
• NIntegrate[f, {x, x0, x1, ..., xk}] tests for singularities in a one-dimensional integral at each of the intermediate points xi. If there are no singularities, the result is equivalent to an integral from x0 to xk. You can use complex numbers xi to specify an integration contour in the complex plane.
• The following options can be given:
 AccuracyGoal Infinity digits of absolute accuracy sought EvaluationMonitor None expression to evaluate whenever expr is evaluated Exclusions None parts of the integration region to exclude MaxPoints Automatic maximum total number of sample points MaxRecursion Automatic maximum number of recursive subdivisions Method Automatic method to use MinRecursion 0 minimum number of recursive subdivisions PrecisionGoal Automatic digits of precision sought WorkingPrecision MachinePrecision the precision used in internal computations
• NIntegrate usually uses adaptive algorithms, which recursively subdivide the integration region as needed. MinRecursion specifies the minimum number of recursive subdivisions to try. MaxRecursion gives the maximum number.
• NIntegrate usually continues doing subdivisions until the error estimate it gets implies that the final result achieves either the AccuracyGoal or the PrecisionGoal specified.
• For low-dimensional integrals, the default setting for PrecisionGoal is related to WorkingPrecision. For high-dimensional integrals, it is typically taken to be a fixed value, usually 2.
• You should realize that with sufficiently pathological functions, the algorithms used by NIntegrate 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 NIntegrate.
• Possible explicit settings for the Method option include:
 "GlobalAdaptive" global adaptive integration strategy "LocalAdaptive" local adaptive integration strategy "DoubleExponential" double exponential quadrature "MonteCarlo" Monte Carlo integration "AdaptiveMonteCarlo" adaptive Monte Carlo integration "QuasiMonteCarlo" quasi Monte Carlo integration "AdaptiveQuasiMonteCarlo" adaptive quasi Monte Carlo integration
• With Method->{"strategy", Method->"rule"} or Method->{"strategy", Method->{rule1, rule2, ...}} possible strategy methods include:
 "GlobalAdaptive" subdivide based on global error estimates "LocalAdaptive" subdivide based only on local error estimates
• Methods used as rules include:
 "CartesianRule" multidimensional Cartesian product of rules "ClenshawCurtisRule" Clenshaw-Curtis rule "GaussKronrodRule" Gauss points with Kronrod extension "LobattoKronrodRule" Gauss-Lobatto points with Kronrod extension "MultidimensionalRule" multidimensional symmetric rule "MultipanelRule" combination of 1D rules "NewtonCotesRule" Newton-Cotes rule "TrapezoidalRule" uniform points in one dimension
• Additional method suboptions can be given in the form Method->{..., opts}.
• The method suboption "SymbolicProcessing" specifies the maximum number of seconds for which to attempt performing symbolic analysis of the integrand.
• NIntegrate first localizes the values of all variables, then evaluates f with the variables being symbolic, and then repeatedly evaluates the result numerically.
Compute a numerical integral:
 Out[1]=

Compute a multi dimensional integral (with singularity at the origin):
 Out[1]=

Compute a high dimensional integral:
 Out[2]=
 Scope   (16)
 Options   (10)
 Applications   (3)
New in 1 | Last modified in 6