Wolfram Computation Meets Knowledge

How do I accelerate NIntegrate evaluations?

Techniques for accelerating NIntegrate evaluations often depend on the integral. However, there are some common strategies:

  1. Set the NIntegrate option “SymbolicProcessing” to 0 to prevent the Wolfram Language Kernel from manipulating the integral symbolically. By default, NIntegrate symbolically preprocesses integrands. This allows NIntegrate to evaluate more difficult integrals. However, the symbolic processing slows some calculations. To numerically integrate a function called f from 0 to 1 without symbolic processing, evaluate:
     NIntegrate[f[x], {x, 0, 1}, Method -> {Automatic, "SymbolicProcessing" -> 0}]

    You can replace Automatic with any other method specification that you would like to use.

  2. Exclude singularities and discontinuities from the calculations. The Exclusions option specifies where NIntegrate should not evaluate the integrand because it is singular. For example, if the function has a denominator, specify where the denominator equals 0:
    NIntegrate[1/Sqrt[Sin[x]], {x, 0, 10}, Exclusions -> Sin[x] == 0]

You can find more techniques for accelerating numerical integration in the documentation NIntegrate Integration Strategies.

Is this article helpful?

Any comments?

Thank you for your feedback.


Contact Support

Whether you have a question about billing, activation or something more technical, we are ready to help you.

1-800-WOLFRAM (+1-217-398-0700 for international callers)

Customer Support

8am–5pm US Central Time

  • Product registration or activation
  • Pre-sales information and ordering
  • Help with installation and first launch

Advanced Technical Support (for eligible customers)

8am–5pm US Central Time

8:30–10am & 11am–5pm US Central Time

  • Priority technical support
  • Product assistance from Wolfram experts
  • Help with Wolfram Language programming
  • Advanced installation support