Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adaptive quadrature method from MATLAB #14

Open
ivan-pi opened this issue Jan 20, 2022 · 3 comments
Open

Adaptive quadrature method from MATLAB #14

ivan-pi opened this issue Jan 20, 2022 · 3 comments

Comments

@ivan-pi
Copy link
Contributor

ivan-pi commented Jan 20, 2022

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

  • integral Numerical integration
  • quadgk Numerically evaluate integral — Gauss-Kronrod quadrature
@ivan-pi
Copy link
Contributor Author

ivan-pi commented Jan 20, 2022

Also available in Octave as quadgk.

@holetuananh
Copy link

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
Copy link
Owner

jacobwilliams commented Apr 1, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants