archimedes.quadrature.gauss_radauΒΆ

archimedes.quadrature.gauss_radau(
n: int,
endpoint: str = 'left',
a: float | None = None,
b: float | None = None,
) → QuadratureRuleΒΆ

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 n nodes on \([-1, 1]\), exact to degree \(2n - 2\), mapped onto \([a, b]\) if given.

Return type:

QuadratureRule

Raises:

ValueError – If n < 1, or if endpoint is not "left" or "right".