Author(s): T. Håvie | Library: MATHLIB |
Submitter: K.S. Kölbig | Submitted: 24.01.1986 |
Language: Fortran | Revised: 01.12.1994 |
Subroutine subprograms RCHECF, DCHECF and QCHECF
calculate coefficients for a finite sum of Chebyshev polynomials
approximating a function f(x) over an interval to
accuracy
. It returns an integer n and coefficients
such that the sum
where t = (2x - a - b)/(b - a) and is the Chebyshev
polynomial of degree j, satisfies for
the relation
Subsequent evaluation of the approximation (1) can be done by calling CHSUM (E407) with the appropriate value of its argument MODE.
On computers other than CDC and Cray, only the double- and quadruple-precision versions DCHECF and QCHECF are available. On CDC and Cray computers, only the single- and double-precision versions RCHECF and DCHECF are available.
Structure:
SUBROUTINE subprogram
User Entry Names: RCHECF, DCHECF, QCHECF
Obsolete User Entry Names: CHECF RCHECF
Files Referenced: Unit 6
External References: MTLMTR, ABEND,
user-supplied FUNCTION subprogram
Usage:
For (type REAL),
(type
DOUBLE PRECISION),
(type REAL*16),
CALL tCHECF(F,A,B,EPS,C,N,DELTA)
Method:
The interval [a,b] is subdivided successively
into sets of subintervals of length .
After each subdivision the orthogonality properties
of the Chebyshev polynomials with respect to summation
over equally-spaced points are used
to compute two sets of approximate values of the coefficients
:
one set computed using the end-points of the subintervals, and one
set using the mid-points. The mean of these two values is taken
as the best estimate of the
, which are then tested to see (a)
whether certain rate-of-convergence criteria are satisfied, (b)
whether there is some n for which the sum for j>n of the available
is less than
. If both conditions are satisfied
the subroutine terminates.
Error handling:
Error E406.1:
If the requested accuracy cannot be obtained with 65 coefficients
(i.e., ) a message is written on
Unit 6, unless subroutine MTLSET (N002) has been called.
In this case, values of
computed from (1) with
should still be in error by less than DELTA.
Notes:
References: