**gegenbauer_polynomial**,
a Python code which
evaluates Gegenbauer polynomials and associated functions.

The Gegenbauer polynomial C(n,alpha,x) can be defined by:

C(0,alpha,x) = 1 C(1,alpha,x) = 2 * alpha * x C(n,alpha,x) = (1/n) * ( 2*x*(n+alpha-1) * C(n-1,alpha,x) - (n+2*alpha-2) * C(n-2,alpha,x) )where n is a nonnegative integer, and -1/2 < alpha, 0 =/= alpha.

The N zeroes of C(n,alpha,x) are the abscissas used for Gauss-Gegenbauer quadrature of the integral of a function F(X) with weight function (1-x^2)^(alpha-1/2) over the interval [-1,1].

The Gegenbauer polynomials are orthogonal under the inner product defined as weighted integration from -1 to 1:

Integral ( -1 <= x <= 1 ) (1-x^2)^(alpha-1/2) * C(i,alpha,x) * C(j,alpha,x) dx = 0 if i =/= j = pi * 2^(1-2*alpha) * Gamma(n+2*alpha) / n! / (n+alpha) / (Gamma(alpha))^2 if i = j.

The computer code and data files described and made available on this web page are distributed under the GNU LGPL license.

**gegenbauer_polynomial** is available in
a C version and
a C++ version and
a FORTRAN90 version and
a MATLAB version and
a Python version..

bernstein_polynomial, a Python code which evaluates the Bernstein polynomials, useful for uniform approximation of functions;

chebyshev_polynomial, a Python 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_cc, a Python code which estimates the Gegenbauer weighted integral of a function f(x) using a Clenshaw-Curtis approach.

legendre_polynomial, a Python code which evaluates the Legendre polynomial and associated functions.

legendre_shifted_polynomial, a Python code which evaluates the shifted Legendre polynomial, with domain [0,1].

polpak, a Python code which evaluates a variety of mathematical functions.

- gegenbauer_polynomial.py, the source code.
- gegenbauer_polynomial.sh, runs all the tests.
- gegenbauer_polynomial.txt, the output file.