NIntegrate[f, x, xmin, xmax] gives a numerical approximation to the integral .
Multidimensional integrals can be specified, as in Integrate.
NIntegrate tests for singularities at the end points of the integration range.
NIntegrate[f, x, , , ... , ] tests for singularities at each of the intermediate points . If there are no singularities, the result is equivalent to an integral from to . You can use complex numbers to specify an integration contour in the complex plane.
The following options can be given:
NIntegrate usually uses an adaptive algorithm, which recursively subdivides the integration region as needed. In one dimension, GaussPoints specifies the number of initial points to choose. The default setting for GaussPoints is Floor[WorkingPrecision/3]. In any number of dimensions, 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.
The default setting for PrecisionGoal is usually equal to the setting for WorkingPrecision minus 10 digits.
If an explicit setting for MaxPoints is given, NIntegrate uses quasi Monte Carlo methods to get an estimate of the result, sampling at most the number of points specified.
The default setting for PrecisionGoal is taken to be 2 in this case.
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.
N[Integrate[ ... ]] calls NIntegrate for integrals that cannot be done symbolically.
NIntegrate has attribute HoldAll.
Possible settings for Method are GaussKronrod, DoubleExponential, Trapezoidal, Oscillatory, MultiDimensional, MonteCarlo, and QuasiMonteCarlo. GaussKronrod and MultiDimensional are adaptive methods. MonteCarlo and QuasiMonteCarlo are randomized methods, appropriate for high-dimensional integrals.
See The Mathematica Book: Section 1.6.2, Section 3.9.1, Section 3.9.2 and Section 3.9.3.
Implementation Notes: see section A.9.4.
See also: NDSolve, NSum.
Related packages: NumericalMath`ListIntegrate`, NumericalMath`CauchyPrincipalValue`, NumericalMath`GaussianQuadrature`.