numpy.polynomial.chebyshev.chebder

numpy.polynomial.chebyshev.chebder(cs, m=1, scl=1)

Differentiate a Chebyshev series.

Returns the series cs differentiated m times. At each iteration the result is multiplied by scl (the scaling factor is for use in a linear change of variable). The argument cs is the sequence of coefficients from lowest order “term” to highest, e.g., [1,2,3] represents the series T_0 + 2*T_1 + 3*T_2.

Parameters :

cs: array_like :

1-d array of Chebyshev series coefficients ordered from low to high.

m : int, optional

Number of derivatives taken, must be non-negative. (Default: 1)

scl : scalar, optional

Each differentiation is multiplied by scl. The end result is multiplication by scl**m. This is for use in a linear change of variable. (Default: 1)

Returns :

der : ndarray

Chebyshev series of the derivative.

See also

chebint

Notes

In general, the result of differentiating a C-series needs to be “re-projected” onto the C-series basis set. Thus, typically, the result of this function is “un-intuitive,” albeit correct; see Examples section below.

Examples

>>> from numpy.polynomial import chebyshev as C
>>> cs = (1,2,3,4)
>>> C.chebder(cs)
array([ 14.,  12.,  24.])
>>> C.chebder(cs,3)
array([ 96.])
>>> C.chebder(cs,scl=-1)
array([-14., -12., -24.])
>>> C.chebder(cs,2,-1)
array([ 12.,  96.])

Next topic

numpy.polynomial.chebyshev.chebint

This Page