Techniques for accelerating NIntegrate evaluations often depend on the integral. However, there are some common strategies:
- Set the NIntegrate option “SymbolicProcessing” to
0to 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
1without symbolic processing, evaluate:
You can replace
Automaticwith any other method specification that you would like to use.
- 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
You can find more techniques for accelerating numerical integration in the documentation NIntegrate Integration Strategies.