library.quad Submodule

Module Summary

Interfaces for the NAG Mark 30.2 quad Chapter.

quad - Quadrature

This module provides functions for the numerical evaluation of definite integrals in one or more dimensions and for evaluating weights and abscissae of integration rules.

See Also

naginterfaces.library.examples.quad :

This subpackage contains examples for the quad module. See also the Examples subsection.

Functionality Index

Korobov optimal coefficients for use in md_numth() and md_numth_vec()

when number of points is a product of primes: md_numth_coeff_2prime()

when number of points is prime: md_numth_coeff_prime()

Multidimensional quadrature

over a finite two-dimensional region: dim2_fin()

over a general product region

Korobov–Conroy number-theoretic method: md_numth()

Sag–Szekeres method (also over -sphere): md_sphere()

variant of md_numth() especially efficient on vector machines: md_numth_vec()

over a hyper-rectangle

adaptive method

: md_adapt()

multiple integrands: md_adapt_multi()

Gaussian quadrature rule-evaluation: md_gauss()

Monte Carlo method: md_mcarlo()

sparse grid method (with user transformation)

muliple integrands, vectorized interface: md_sgq_multi_vec()

over an -simplex: md_simplex()

over an -sphere

allowing for badly behaved integrands: md_sphere_bad()

One-dimensional quadrature

adaptive integration of a function over a finite interval

strategy due to Gonnet

suitable for badly behaved integrals

vectorized interface: dim1_fin_gonnet_vec()

strategy due to Patterson

suitable for well-behaved integrands, except possibly at end-points: dim1_fin_well()

strategy due to Piessens and de Doncker

allowing for singularities at user-specified break-points: dim1_fin_brkpts()

suitable for badly behaved integrands: dim1_fin_general()

suitable for highly oscillatory integrals: dim1_fin_osc_fn()

weight function or : dim1_fin_wtrig()

weight function Cauchy principal value (Hilbert transform): dim1_fin_wcauchy()

weight function with end-point singularities of algebraico-logarithmic type: dim1_fin_wsing()

adaptive integration of a function over a infinite or semi-infinite interval

strategy due to Piessens and de Doncker: dim1_inf_general()

adaptive integration of a function over an infinite interval or semi-infinite interval

weight function or : dim1_inf_wtrig()

integration of a function defined by data values only

Gill–Miller method: dim1_data()

non-adaptive integration over a finite, semi-infinite or infinite interval

using pre-computed weights and abscissae

specific integral with weight over semi-infinite interval: dim1_inf_exp_wt()

vectorized interface: dim1_gauss_vec()

non-adaptive integration over a finite interval

: dim1_fin_smooth()

with provision for indefinite integrals also: dim1_indef()

reverse communication

adaptive integration over a finite interval

multiple integrands

efficient on vector machines: dim1_gen_vec_multi_rcomm()

Service functions

array size query for dim1_gen_vec_multi_rcomm(): dim1_gen_vec_multi_dimreq()

general option getting: opt_get()

general option setting and initialization: opt_set()

Weights and abscissae for Gaussian quadrature rules

method of Golub and Welsch

calculating the weights and abscissae: dim1_gauss_wrec()

generate recursive coefficients: dim1_gauss_recm()

more general choice of rule

calculating the weights and abscissae: dim1_gauss_wgen()

restricted choice of rule

using pre-computed weights and abscissae: dim1_gauss_wres()

For full information please refer to the NAG Library document

https://support.nag.com/numeric/nl/nagdoc_30.2/flhtml/d01/d01intro.html

Examples

naginterfaces.library.examples.quad.dim1_fin_smooth_ex.main()[source]

Example for naginterfaces.library.quad.dim1_fin_smooth().

One-dimensional quadrature, non-adaptive, finite interval.

>>> main()
naginterfaces.library.quad.dim1_fin_smooth Python Example Results.
One-dimensional quadrature, non-adaptive, finite interval.
Approximation for the integral = -0.03183099