The operator family implements approximation
and evaluation of functions by the Chebyshev method.
Let
be the Chebyshev polynomial of order
transformed to the interval
. Then a function
can be
approximated in
by a series
The operator computes this approximation and
returns a list, which has as first element the sum expressed
as a polynomial and as second element the sequence
of Chebyshev coefficients
.
and
transform a Chebyshev
coefficient list into the coefficients of the corresponding
derivative or integral respectively. For evaluating a Chebyshev
approximation at a given point in the basic interval the
operator
can be used.
is based on a recurrence relation which is
in general more stable than a direct evaluation of the
complete polynomial.
where is an algebraic expression (the target function),
is the variable of
,
and
are
numerical real values which describe an interval (
),
the integer
is the approximation order (set to 20 if missing),
is a number in the interval and
is
a series of Chebyshev coefficients, computed by one of
,
or
.
Example:
on rounded;
w:=chebyshev_fit(sin x/x,x=(1 .. 3),5);
3 2
w := {0.03824*x - 0.2398*x + 0.06514*x + 0.9778,
{0.8991,-0.4066,-0.005198,0.009464,-0.00009511}}
chebyshev_eval(second w, x=(1 .. 3), x=2.1);
0.4111
see also: REDUCE Home Page