naginterfaces.library.sum.chebyshev

naginterfaces.library.sum.chebyshev(x, xmin, xmax, c, s)[source]

chebyshev evaluates a polynomial from its Chebyshev series representation at a set of points.

For full information please refer to the NAG Library document for c06dc

https://support.nag.com/numeric/nl/nagdoc_30.2/flhtml/c06/c06dcf.html

Parameters
xfloat, array-like, shape

, the set of arguments of the series.

xminfloat

The lower end point of the interval .

xmaxfloat

The upper end point of the interval .

cfloat, array-like, shape

must contain the coefficient of the Chebyshev series, for .

sint

Determines the series (see Notes).

The series is general.

The series is even.

The series is odd.

Returns
resfloat, ndarray, shape

The Chebyshev series evaluated at the set of points .

Raises
NagValueError
(errno )

On entry, .

Constraint: .

(errno )

On entry, .

Constraint: .

(errno )

On entry, .

Constraint: , or .

(errno )

On entry, and .

Constraint: .

(errno )

On entry, element , and .

Constraint: , for all .

Notes

chebyshev 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 :

:

:

:

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 interp.dim1_cheb (in vector ), by a least squares fitting function in submodule fit, or as the solution of a boundary value problem by ode.bvp_coll_nth, ode.bvp_coll_sys or ode.bvp_ps_lin_solve.

References

Clenshaw, C W, 1962, Chebyshev Series for Mathematical Functions, Mathematical tables, HMSO