integral
Numerical integration
Description
Examples
Input Arguments
Name-Value Arguments
Output Arguments
Tips
The
integralfunction attempts to satisfy the following expression, whereqis the computed value of the integral andQis the (unknown) exact value.The absolute and relative tolerances provide a way of trading off accuracy and computation time. Usually, the relative tolerance determines the accuracy of the integration. However, ifabs(q - Q) <= max(AbsTol,RelTol*abs(q))
abs(q)is sufficiently small, the absolute tolerance determines the accuracy of the integration. It is a best practice to specify both absolute and relative tolerances together.If you specify single-precision limits of integration, or if
funreturns single-precision results, you might need to specify larger absolute and relative error tolerances.
References
[1] Shampine, L.F. “Vectorized Adaptive Quadrature in MATLAB®.” Journal of Computational and Applied Mathematics 211, no. 2 (February 2008): 131–40. https://doi.org/10.1016/j.cam.2006.11.021.