quadpack
quadpack copied to clipboard
Adaptive quadrature method from MATLAB
It would be nice to add the MATLAB algorithm, which is described in
Shampine, L. F. (2008). Vectorized adaptive quadrature in MATLAB. Journal of Computational and Applied Mathematics, 211(2), 131-140. https://doi.org/10.1016/j.cam.2006.11.021
I believe the algorithm is similar to those in QUADPACK, but with a few small differences in how the error estimate is constructed.
For simplicity it offers a unified interface for both proper and improper integrals.
See also
Also available in Octave as quadgk.
My program shows that it seems with the same absErr and relErr, the Matlab version gives around twice less function evaluations than one from Quadpack. I think that comes from the difference in error estimation (somehow mentioned in Shampine paper).
- Octave code here: https://github.com/gnu-octave/octave/blob/default/scripts/general/quadgk.m
- Julia code here: https://github.com/JuliaMath/QuadGK.jl/blob/master/src/adapt.jl