bundles / scipy 2.0.0.dev0+git20260907.41eeb59 / scipy / special / _orthogonal / roots_jacobi
function
scipy.special._orthogonal:roots_jacobi
source: build-install/usr/lib/python3.14/site-packages/scipy/special/_orthogonal.py:246
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✗
array([0.393, 0.785, 0.393])
x, w, mu = roots_jacobi(3, 0.5, 0.5, mu=True)
✓mu
✗np.float64(1.5707963267948963)
See also
Aliases
scipy.special.j_roots