GaussLegendre
Gauss-Legendre quadrature is a method of numerical integration that approximates an integral by a weighted sum of function values at specific points. On the standard interval [-1, 1], the approximation uses n nodes x_i, the roots of the Legendre polynomial P_n(x), and corresponding weights w_i, given by w_i = 2 / [(1 − x_i^2) (P'_n(x_i))^2]. The integral ∫_{−1}^{1} f(x) dx is thus approximated by Σ_{i=1}^n w_i f(x_i). The rule is exact for all polynomials of degree at most 2n−1. By an affine transformation, it extends to any interval [a, b].
Legendre polynomials were introduced by Adrien-Marie Legendre in the 18th century, and Gaussian quadrature—optimally choosing both
Nodes and weights are typically tabulated for common n, or computed for large n via stable algorithms,
Generalizations include Gauss–Jacobi, Gauss–Chebyshev, Gauss–Laguerre, and Gauss–Hermite quadratures, which adapt the idea to different weight functions