LEGENDRE_PRODUCT, a MATLAB library which computes weighted integrals of products of Legendre polynomials.
LEGENDRE_LINEAR_PRODUCT takes as input the maximum degree P and the (nonnegative integer) exponent E and computes
Tij = Integral ( -1 <= X <= +1 ) X^E * L(i)(X) * L(j)(X) dxfor I and J between 0 and P.
LEGENDRE_EXPONENTIAL_PRODUCT takes as input the maximum degree P and the coefficient B and computes
Tij = Integral ( -1 <= X <= +1 ) exp(B*X) * L(i)(X) * L(j)(X) dxfor I and J between 0 and P.
When the polynomial chaos expansion is used to study stochastic differential equations, it is a common task to have to form and compute integrals of the sort considered here.
Note that, because of the orthonormality of the Legendre polynomials, LEGENDRE_LINEAR_PRODUCT will return the identity matrix when E=0, and LEGENDRE_EXPONENTIAL_PRODUCT will return the identity matrix when B=0.
What is more interesting is that, because of the recursion relationship
i*L(i+1)(X) = (2*i-1)*X * L(i)(X) -(i-1)*L(i-1)(X)LEGENDRE_LINEAR_PRODUCT will return a symmetric tridiagonal matrix (with zero diagonal) when E=1.
The computer code and data files described and made available on this web page are distributed under the GNU LGPL license.
HERMITE_POLYNOMIAL, a MATLAB library which evaluates the physicist's Hermite polynomial, the probabilist's Hermite polynomial, the Hermite function, and related functions.
LEGENDRE_RULE, a MATLAB program which computes a Gauss-Legendre quadrature rule.
POLPAK, a MATLAB library which evaluates a variety of mathematical functions.
pce_legendre, a MATLAB program which assembles the system matrix associated with a polynomal chaos expansion of a 2D stochastic PDE, using Legendre polynomials;
QUADRULE, a MATLAB library which defines quadrature rules on a variety of intervals with different weight functions.