archimedes.quadrature.gauss_jacobiΒΆ

archimedes.quadrature.gauss_jacobi(
n: int,
alpha: float,
beta: float,
a: float | None = None,
b: float | None = None,
) → QuadratureRuleΒΆ

Gauss-Jacobi quadrature rule with n nodes.

Nodes are the roots of the degree-n Jacobi polynomial \(P_n^{(\alpha,\beta)}(x)\). The rule is exact for polynomials up to degree \(2n - 1\), weighted by the reference weight \((1-x)^\alpha (1+x)^\beta\) on \([-1, 1]\).

Gauss-Legendre is the special case \(\alpha = \beta = 0\) (see gauss_legendre()); Gauss-Radau and Gauss-Lobatto also build on Jacobi polynomials with one or both exponents shifted to fix an endpoint (see gauss_radau(), gauss_lobatto()).

Parameters:
  • n (int) – Number of quadrature nodes.

  • alpha (float) – Exponents of the weight function. Must be \(> -1\).

  • beta (float) – Exponents of the weight function. Must be \(> -1\).

  • a (float, optional) – Bounds of the target interval. Must both be given, or neither. Defaults to \([-1, 1]\).

  • b (float, optional) – Bounds of the target interval. Must both be given, or neither. Defaults to \([-1, 1]\).

Returns:

rule – Gauss-Jacobi rule with n nodes on \([-1, 1]\), exact to degree \(2n - 1\), mapped onto \([a, b]\) if given.

Return type:

QuadratureRule

Raises:

ValueError – If alpha or beta is \(\leq -1\).

See also

gauss_legendre

The \(\alpha = \beta = 0\) special case.