Next: factorial() Up: Mathematical Macros Help File Previous: dfp()   Contents

# economize()

Usage:
 ```economize(vector(a0,a1,...,an),m), a0, ..., an REAL scalars, m > 0 an integer scalar ```

Keywords: expansions, power series
```Macro to "economize" a power series expansion on [-1, 1]

Suppose Fn(x) = a0 +a1*x + a2*x^2 + ... + an*x^n is the n-th partial
sum of the Taylor series expansion of a function F(x) defined on an
interval I contained in (-1, 1).  Then Fn(x) has a unique expansion
Fn(x) = c0 + c1*T1(x) + c2*T2(x) + ... + cn*Tn(x)
where Tj(x) is the j-th Chebyshev polynomial defined as Tj(x) =
cos(acos(j*x)) for -1 <= x <= 1.

b <- economize(vector(a0,a1,...,an),m) computes b = vector(b0,b1,...,bm)
where
Bm(x) = b0 + b1*x + b2*x^2 + ... + bm*x^m =
c0 + c1*T1(x) + c2*T2(x) + ... + cm*Tm(x)
is the Chebyshev series truncated at Tm.

When Fn(x) is a good approximation to F(x) on I, and, as is the case
with many functions, the coefficients c0, c1, ... converge to 0 much
faster than do a0, a1, ..., Bm(x) with m << n, may be a good
polynomial approximation for F(x) on I.
```

Gary Oehlert 2003-01-15