jacobwilliams / quadpack

Modern Fortran QUADPACK Library for 1D numerical quadrature
Other
65 stars 8 forks source link

Adaptive quadrature method from MATLAB #14

Open ivan-pi opened 2 years ago

ivan-pi commented 2 years ago

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

ivan-pi commented 2 years ago

Also available in Octave as quadgk.

holetuananh commented 1 year ago

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).

jacobwilliams commented 1 year ago