chaospy.quadrature.jacobi

chaospy.quadrature.jacobi(order, alpha, beta, lower=- 1, upper=1, physicist=False)[source]

Gauss-Jacobi quadrature rule.

Compute the sample points and weights for Gauss-Jacobi quadrature. The sample points are the roots of the nth degree Jacobi polynomial. These sample points and weights correctly integrate polynomials of degree \(2N-1\) or less.

Gaussian quadrature come in two variants: physicist and probabilist. For Gauss-Jacobi physicist means a weight function \((1-x)^lpha (1+x)^eta\) and weights that sum to :math`2^{lpha+eta}`, and probabilist means a weight function is \(B(lpha, eta) x^{lpha-1}(1-x)^{eta-1}\) (where \(B\) is the beta normalizing constant) which sum to 1.

Args:
order (int):

The quadrature order.

alpha (float):

First Jakobi shape parameter.

beta (float):

Second Jakobi shape parameter.

lower (float):

Lower bound for the integration interval.

upper (float):

Upper bound for the integration interval.

physicist (bool):

Use physicist weights instead of probabilist.

Returns:
abscissas (numpy.ndarray):

The order+1 quadrature points for where to evaluate the model function with.

weights (numpy.ndarray):

The quadrature weights associated with each abscissas.

Examples:
>>> abscissas, weights = chaospy.quadrature.jacobi(3, alpha=2, beta=2)
>>> abscissas
array([[-0.69474659, -0.25056281,  0.25056281,  0.69474659]])
>>> weights
array([0.09535261, 0.40464739, 0.40464739, 0.09535261])
See also:

chaospy.quadrature.gaussian()