SciPy 0.6.0 API Documentation Generated by Endo, 2007-10-17
A collection of functions to find the weights and abscissas for
Gaussian Quadrature.
These calculations are done by finding the eigenvalues of a
tridiagonal matrix whose entries are dependent on the coefficients
in the recursion formula for the orthogonal polynomials with the
corresponding weighting function over the interval.
Many recursion relations for orthogonal polynomials are given:
a1n f_n+1 (x) = (a2n + a3n x ) f_n (x) - a4n f_n-1 (x)
The recursion relation of interest is
P_n+1 (x) = (x - A_n) P_n (x) - B_n P_n-1 (x)
where P has a different normalization than f.
The coefficients can be found as:
A_n = -a2n / a3n
B_n = ( a4n / a3n sqrt(h_n-1 / h_n))**2
where
h_n = int_a^b w(x) f_n(x)^2
assume:
P_0(x) = 1
P_-1(x) == 0
See Numerical Recipies in C, page 156 and
Abramowitz and Stegun p. 774, 782
Functions:
gen_roots_and_weights -- Generic roots and weights.
j_roots -- Jacobi
js_roots -- Shifted Jacobi
la_roots -- Generalized Laguerre
h_roots -- Hermite
he_roots -- Hermite (unit-variance)
cg_roots -- Ultraspherical (Gegenbauer)
t_roots -- Chebyshev of the first kind
u_roots -- Chebyshev of the second kind
c_roots -- Chebyshev of the first kind ([-2,2] interval)
s_roots -- Chebyshev of the second kind ([-2,2] interval)
ts_roots -- Shifted Chebyshev of the first kind.
us_roots -- Shifted Chebyshev of the second kind.
p_roots -- Legendre
ps_roots -- Shifted Legendre
l_roots -- Laguerre
[x,w] = c_roots(n)
Returns the roots (x) of the nth order Chebyshev (of the first kind) polynomial, C_n(x), and weights (w) to use in Gaussian Quadrature over [-2,2] with weighting function (1-(x/2)**2)**(-1/2).
[x,w] = cg_roots(n,alpha)
Returns the roots (x) of the nth order Ultraspherical (Gegenbauer) polynomial, C^(alpha)_n(x), and weights (w) to use in Gaussian Quadrature over [-1,1] with weighting function (1-x**2)**(alpha-1/2) with alpha>-1/2.
Return nth order Chebyshev polynomial of first kind, Cn(x). Orthogonal over [-2,2] with weight function (1-(x/2)**2)**(-1/2).
Return nth order Chebyshev polynomial of second kind, Sn(x). Orthogonal over [-2,2] with weight function (1-(x/)**2)**(1/2).
Return nth order Chebyshev polynomial of first kind, Tn(x). Orthogonal over [-1,1] with weight function (1-x**2)**(-1/2).
Return nth order Chebyshev polynomial of second kind, Un(x). Orthogonal over [-1,1] with weight function (1-x**2)**(1/2).
Return the nth order Gegenbauer (ultraspherical) polynomial, C^(alpha)_n(x), orthogonal over [-1,1] with weighting function (1-x**2)**(alpha-1/2) with alpha > -1/2
[x,w] = gen_roots_and_weights(n,an_func,sqrt_bn_func,mu)
Returns the roots (x) of an nth order orthogonal polynomial, and weights (w) to use in appropriate Gaussian quadrature with that orthogonal polynomial.
an_func(n) should return A_n sqrt_bn_func(n) should return sqrt(B_n) mu ( = h_0 ) is the integral of the weight over the orthogonal interval
Returns the nth order generalized (associated) Laguerre polynomial, L^(alpha)_n(x), orthogonal over [0,inf) with weighting function exp(-x) x**alpha with alpha > -1
[x,w] = h_roots(n)
Returns the roots (x) of the nth order Hermite polynomial, H_n(x), and weights (w) to use in Gaussian Quadrature over [-inf,inf] with weighting function exp(-x**2).
[x,w] = he_roots(n)
Returns the roots (x) of the nth order Hermite polynomial, He_n(x), and weights (w) to use in Gaussian Quadrature over [-inf,inf] with weighting function exp(-(x/2)**2).
Return the nth order Hermite polynomial, H_n(x), orthogonal over (-inf,inf) with weighting function exp(-x**2)
Return the nth order normalized Hermite polynomial, He_n(x), orthogonal over (-inf,inf) with weighting function exp(-(x/2)**2)
[x,w] = j_roots(n,alpha,beta)
Returns the roots (x) of the nth order Jacobi polynomial, P^(alpha,beta)_n(x) and weights (w) to use in Gaussian Quadrature over [-1,1] with weighting function (1-x)**alpha (1+x)**beta with alpha,beta > -1.
Returns the nth order Jacobi polynomial, P^(alpha,beta)_n(x) orthogonal over [-1,1] with weighting function (1-x)**alpha (1+x)**beta with alpha,beta > -1.
[x,w] = js_roots(n,p,q)
Returns the roots (x) of the nth order shifted Jacobi polynomial, G_n(p,q,x), and weights (w) to use in Gaussian Quadrature over [0,1] with weighting function (1-x)**(p-q) x**(q-1) with p-q > -1 and q > 0.
[x,w] = l_roots(n)
Returns the roots (x) of the nth order Laguerre polynomial, L_n(x), and weights (w) to use in Gaussian Quadrature over [0,inf] with weighting function exp(-x).
[x,w] = la_roots(n,alpha)
Returns the roots (x) of the nth order generalized (associated) Laguerre polynomial, L^(alpha)_n(x), and weights (w) to use in Gaussian quadrature over [0,inf] with weighting function exp(-x) x**alpha with alpha > -1.
Return the nth order Laguerre polynoimal, L_n(x), orthogonal over [0,inf) with weighting function exp(-x)
Returns the nth order Legendre polynomial, P_n(x), orthogonal over [-1,1] with weight function 1.
[x,w] = p_roots(n)
Returns the roots (x) of the nth order Legendre polynomial, P_n(x), and weights (w) to use in Gaussian Quadrature over [-1,1] with weighting function 1.
Pochhammer symbol (z)_m = (z)(z+1)....(z+m-1) = gamma(z+m)/gamma(z)
[x,w] = ps_roots(n)
Returns the roots (x) of the nth order shifted Legendre polynomial, P^*_n(x), and weights (w) to use in Gaussian Quadrature over [0,1] with weighting function 1.
[x,w] = s_roots(n)
Returns the roots (x) of the nth order Chebyshev (of the second kind) polynomial, S_n(x), and weights (w) to use in Gaussian Quadrature over [-2,2] with weighting function (1-(x/2)**2)**1/2.
Return nth order shifted Chebyshev polynomial of first kind, Tn(x). Orthogonal over [0,1] with weight function (x-x**2)**(-1/2).
Return nth order shifted Chebyshev polynomial of second kind, Un(x). Orthogonal over [0,1] with weight function (x-x**2)**(1/2).
Returns the nth order Jacobi polynomial, G_n(p,q,x) orthogonal over [0,1] with weighting function (1-x)**(p-q) (x)**(q-1) with p>q-1 and q > 0.
Returns the nth order shifted Legendre polynomial, P^*_n(x), orthogonal over [0,1] with weighting function 1.
[x,w] = t_roots(n)
Returns the roots (x) of the nth order Chebyshev (of the first kind) polynomial, T_n(x), and weights (w) to use in Gaussian Quadrature over [-1,1] with weighting function (1-x**2)**(-1/2).
[x,w] = ts_roots(n)
Returns the roots (x) of the nth order shifted Chebyshev (of the first kind) polynomial, T^*_n(x), and weights (w) to use in Gaussian Quadrature over [0,1] with weighting function (x-x**2)**(-1/2).
[x,w] = u_roots(n)
Returns the roots (x) of the nth order Chebyshev (of the second kind) polynomial, U_n(x), and weights (w) to use in Gaussian Quadrature over [-1,1] with weighting function (1-x**2)**1/2.
[x,w] = us_roots(n)
Returns the roots (x) of the nth order shifted Chebyshev (of the second kind) polynomial, U^*_n(x), and weights (w) to use in Gaussian Quadrature over [0,1] with weighting function (x-x**2)**1/2.
| Local name | Refers to |
|---|---|
| all | numpy.all |
| any | numpy.any |
| cephes | SciPy.special._cephes |
| eig | numpy.dual.eig |
| exp | numpy.exp |
| inf | numpy.inf |
| nested_scopes | __future__.nested_scopes |
| np | numpy |
| pi | numpy.pi |
| sqrt | numpy.sqrt |