bundles / scipy 1.17.1 / scipy / special / _orthogonal / roots_jacobi
function
scipy.special._orthogonal:roots_jacobi
Signature
def roots_jacobi ( n , alpha , beta , mu = False ) Summary
Gauss-Jacobi quadrature.
Extended Summary
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 or less over the interval with weight function . See 22.2.1 in [AS] for details.
Parameters
n: intQuadrature order.
alpha: floatalpha must be > -1
beta: floatbeta must be > -1
mu: bool, optionalIf True, return the sum of the weights in addition to sample points and weights.
Returns
x: ndarraySample points.
w: ndarrayWeights.
mu: float, optionalSum of the weights, only returned if
mu=True.
Examples
from scipy.special import roots_jacobi x, w = roots_jacobi(3, 0.5, 0.5)✓
x w✗
x, w, mu = roots_jacobi(3, 0.5, 0.5, mu=True)
✓mu
✗See also
Aliases
-
scipy.special.j_roots