11 Chebyshev Approximations
This chapter describes the routines for computing Chebyshev approximations to univariate functions provided by the Science Collection. A Chebyshev approximation is a truncation of the series,
where the Chebyshev polynomials Tn(x) = cos(n arccos x) provides an orthogonal basis of polynomials in the interval [-1, 1] with the weight function 1/(1 - x2)½. The first few Chebyshev polynomials are T0(x) = 1, T1(x) = x, T2(x) = 2x2 -1. For more information, see Abramowitz and Stegun [Abramowitz64], Chapter 22.
The functions described in this chapter are defined in the "chebyshev.rkt" file in the Science Collection and are made available using the form:
11.1 The chebyshev-series Structure
A Chebyshev series is represented by a structure chebyshev-series that has the following fields:
coefficients—a vector of length order containing the coefficients for the Chebyshev series.
order—the order of the Chebyshev series.
lower—the lower bound on the interval over which the Chebyshev series is defined.
upper—the upper bound on the interval over which the Chebyshev series is defined.
The approximations are made over the range [lower, upper] using order + 1 terms, including coefficient0. The series is computed using the following convention:
which is needed when accessing the coefficients directly.
11.2 Creation and Calculation of Chebyshev Series
Returns true, #t, if x is a Chebyshev series.
Returns a newly created Chebyshev series with the given order. If coeffs-or-func is supplied and is a vector of reals, these are used as the coefficients. If coeffs-or-func is supplied and is a function, the Chebyshev approximation cs for the function func over the range (a, b) to the previously specified order is computed. The computation of the Chebyshev approximation is an O(n2) process that requires n function evaluations.
Returns a newly created Chebyshev series with the given order.
Returns the coefficients field of the Chebyshev series cs.
Returns the order field of the Chebyshev series cs.
Returns the lower field of the Chebyshev series cs.
Returns the upper field of the Chebyshev series cs.
Computes the Chebyshev approximation cs for the function func over the range (a, b) to the previously specified order. The computation of the Chebyshev approximation is an O(n2) process that requires n function evaluations.
11.3 Chebyshev Series Evaluations
Evaluates the Chebyshev series cs at the given point x.
Evaluates the Chebyshev series cs at the given point x to (at most) the given order n.
11.4 Derivatives and Integrals
The following functions allow a Chebyshev series to be differentiated or integrated, producing a new Chebyshev series.
Returns a new Chebyshev series object that is the derivative of series. The returned series has the same order and range as series.
Returns a new Chebyshev series object that is the integral of series. The returned series has the same order and range as series.
11.5 Chebyshev Approximation Examples
Example: The following program computes Chebyshev approximations to a step function. This is an extremely difficult approximation to make due to the discontinuity and was chosen as an example where approximation error is visible. For smooth functions the Chebyshev approximation converges extremely rapidly and errors would not be visible.
The following figures show the resulting plots.