QUADRULE
Quadrature Rules
QUADRULE
is a Python library which
sets up a variety of
quadrature rules, used to approximate the integral of a function
over various domains in 1D.
QUADRULE returns the abscissas and weights for a variety of
one dimensional quadrature rules for approximating the integral
of a function. The best rule is generally Gauss-Legendre quadrature,
but other rules offer special features, including the ability to
handle certain weight functions, to approximate an integral
on an infinite integration region, or to estimate the approximation
error.
Licensing:
The files described and made available on this web page
are distributed under
the GNU LGPL license.
Languages:
QUADRULE is available in
a C version and
a C++ version and
a FORTRAN90 version and
a MATLAB version and
a Python version.
Related Programs:
ALPERT_RULE,
a Python library which
can set up an Alpert quadrature rule for functions which are
regular, log(x) singular, or 1/sqrt(x) singular.
DISK_RULE,
a Python library which
computes quadrature rules
over the interior of the general disk in 2D,
with radius RC and center (XC,YC).
DISK01_RULE,
a Python library which
computes quadrature rules
over the interior of the unit disk in 2D, with center (0,0) and radius 1.
EXACTNESS,
a Python library which
investigates the exactness of quadrature rules that estimate the
integral of a function with a density, such as 1, exp(-x) or
exp(-x^2), over an interval such as [-1,+1], [0,+oo) or (-oo,+oo).
KRONROD,
a Python library which
can compute a Gauss and Gauss-Kronrod pair of quadrature rules
of arbitrary order,
by Robert Piessens, Maria Branders.
TRUNCATED_NORMAL,
a Python library which
works with the truncated normal distribution over [A,B], or
[A,+oo) or (-oo,B], returning the probability density function (PDF),
the cumulative density function (CDF), the inverse CDF, the mean,
the variance, and sample values.
TRUNCATED_NORMAL_RULE,
a Python program which
computes a quadrature rule for a normal distribution that has been
truncated to [A,+oo), (-oo,B] or [A,B].
Source Code:
-
bashforth_set.py,
sets abscissas and weights for Adams-Bashforth quadrature.
-
chebyshev_set.py,
sets abscissas and weights for Chebyshev quadrature.
-
chebyshev1_compute.py,
computes abscissas and weights for Chebyshev Type 1 quadrature.
-
chebyshev1_integral.py
evaluates a Chebyshev type 1 monomial integral.
-
chebyshev1_set.py,
sets abscissas and weights for Chebyshev Type 1 quadrature.
-
chebyshev2_compute.py,
computes abscissas and weights for Chebyshev Type 2 quadrature.
-
chebyshev2_integral.py
evaluates a Chebyshev type 2 monomial integral.
-
chebyshev2_set.py,
sets abscissas and weights for Chebyshev Type 2 quadrature.
-
chebyshev3_compute.py,
computes abscissas and weights for Chebyshev Type 3 quadrature.
-
chebyshev3_integral.py
evaluates a Chebyshev type 3 monomial integral.
-
chebyshev3_set.py,
sets abscissas and weights for Chebyshev Type 3 quadrature.
-
clenshaw_curtis_compute.py,
computes abscissas and weights for Clenshaw-Curtis quadrature.
-
clenshaw_curtis_set.py,
sets abscissas and weights for Clenshaw-Curtis quadrature.
-
fejer1_compute.py,
computes abscissas and weights for Fejer type 1 quadrature.
-
fejer1_set.py,
sets abscissas and weights for Fejer type 1 quadrature.
-
fejer2_compute.py,
computes abscissas and weights for Fejer type 2 quadrature.
-
fejer2_set.py,
sets abscissas and weights for Fejer type 2 quadrature.
-
gamma_values.py,
returns selected values of the gamma function.
-
gegenbauer_integral.py
evaluates a Gegenbauer monomial integral.
-
gegenbauer_ss_compute.m
computes a Gauss-Gegenbauer quadrature rule.
-
gen_hermite_ek_compute.py,
computes abscissas and weights of a generalized Hermite quadrature rule
using the Elhay-Kautsky method.
-
gen_hermite_integral.py,
returns the value of a generalized Hermite monomial integral.
-
gen_laguerre_ek_compute.py,
computes abscissas and weights of a generalized Laguerre quadrature
rule using the Elhay-Kautsky method.
-
gen_laguerre_integral.py,
returns the value of a generalized Laguerre monomial integral.
-
hermite_ek_compute.py,
computes abscissas and weights of a Hermite quadrature rule
using the Elhay-Kautsky method.
-
hermite_integral.py,
returns the value of a Hermite monomial integral.
-
hermite_set.py,
sets abscissas and weights for Hermite quadrature
with density exp(-x^2).
-
hermite_gk16_set.py,
sets a Genz-Keister Hermite quadrature rule.
-
hermite_gk18_set.py,
sets a Genz-Keister Hermite quadrature rule.
-
hermite_gk22_set.py,
sets a Genz-Keister Hermite quadrature rule.
-
hermite_gk24_set.py,
sets a Genz-Keister Hermite quadrature rule.
-
hermite_1_set.py,
sets abscissas and weights for Hermite quadrature
with density 1.
-
hermite_probabilist_set.py,
sets abscissas and weights for Hermite quadrature
with a density preferred for probability applications.
-
hyper_2f1_values.py,
returns some values of the 2F1 hypergeometric function.
-
imtqlx.py
diagonalizes a symmetric tridiagonal matrix.
-
kronrod_set.py,
sets abscissas and weights for Gauss-Kronrod quadrature.
-
jacobi_ek_compute.py,
computes abscissas and weights of a Jacobi quadrature rule
using the Elhay-Kautsky method.
-
jacobi_integral.py
evaluates a Jacobi monomial integral.
-
laguerre_ek_compute.py,
computes abscissas and weights of a Laguerre quadrature rule
using the Elhay-Kautsky method.
-
laguerre_integral.py
evaluates a Laguerre monomial integral.
-
laguerre_set.py,
sets abscissas and weights for Gauss-Laguerre quadrature
with weight rho(x)=exp(-x).
-
laguerre_1_set.py,
sets abscissas and weights for Gauss-Laguerre quadrature
with weight rho(x)=1.
-
legendre_dr_compute.py,
computes abscissas and weights of a Legendre quadrature rule
using the Davis-Rabinowitz method.
-
legendre_ek_compute.py,
computes abscissas and weights of a Legendre quadrature rule
using the Elhay-Kautsky method.
-
legendre_integral.py
evaluates a Legendre monomial integral.
-
legendre_set.py,
sets abscissas and weights for Gauss-Legendre quadrature.
-
lobatto_compute.py,
computes abscissas and weights for Lobatto quadrature.
-
lobatto_set.py,
sets abscissas and weights for Lobatto quadrature.
-
moulton_set.py,
sets abscissas and weights for Adams-Moulton quadrature.
-
nc_compute_weights.py,
computes weights for a Newton-Cotes quadrature rule.
-
ncc_compute.py,
computes a Newton-Cotes Closed quadrature rule.
-
ncc_set.py,
sets abscissas and weights for Newton-Cotes closed quadrature.
-
nco_compute.py,
computes a Newton-Cotes Open quadrature rule.
-
nco_set.py,
sets abscissas and weights for Newton-Cotes open quadrature.
-
ncoh_compute.py,
computes abscissas and weights for Newton-Cotes open half quadrature.
-
ncoh_set.py,
sets abscissas and weights for Newton-Cotes open half quadrature.
-
patterson_set.py,
sets abscissas and weights for Gauss-Patterson quadrature.
-
psi_values.py,
returns some values of the Psi function;
-
r8_epsilon.py,
returns the R8 roundoff unit.
-
r8_factorial.py,
evaluates the factorial function.
-
r8_factorial_values.py,
returns selected values of the factorial function.
-
r8_factorial2.py,
evaluates the double factorial function.
-
r8_gamma.py,
evaluates the gamma function.
-
r8_hyper_2f1.py,
evaluates the hypergeometric function 2F1.
-
r8_psi.py,
returns the Psi function;
-
r8vec_diff_norm_li.py,
returns the L-infinity norm of the difference of two R8VEC's.
-
r8vec_indicator1.py,
evaluates the 1-based indicator vector (1,2,3,...) as an R8VEC.
-
r8vec_linspace.py,
creates an R8VEC of linearly spaced data.
-
r8vec_print.py,
prints an R8VEC.
-
r8vec_reverse.py,
copies the elements of an R8VEC in reverse order.
-
r8vec_uniform_ab.py,
returns a scaled pseudorandom R8VEC.
-
radau_set.py,
sets abscissas and weights for Radau quadrature.
-
timestamp.py,
returns the YMDHMS date as a timestamp.
Examples and Tests:
You can go up one level to
the Python source codes.
Last revised on 19 November 2015.