numpy.polynomial.chebyshev.chebint(c, m=1, k=[], lbnd=0, scl=1, axis=0)
[source]
Integrate a Chebyshev series.
Returns the Chebyshev series coefficients c
integrated m
times from lbnd
along axis
. 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 c
is an array of coefficients from low to high degree along each axis, e.g., [1,2,3] represents the series T_0 + 2*T_1 + 3*T_2
while [[1,2],[1,2]] represents 1*T_0(x)*T_0(y) + 1*T_1(x)*T_0(y) + 2*T_0(x)*T_1(y) +
2*T_1(x)*T_1(y)
if axis=0 is x
and axis=1 is y
.
Parameters: 


Returns: 

Raises: 

See also
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 Cseries needs to be “reprojected” onto the Cseries basis set. Thus, typically, the result of this function is “unintuitive,” albeit correct; see Examples section below.
>>> from numpy.polynomial import chebyshev as C >>> c = (1,2,3) >>> C.chebint(c) array([ 0.5, 0.5, 0.5, 0.5]) >>> C.chebint(c,3) array([ 0.03125 , 0.1875 , 0.04166667, 0.05208333, 0.01041667, # may vary 0.00625 ]) >>> C.chebint(c, k=3) array([ 3.5, 0.5, 0.5, 0.5]) >>> C.chebint(c,lbnd=2) array([ 8.5, 0.5, 0.5, 0.5]) >>> C.chebint(c,scl=2) array([1., 1., 1., 1.])
© 2005–2019 NumPy Developers
Licensed under the 3clause BSD License.
https://docs.scipy.org/doc/numpy1.17.0/reference/generated/numpy.polynomial.chebyshev.chebint.html