archimedes.quadrature.gauss_jacobiΒΆ
- archimedes.quadrature.gauss_jacobi(
- n: int,
- alpha: float,
- beta: float,
- a: float | None = None,
- b: float | None = None,
Gauss-Jacobi quadrature rule with
nnodes.Nodes are the roots of the degree-
nJacobi 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 (seegauss_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
nnodes on \([-1, 1]\), exact to degree \(2n - 1\), mapped onto \([a, b]\) if given.- Return type:
- Raises:
ValueError β If
alphaorbetais \(\leq -1\).
See also
gauss_legendreThe \(\alpha = \beta = 0\) special case.