archimedes.quadrature.gauss_legendreΒΆ
- archimedes.quadrature.gauss_legendre(
- n: int,
- a: float | None = None,
- b: float | None = None,
Gauss-Legendre quadrature rule with
nnodes.Nodes are the roots of the degree-
nLegendre 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.
a (float, optional) β Bounds of the target interval, forwarded to
map_to(). Must both be given, or neither (the default, giving the reference interval \([-1, 1]\)).b (float, optional) β Bounds of the target interval, forwarded to
map_to(). Must both be given, or neither (the default, giving the reference interval \([-1, 1]\)).
- Returns:
rule β Gauss-Legendre rule with
nnodes on \([-1, 1]\), exact to degree \(2n - 1\), mapped onto \([a, b]\) if given.- Return type: