Skip to main content

Module gauss

Module gauss 

Source
Expand description

Gauss quadrature rules for numerical integration

This module provides quadrature rules for approximating integrals by weighted sums.

The integral of f(x) * omega(x) is approximated by a weighted sum:

sum(f(xi) * wi for (xi, wi) in zip(x, w))

where we generally have superexponential convergence for smooth f(x) with the number of quadrature points.

Structs§

Rule
Quadrature rule for numerical integration.

Functions§

legendre
The Gauss-Legendre rule with n points on [-1, 1], in T, by Newton’s method on the Legendre polynomial
legendre_vandermonde
Create Legendre Vandermonde matrix for polynomial interpolation