nag_1d_cheb_intg (e02ajc) determines the coefficients in the Chebyshev series representation of the indefinite integral of a polynomial given in Chebyshev series form.
nag_1d_cheb_intg (e02ajc) forms the polynomial which is the indefinite integral of a given polynomial. Both the original polynomial and its integral are represented in Chebyshev series form. If supplied with the coefficients
, for
, of a polynomial
of degree
, where
the function returns the coefficients
, for
, of the polynomial
of degree
, where
and
Here
denotes the Chebyshev polynomial of the first kind of degree
with argument
. It is assumed that the normalized variable
in the interval
was obtained from your original variable
in the interval
by the linear transformation
and that you require the integral to be with respect to the variable
. If the integral with respect to
is required, set
and
.
Values of the integral can subsequently be computed, from the coefficients obtained, by using
nag_1d_cheb_eval2 (e02akc).
The method employed is that of Chebyshev series (see Chapter 8 of
Modern Computing Methods (1961)), modified for integrating with respect to
. Initially taking
, the function forms successively
The constant coefficient
is chosen so that
is equal to a specified value,
qatm1, at the lower end point of the interval on which it is defined, i.e.,
, which corresponds to
.
In general there is a gain in precision in numerical integration, in this case associated with the division by
in the formula quoted in
Section 3.
nag_1d_cheb_intg (e02ajc) is not threaded in any implementation.
The increments
ia1,
iaint1 are included as arguments to give a degree of flexibility which, for example, allows a polynomial in two variables to be integrated with respect to either variable without rearranging the coefficients.
Suppose a polynomial has been computed in Chebyshev series form to fit data over the interval
. The following program evaluates the integral of the polynomial from
to
. (For the purpose of this example,
xmin,
xmax and the Chebyshev coefficients are simply supplied
.
Normally a program would read in or generate data and compute the fitted polynomial).
None.