archimedes.quadrature.gauss_radauΒΆ
- archimedes.quadrature.gauss_radau(
- n: int,
- endpoint: str = 'left',
- a: float | None = None,
- b: float | None = None,
Gauss-Radau quadrature rule including exactly one endpoint.
Radau rules fix one endpoint of \([-1, 1]\) as a node and choose the remaining \(n - 1\) nodes to maximize the polynomial degree of exactness. Fixing the left endpoint, these are the roots of the Jacobi polynomial \(P_{n-1}^{(0,1)}(x)\); fixing the right endpoint, the roots of \(P_{n-1}^{(1,0)}(x)\). The rule is exact for polynomials up to degree \(2n - 2\).
- Parameters:
n (int) β Number of quadrature nodes, including the fixed endpoint.
endpoint ({"left", "right"}, optional) β
Which endpoint of \([-1, 1]\) to fix as a node:
"left"includes \(-1\) (LGR, the pseudospectral convention)."right"includes \(+1\) (Radau IIA, the IRK/DAE convention).
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-Radau rule with
nnodes on \([-1, 1]\), exact to degree \(2n - 2\), mapped onto \([a, b]\) if given.- Return type:
- Raises:
ValueError β If
n < 1, or ifendpointis not"left"or"right".