Expand description
Numerical integration methods.
Provides composite trapezoid, composite Simpson, Romberg integration, Gauss-Legendre quadrature (5-point and variable-point), adaptive Simpson, Monte Carlo integration, Clenshaw-Curtis, double-exponential (tanh-sinh), and multidimensional trapezoid rules.
Structs§
- Quadrature
Rule - A generic quadrature rule defined by nodes and weights on a reference interval.
Functions§
- adaptive_
simpson - Approximate ∫ f(x) dx on [a, b] using recursive adaptive Simpson’s rule.
- clenshaw_
curtis - Approximate ∫_{-1}^{1} f(x) dx using Clenshaw-Curtis quadrature with
n+1points. - double_
exponential - Approximate ∫ f(x) dx on [a, b] using the tanh-sinh (double exponential) transform.
- gauss_
legendre_ 5pt - Approximate ∫ f(x) dx on [a, b] using the 5-point Gauss-Legendre formula.
- gauss_
legendre_ nodes_ weights - Return the Gauss-Legendre nodes and weights for
npoints on[-1, 1]. - monte_
carlo_ integrate - Approximate ∫ f(x) dx on [a, b] using Monte Carlo sampling with
n_samplespoints. - multidimensional_
trap - Approximate ∫ f(x) dx over a hyperrectangle using the composite trapezoid rule.
- romberg_
integration - Approximate ∫ f(x) dx on [a, b] using Romberg integration (Richardson extrapolation).
- simpson_
rule - Approximate ∫ f(x) dx on [a, b] using composite Simpson’s rule with
nsubintervals. - trapezoid_
rule - Approximate ∫ f(x) dx on [a, b] using the composite trapezoid rule with
nsubintervals.