jacobi_polynomial, a C code which evaluates the Jacobi polynomial.
For a given choice of the parameters a and b, both greater than -1, the Jacobi polynomials are a set of polynomials which are pairwise orthogonal with respect to the integral:
integral (-1<=x<=+1) J(i,a,b,x) J(j,a,b,x) (1-x)^a (1+x)^b dxThat is, this integral is 0 unless i = j. J(i,a,b,x) indicates the Jacobi polynomial of degree i.
The standard Jacobi polynomials can be defined by a three term recurrence formula that is a bit too ugly to quote here.
It is worth noting that the definition of the Jacobi polynomials is general enough that it includes some familiar families as special cases:
The computer code and data files described and made available on this web page are distributed under the MIT license
jacobi_polynomial is available in a C version and a C++ version and a FORTRAN90 version and a MATLAB version.
BERNSTEIN_POLYNOMIAL, a C code which evaluates the Bernstein polynomials, useful for uniform approximation of functions;
CHEBYSHEV_POLYNOMIAL, a C code 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 C code which evaluates the Gegenbauer polynomial and associated functions.
HERMITE_POLYNOMIAL, a C code which evaluates the physicist's Hermite polynomial, the probabilist's Hermite polynomial, the Hermite function, and related functions.
LAGUERRE_POLYNOMIAL, a C code which evaluates the Laguerre polynomial, the generalized Laguerre polynomials, and the Laguerre function.
LEGENDRE_POLYNOMIAL, a C code which evaluates the Legendre polynomial and associated functions.
LEGENDRE_SHIFTED_POLYNOMIAL, a C code which evaluates the shifted Legendre polynomial, with domain [0,1].
LOBATTO_POLYNOMIAL, a C code which evaluates Lobatto polynomials, similar to Legendre polynomials except that they are zero at both endpoints.
POLPAK, a C code which evaluates a variety of mathematical functions.
TEST_VALUES, a C code which supplies test values of various mathematical functions.