Differentiate a Legendre 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 P_0 + 2*P_1 + 3*P_2.
Parameters : | cs : array_like
m : int, optional
scl : scalar, optional
|
---|---|
Returns : | der : ndarray
|
See also
Notes
In general, the result of differentiating a Legendre series does not resemble the same operation on a power series. Thus the result of this function may be “un-intuitive,” albeit correct; see Examples section below.
Examples
>>> from numpy.polynomial import legendre as L
>>> cs = (1,2,3,4)
>>> L.legder(cs)
array([ 6., 9., 20.])
>>> L.legder(cs,3)
array([ 60.])
>>> L.legder(cs,scl=-1)
array([ -6., -9., -20.])
>>> L.legder(cs,2,-1)
array([ 9., 60.])