LEGENDRE_POLYNOMIAL
Legendre Polynomials
LEGENDRE_POLYNOMIAL
is a Python library which
evaluates the Legendre polynomial and associated functions.
The Legendre polynomial P(n,x) can be defined by:
P(0,x) = 1
P(1,x) = x
P(n,x) = (2*n-1)/n * x * P(n-1,x) - (n-1)/n * P(n-2,x)
where n is a nonnegative integer.
The N zeroes of P(n,x) are the abscissas used for Gauss-Legendre
quadrature of the integral of a function F(X) with weight function 1
over the interval [-1,1].
The Legendre polynomials are orthogonal under the inner product defined
as integration from -1 to 1:
Integral ( -1 <= x <= 1 ) P(i,x) * P(j,x) dx
= 0 if i =/= j
= 2 / ( 2*i+1 ) if i = j.
Licensing:
The computer code and data files described and made available on this
web page are distributed under
the GNU LGPL license.
Languages:
LEGENDRE_POLYNOMIAL is available in
a C version and
a C++ version and
a FORTRAN90 version and
a MATLAB version and
a Python version.
Related Data and Programs:
BERNSTEIN_POLYNOMIAL,
a Python library which
evaluates the Bernstein polynomials,
useful for uniform approximation of functions;
CHEBYSHEV_POLYNOMIAL,
a Python library which
considers the Chebyshev polynomials T(i,x), U(i,x), V(i,x) and W(i,x).
Functions are provided to evaluate the polynomials, determine their zeros,
produce their polynomial coefficients, produce related quadrature rules,
project other functions onto these polynomial bases, and integrate
double and triple products of the polynomials.
GEGENBAUER_POLYNOMIAL,
a Python library which
evaluates the Gegenbauer polynomial and associated functions.
LEGENDRE_PRODUCT_POLYNOMIAL,
a Python library which
defines Legendre product polynomials, creating a multivariate
polynomial as the product of univariate Legendre polynomials.
LEGENDRE_SHIFTED_POLYNOMIAL,
a Python library which
evaluates the shifted Legendre polynomial, with domain [0,1].
POLPAK,
a Python library which
evaluates a variety of mathematical functions.
TEST_VALUES,
a Python library which
supplies test values of various mathematical functions.
Source Code:
-
imtqlx.py,
diagonalizes a symmetric tridiagonal matrix;
-
p_exponential_product.py,
exponential products for P(n,x).
-
p_integral.py,
evaluates a monomial integral associated with P(n,x).
-
p_polynomial_coefficients.py,
coefficients of Legendre polynomials P(n,x).
-
p_polynomial_prime.py,
evaluates the derivative of Legendre polynomials P(n,x).
-
p_polynomial_prime2.py,
evaluates the second derivative of Legendre polynomials P(n,x).
-
p_polynomial_value.py,
evaluates the Legendre polynomials P(n,x).
-
p_polynomial_values.py,
returns selected values of the Legendre polynomials P(n,x).
-
p_polynomial_zeros.py,
zeros of Legendre function P(n,x).
-
p_power_product.py,
power products for Legendre polynomial P(n,x).
-
p_quadrature_rule.py,
quadrature for Legendre function P(n,x).
-
pm_polynomial_value.py,
evaluates the Legendre polynomials Pm(n,m,x).
-
pm_polynomial_values.py,
selected values of Legendre polynomials Pm(n,m,x).
-
pmn_polynomial_value.py,
evaluates the normalized Legendre polynomials Pmn(n,m,x).
-
pmn_polynomial_values.py,
selected values of the normalized Legendre polynomials Pmn(n,m,x).
-
pmns_polynomial_value.py,
evaluates the sphere normalized Legendre polynomials Pmns(n,m,x).
-
pmns_polynomial_values.py,
selected values of the sphere normalized Legendre polynomials Pmns(n,m,x).
-
pn_pair_product.py,
pair products for normalized Legendre polynomial Pn(n,x).
-
pn_polynomial_coefficients.py,
coefficients of the normalized Legendre polynomials Pn(n,x).
-
pn_polynomial_value.py,
evaluates the normalized Legendre polynomials Pn(n,x).
-
pn_polynomial_values.py,
selected values of the normalized Legendre polynomials Pn(n,x).
-
r8_epsilon.py,
returns the machine precision.
-
r8_factorial.py,
computes the factorial function;
-
r8_factorial_values.py,
returns selected values of the factorial function;
-
r8_sign.py,
returns the sign of an R8.
-
r8mat_print.py,
prints an R8MAT;
-
r8mat_print_some.py,
prints some of an R8MAT;
-
r8vec_print.py,
prints an R8VEC;
-
r8vec2_print.py,
prints a pair of R8VEC's;
-
timestamp.py,
prints the current YMDHMS date as a time stamp.
Examples and Tests:
You can go up one level to
the Python source codes.
Last revised on 17 March 2016.