{ } Raw JSON

bundles / scipy 1.17.1 / scipy / special / _orthogonal / roots_sh_legendre

function

scipy.special._orthogonal:roots_sh_legendre

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

Signature

def   roots_sh_legendre ( n mu = False )

Summary

Gauss-Legendre (shifted) quadrature.

Extended Summary

Compute the sample points and weights for Gauss-Legendre quadrature. The sample points are the roots of the nth degree shifted Legendre polynomial . These sample points and weights correctly integrate polynomials of degree or less over the interval with weight function . See 2.2.11 in [AS] for details.

Parameters

n : int

quadrature order

mu : bool, optional

If True, return the sum of the weights, optional.

Returns

x : ndarray

Sample points

w : ndarray

Weights

mu : float

Sum of the weights

See also

scipy.integrate.fixed_quad

Aliases

  • scipy.special.ps_roots