# GEGENBAUER_POLYNOMIAL Gegenbauer Polynomials

GEGENBAUER_POLYNOMIAL is a FORTRAN90 library 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.
```

### Languages:

GEGENBAUER_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 FORTRAN90 library which evaluates the Bernstein polynomials, useful for uniform approximation of functions;

CHEBYSHEV_POLYNOMIAL, a FORTRAN90 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_CC, a FORTRAN90 library which estimates the Gegenbauer weighted integral of a function f(x) using a Clenshaw-Curtis approach.

GEGENBAUER_EXACTNESS, a FORTRAN90 program which checks the polynomial exactness of a Gauss-Gegenbauer rule.

GEGENBAUER_RULE, a FORTRAN90 program which can generate a Gauss-Gegenbauer quadrature rule on request.

HERMITE_POLYNOMIAL, a FORTRAN90 library which evaluates the physicist's Hermite polynomial, the probabilist's Hermite polynomial, the Hermite function, and related functions.

JACOBI_POLYNOMIAL, a FORTRAN90 library which evaluates the Jacobi polynomial and associated functions.

LAGUERRE_POLYNOMIAL, a FORTRAN90 library which evaluates the Laguerre polynomial, the generalized Laguerre polynomial, and the Laguerre function.

LEGENDRE_POLYNOMIAL, a FORTRAN90 library which evaluates the Legendre polynomial and associated functions.

LOBATTO_POLYNOMIAL, a FORTRAN90 library which evaluates Lobatto polynomials, similar to Legendre polynomials except that they are zero at both endpoints.

POLPAK, a FORTRAN90B library which evaluates a variety of mathematical functions.

### List of Routines:

• GAMMA_VALUES returns some values of the Gamma function.
• GEGENBAUER_ALPHA_CHECK checks the value of ALPHA.
• GEGENBAUER_EK_COMPUTE computes a Gauss-Gegenbauer quadrature rule.
• GEGENBAUER_INTEGRAL: integral of a monomial with Gegenbauer weight.
• GEGENBAUER_POLYNOMIAL_VALUE computes the Gegenbauer polynomials C(I,ALPHA,X).
• GEGENBAUER_POLYNOMIAL_VALUES returns some values of Gegenbauer polynomials.
• GEGENBAUER_SS_COMPUTE computes a Gauss-Gegenbauer quadrature rule.
• GEGENBAUER_SS_RECUR: value and derivative of a Gegenbauer polynomial.
• GEGENBAUER_SS_ROOT improves an approximate root of a Gegenbauer polynomial.
• HYPER_2F1_VALUES returns some values of the hypergeometric function 2F1.
• IMTQLX diagonalizes a symmetric tridiagonal matrix.
• PSI_VALUES returns some values of the Psi or Digamma function.
• R8_GAMMA evaluates Gamma(X) for a real argument.
• R8_HYPER_2F1 evaluates the hypergeometric function F(A,B,C,X).
• R8_PSI evaluates the function Psi(X).
• R8_UNIFORM_AB returns a scaled pseudorandom R8.
• R8VEC_PRINT prints an R8VEC.
• TIMESTAMP prints the current YMDHMS date as a time stamp.

You can go up one level to the FORTRAN90 source codes.

Last revised on 23 November 2015.