archimedes.quadrature.gauss_lobattoΒΆ

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

Gauss-Lobatto quadrature rule including both endpoints.

Lobatto rules fix both endpoints \(\pm 1\) as nodes and choose the remaining \(n - 2\) interior nodes to maximize the polynomial degree of exactness – the roots of the Jacobi polynomial \(P_{n-2}^{(1,1)}(x)\), equivalently the roots of \(P_{n-1}' (x)\), the derivative of the degree-\((n-1)\) Legendre polynomial. The rule is exact for polynomials up to degree \(2n - 3\).

Parameters:

n (int) – Number of quadrature nodes, including both endpoints.

Returns:

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

Return type:

QuadratureRule

Raises:

ValueError – If n < 2.