gives a numerical approximation to the integral .


gives a numerical approximation to the multiple integral .


integrates over the geometric region reg.

Details and Options

  • 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:
  • AccuracyGoalInfinitydigits of absolute accuracy sought
    EvaluationMonitorNoneexpression to evaluate whenever expr is evaluated
    ExclusionsNoneparts of the integration region to exclude
    MaxPointsAutomaticmaximum total number of sample points
    MaxRecursionAutomaticmaximum number of recursive subdivisions
    MethodAutomaticmethod to use
    MinRecursion0minimum number of recursive subdivisions
    PrecisionGoalAutomaticdigits of precision sought
    WorkingPrecisionMachinePrecisionthe 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 product of rules
    "ClenshawCurtisRule"ClenshawCurtis rule
    "GaussKronrodRule"Gauss points with Kronrod extension
    "LevinRule"Levin-type oscillatory rules
    "LobattoKronrodRule"GaussLobatto points with Kronrod extension
    "MultidimensionalRule"multidimensional symmetric rule
    "MultipanelRule"combination of 1D rules
    "NewtonCotesRule"NewtonCotes rule
    "RiemannRule"Riemann sum rule
    "TrapezoidalRule"uniform points in one dimension
  • With the setting Method->"rule", the strategy method will be selected automatically.
  • Additional method suboptions can be given in the form Method->{,opts}.
  • NIntegrate symbolically analyzes its input to transform oscillatory and other integrands, subdivide piecewise functions, and select optimal algorithms.
  • The method suboption "SymbolicProcessing" specifies the maximum number of seconds for which to attempt performing symbolic analysis of the integrand.
  • N[Integrate[]] calls NIntegrate for integrals that cannot be done symbolically.
  • NIntegrate first localizes the values of all variables, then evaluates f with the variables being symbolic, and then repeatedly evaluates the result numerically.
  • NIntegrate has attribute HoldAll and effectively uses Block to localize variables.


open all close all

Basic Examples  (5)

Compute a numerical integral:

Click for copyable input

Compute a multidimensional integral (with singularity at the origin):

Click for copyable input

Compute areas and volumes for implicitly defined regions:

Click for copyable input
Click for copyable input

Integrate over any region:

Click for copyable input
Click for copyable input

Integrate oscillatory and other complicated functions:

Click for copyable input
Click for copyable input

Scope  (56)

Options  (30)

Applications  (26)

Properties & Relations  (9)

Possible Issues  (5)

Neat Examples  (2)

Introduced in 1988
Updated in 2014