polynomial_conversion, a Python code which converts representations of a polynomial between monomial, Bernstein, Chebyshev, Gegenbauer, Hermite, Laguerre and Legendre forms.

The monomial or power sum representation of a polynomial of degree n involves a vector a of coefficients, and has the form:

        p(x) = a(0) + a(1) * x + a(2) * x^2 + ... + a(n) * x^n
A Chebyshev representation, for instance, will use a different vector c of coefficients, and Chebyshev basis functions T(x) so that
        p(x) = c(0) T0(x) + c(1) * T1(x) + c(2) * T2(x) + ... + c(n) * Tn(x)

It is the task of this software to take the coefficients for one representation, and determine the corresponding coefficients in another specified representation.


The information on this web page is distributed under the MIT license.


polynomial_conversion is available in a C version and a C++ version and a Fortran77 version and a Fortran90 version and a MATLAB version and a Octave version and a Python version.

Related Data and Programs:

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_polynomial, a Python code which evaluates the Gegenbauer polynomial and associated functions.

hermite_polynomial, a Python code which evaluates the physicist's Hermite polynomial, the probabilist's Hermite polynomial, the Hermite function, and related functions.

laguerre_polynomial, a Python code which evaluates the Laguerre polynomial, the generalized Laguerre polynomial, and the Laguerre function.

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

test_matrix, a Python code which defines test matrices for which the condition number, determinant, eigenvalues, eigenvectors, inverse, null vectors, P*L*U factorization or linear system solution are known. Examples include the Fibonacci, Hilbert, Redheffer, Vandermonde, Wathen and Wilkinson matrices.

Source Code:

Last revised on 18 February 2024.