archimedes.quadrature.gauss_lobattoΒΆ
- archimedes.quadrature.gauss_lobatto(
- n: int,
- a: float | None = None,
- b: float | None = None,
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.
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-Lobatto rule with
nnodes on \([-1, 1]\), exact to degree \(2n - 3\), mapped onto \([a, b]\) if given.- Return type:
- Raises:
ValueError β If
n < 2.