Integrate a Laguerre series.
Returns a Laguerre series that is the Laguerre series cs, integrated
m times from lbnd to x. At each iteration the resulting series
is multiplied by scl and an integration constant, k, is added.
The scaling factor is for use in a linear change of variable. (“Buyer
beware”: note that, depending on what one is doing, one may want scl
to be the reciprocal of what one might expect; for more information,
see the Notes section below.) The argument cs is a sequence of
coefficients, from lowest order Laguerre series “term” to highest,
e.g., [1,2,3] represents the series
.
| Parameters : | cs : array_like
m : int, optional
k : {[], list, scalar}, optional
lbnd : scalar, optional
scl : scalar, optional
|
|---|---|
| Returns : | S : ndarray
|
| Raises : | ValueError :
|
See also
Notes
Note that the result of each integration is multiplied by scl.
Why is this important to note? Say one is making a linear change of
variable
in an integral relative to x. Then
, so one will need to set scl equal to
- perhaps not what one would have first thought.
Also note that, in general, the result of integrating 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.laguerre import lagint
>>> lagint([1,2,3])
array([ 1., 1., 1., -3.])
>>> lagint([1,2,3], m=2)
array([ 1., 0., 0., -4., 3.])
>>> lagint([1,2,3], k=1)
array([ 2., 1., 1., -3.])
>>> lagint([1,2,3], lbnd=-1)
array([ 11.5, 1. , 1. , -3. ])
>>> lagint([1,2], m=2, k=[1,2], lbnd=-1)
array([ 11.16666667, -5. , -3. , 2. ])