{ } Raw JSON

bundles / scipy 1.17.1 / scipy / special / _orthogonal / roots_jacobi

function

scipy.special._orthogonal:roots_jacobi

source: /scipy/special/_orthogonal.py :210

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 : int

Quadrature order.

alpha : float

alpha must be > -1

beta : float

beta must be > -1

mu : bool, optional

If True, return the sum of the weights in addition to sample points and weights.

Returns

x : ndarray

Sample points.

w : ndarray

Weights.

mu : float, optional

Sum 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

scipy.integrate.fixed_quad

Aliases

  • scipy.special.j_roots

Referenced by

This package