A MACSYMA package for the generation and manipulation of chebyshev series

Techniques for a MACSYMA package for expanding an arbitrary univariate expression as a truncated series in Chebyshev polynomials and manipulating such expansions is described. A data structure is introduced to represent a truncated expansion in a set of orthogonal polynomials. The data structure contains the independent variable, the name of the orthogonal polynomial set, the number of terms retained, and a list of the expansion coefficients. Although we restrict attention here to the set of Chebyshev polynomials as the orthogonal set, extension to other orthogonal polynomials will be done later. A data structure for truncated power series is provided as an alternative. The principal function of the package converts a given expression into the aforementioned data structure. Special cases are the conversion of sums, products, the ratio, or the composition of truncated Chebyshev expansions. Another special case is converting an expression free of truncated Chebyshev expansions. The package generates exact expansion coefficients whenever possible. In addition to well-known Chebyshev expansions, such as for polynomials, we provide new methods for getting exact Chebyshev expansions for reciprocals of polynomials of degree one or two, meromorphic functions, arbitrary powers of a first-degree polynomial, the error-function, and generalized hypergeometric functions. When exact Chebyshev expansions for a function are unknown, or too costly to compute, approximate expansions are performed. Conversion to power series and interpolation between the roots of a Chebyshev polynomial are supported. The Clenshaw method for symbolic Chebyshev expansion of the solution of a linear differential equation whose coefficients are low degree polynomials is implemented in the package.