nag_sum_cheby_series (c06dcc) evaluates a polynomial from its Chebyshev series representation at a set of points.
nag_sum_cheby_series (c06dcc) evaluates, at each point in a given set
, the sum of a Chebyshev series of one of three forms according to the value of the parameter
s:
: |
|
: |
|
: |
|
where
lies in the range
. Here
is the Chebyshev polynomial of order
in
, defined by
where
.
It is assumed that the independent variable
in the interval
was obtained from your original variable
, a set of real numbers in the interval
, by the linear transformation
The method used is based upon a three-term recurrence relation; for details see
Clenshaw (1962).
The coefficients
are normally generated by other functions, for example they may be those returned by the interpolation function
nag_1d_cheb_interp (e01aec) (in vector
a), by a least squares fitting function in
Chapter e02, or as the solution of a boundary value problem by
nag_ode_bvp_ps_lin_solve (d02uec).
- 1:
– const doubleInput
-
On entry: , the set of arguments of the series.
Constraint:
, for .
- 2:
– IntegerInput
-
On entry: the number of evaluation points in .
Constraint:
.
- 3:
– doubleInput
- 4:
– doubleInput
-
On entry: the lower and upper end points respectively of the interval
. The Chebyshev series representation is in terms of the normalized variable
, where
Constraint:
.
- 5:
– const doubleInput
-
On entry: must contain the coefficient of the Chebyshev series, for .
- 6:
– IntegerInput
-
On entry: , the number of terms in the series.
Constraint:
.
- 7:
– Nag_SeriesInput
-
On entry: determines the series (see
Section 3).
- The series is general.
- The series is even.
- The series is odd.
Constraint:
, or .
- 8:
– doubleOutput
-
On exit: the Chebyshev series evaluated at the set of points .
- 9:
– NagError *Input/Output
-
The NAG error argument (see
Section 3.6 in the Essential Introduction).
There may be a loss of significant figures due to cancellation between terms. However, provided that is not too large, nag_sum_cheby_series (c06dcc) yields results which differ little from the best attainable for the available machine precision.
Not applicable.