archimedes.quadrature.gauss_legendreΒΆ

archimedes.quadrature.gauss_legendre(n: int) QuadratureRuleΒΆ

Gauss-Legendre quadrature rule with n nodes.

Nodes are the roots of the degree-n Legendre polynomial \(P_n(x)\), none of which coincide with the endpoints \(\pm 1\). The rule is exact for polynomials up to degree \(2n - 1\).

Parameters:

n (int) – Number of quadrature nodes.

Returns:

rule – Gauss-Legendre rule with n nodes on \([-1, 1]\), exact to degree \(2n - 1\).

Return type:

QuadratureRule