# CHEBYSHEV Interpolation Using Chebyshev Polynomials

CHEBYSHEV is a C++ library which constructs the Chebyshev interpolant to a function.

Note that the user is not free to choose the interpolation points. Instead, the function f(x) will be evaluated at points chosen by the algorithm. In the standard case, in which the interpolation interval is [-1,+1], these points will be the zeros of the Chebyshev polynomial of order N. However, the algorithm can also be applied to an interval of the form [a,b], in which case the evaluation points are linearly mapped from [-1,+1].

The resulting interpolant is defined by a set of N coefficients c(), and has the form:

```        C(f)(x) = sum ( 1 <= i <= n ) c(i) T(i-1,x) - 0.5 * c(1)
```
where T(i-1,x) is the (i-1)-th Chebyshev polynomial.

Within the interval [-1,+1], or the generalized interval [a,b], the interpolant actually remains bounded by the sum of the absolute values of the coefficients c(). It is therefore common to use Chebyshev interpolants as approximating functions over a given interval.

### Languages:

CHEBYSHEV is available in a C version and a C++ version and a FORTRAN90 version and a MATLAB version.

### Related Data and Programs:

BERNSTEIN_POLYNOMIAL, a C++ library which evaluates the Bernstein polynomials, useful for uniform approximation of functions;

CHEBYSHEV_POLYNOMIAL, a C++ library which evaluates the Chebyshev polynomial and associated functions.

CHEBYSHEV_SERIES, a C++ library which can evaluate a Chebyshev series approximating a function f(x), while efficiently computing one, two or three derivatives of the series, which approximate f'(x), f''(x), and f'''(x).

CLAUSEN, a C++ library which evaluates a Chebyshev interpolant to the Clausen function Cl2(x).

DIVDIF, a C++ library which computes interpolants by divided differences.

HERMITE, a C++ library which computes the Hermite interpolant, a polynomial that matches function values and derivatives.

HERMITE_CUBIC, a C++ library which can compute the value, derivatives or integral of a Hermite cubic polynomial, or manipulate an interpolating function made up of piecewise Hermite cubic polynomials.

LAGRANGE_INTERP_1D, a C++ library which defines and evaluates the Lagrange polynomial p(x) which interpolates a set of data, so that p(x(i)) = y(i).

RBF_INTERP, a C++ library which defines and evaluates radial basis function (RBF) interpolants to multidimensional data.

SPLINE, a C++ library which includes many routines to construct and evaluate spline interpolants and approximants.

TEST_APPROX, a C++ library which defines test problems for approximation, provided as a set of (x,y) data.

TEST_INTERP_1D, a C++ library which defines test problems for interpolation of data y(x), depending on a 1D argument.

### Reference:

1. Roger Broucke,
Algorithm 446: Ten Subroutines for the Manipulation of Chebyshev Series,
Communications of the ACM,
Volume 16, Number 4, April 1973, pages 254-256.
2. Philip Davis,
Interpolation and Approximation,
Dover, 1975,
ISBN: 0-486-62495-1,
LC: QA221.D33
3. William Press, Brian Flannery, Saul Teukolsky, William Vetterling,
Numerical Recipes in C: The Art of Scientific Computing,
Cambridge University Press, 1988,
ISBN: 0-521-35465-X,
LC: QA76.73.C15N865.

### List of Routines:

• CHEBYSHEV_COEFFICIENTS determines Chebyshev interpolation coefficients.
• CHEBYSHEV_INTERPOLANT evaluates a Chebyshev interpolant.
• CHEBYSHEV_ZEROS returns zeroes of the Chebyshev polynomial T(N)(X).
• TIMESTAMP prints the current YMDHMS date as a time stamp.

You can go up one level to the C++ source codes.

Last revised on 14 September 2011.