The routine may be called by the names c06dcf or nagf_sum_chebyshev.
c06dcf 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 routines, for example they may be those returned by the interpolation routine e01aef (in vector a), by a least squares fitting routine in Chapter E02, or as the solution of a boundary value problem by
Clenshaw C W (1962) Chebyshev Series for Mathematical Functions Mathematical tables HMSO
1: – Real (Kind=nag_wp) arrayInput
On entry: , the set of arguments of the series.
, for .
2: – IntegerInput
On entry: the number of evaluation points in .
3: – Real (Kind=nag_wp)Input
4: – Real (Kind=nag_wp)Input
On entry: the lower and upper end points respectively of the interval . The Chebyshev series representation is in terms of the normalized variable , where
5: – Real (Kind=nag_wp) arrayInput
On entry: must contain the coefficient of the Chebyshev series, for .
On exit: the Chebyshev series evaluated at the set of points .
9: – IntegerInput/Output
On entry: ifail must be set to , or to set behaviour on detection of an error; these values have no effect when no error is detected.
A value of causes the printing of an error message and program execution will be halted; otherwise program execution continues. A value of means that an error message is printed while a value of means that it is not.
If halting is not appropriate, the value or is recommended. If message printing is undesirable, then the value is recommended. Otherwise, the value is recommended. When the value or is used it is essential to test the value of ifail on exit.
On exit: unless the routine detects an error or a warning has been flagged (see Section 6).
6Error Indicators and Warnings
If on entry or , explanatory error messages are output on the current error message unit (as defined by x04aaf).
Errors or warnings detected by the routine:
On entry, .
On entry, .
On entry, .
Constraint: , or .
On entry, and .
On entry, element , and .
Constraint: , for all .
An unexpected error has been triggered by this routine. Please
See Section 7 in the Introduction to the NAG Library FL Interface for further information.
Your licence key may have expired or may not have been installed correctly.
See Section 8 in the Introduction to the NAG Library FL Interface for further information.
Dynamic memory allocation failed.
See Section 9 in the Introduction to the NAG Library FL Interface for further information.
There may be a loss of significant figures due to cancellation between terms. However, provided that is not too large, c06dcf yields results which differ little from the best attainable for the available machine precision.
8Parallelism and Performance
c06dcf is not threaded in any implementation.
The time taken increases with .
c06dcf has been prepared in the present form to complement a number of integral equation solving routines which use Chebyshev series methods, e.g., d05aafandd05abf.