.. _sphx_glr_api_gallery_calculus_quadrature: Quadrature ---------- Riemann sums, Simpson's rule, Gauss-Legendre, Euler-Maclaurin, Romberg, Clenshaw-Curtis, tanh-sinh, and QUADPACK-style adaptive quadrature. .. raw:: html
.. raw:: html
.. thumbnail-parent-div-open .. raw:: html
.. only:: html .. image:: /api/gallery/calculus/quadrature/images/thumb/sphx_glr_plot_01_gauss_legendre_thumb.png :alt: :doc:`/api/gallery/calculus/quadrature/plot_01_gauss_legendre` .. raw:: html
Gaussian quadrature: optimal nodes are exact to degree 2n-1
.. raw:: html
.. only:: html .. image:: /api/gallery/calculus/quadrature/images/thumb/sphx_glr_plot_02_simpson_parabolas_thumb.png :alt: :doc:`/api/gallery/calculus/quadrature/plot_02_simpson_parabolas` .. raw:: html
Simpson's rule: parabolas through pairs of panels
.. raw:: html
.. only:: html .. image:: /api/gallery/calculus/quadrature/images/thumb/sphx_glr_plot_03_riemann_sums_thumb.png :alt: :doc:`/api/gallery/calculus/quadrature/plot_03_riemann_sums` .. raw:: html
Riemann sums: the definition of the integral
.. raw:: html
.. only:: html .. image:: /api/gallery/calculus/quadrature/images/thumb/sphx_glr_plot_04_euler_maclaurin_thumb.png :alt: :doc:`/api/gallery/calculus/quadrature/plot_04_euler_maclaurin` .. raw:: html
Euler-Maclaurin: correcting the trapezoidal rule
.. raw:: html
.. only:: html .. image:: /api/gallery/calculus/quadrature/images/thumb/sphx_glr_plot_05_romberg_thumb.png :alt: :doc:`/api/gallery/calculus/quadrature/plot_05_romberg` .. raw:: html
Romberg integration: extrapolating the trapezoidal rule
.. raw:: html
.. only:: html .. image:: /api/gallery/calculus/quadrature/images/thumb/sphx_glr_plot_06_clenshaw_curtis_thumb.png :alt: :doc:`/api/gallery/calculus/quadrature/plot_06_clenshaw_curtis` .. raw:: html
Clenshaw-Curtis vs. Gauss-Legendre quadrature
.. raw:: html
.. only:: html .. image:: /api/gallery/calculus/quadrature/images/thumb/sphx_glr_plot_07_tanh_sinh_thumb.png :alt: :doc:`/api/gallery/calculus/quadrature/plot_07_tanh_sinh` .. raw:: html
Tanh-sinh quadrature: integrating endpoint singularities
.. raw:: html
.. only:: html .. image:: /api/gallery/calculus/quadrature/images/thumb/sphx_glr_plot_08_adaptive_quadpack_thumb.png :alt: :doc:`/api/gallery/calculus/quadrature/plot_08_adaptive_quadpack` .. raw:: html
Adaptive quadrature (QUADPACK): subdividing where it is needed
.. thumbnail-parent-div-close .. raw:: html
.. toctree:: :hidden: /api/gallery/calculus/quadrature/plot_01_gauss_legendre /api/gallery/calculus/quadrature/plot_02_simpson_parabolas /api/gallery/calculus/quadrature/plot_03_riemann_sums /api/gallery/calculus/quadrature/plot_04_euler_maclaurin /api/gallery/calculus/quadrature/plot_05_romberg /api/gallery/calculus/quadrature/plot_06_clenshaw_curtis /api/gallery/calculus/quadrature/plot_07_tanh_sinh /api/gallery/calculus/quadrature/plot_08_adaptive_quadpack