Python | The numpy np.chebint () method

Using the np.chebint() method, we can get the integration value of Chebyshev series as an array with the coordinate value using np.chebint () .

Syntax: np.chebint (series, value)
Return: Return an array having coordinates of series after integration.

Example # 1:
In this example, we can see that with np .chebint () we can get the integration of the Chebyshev series, and it will return an array having the coordinates of this.

# NumPy import

import numpy as np

from numpy.polynomial import chebyshev as C  

 

x = np.array ([ 1 , 2 , 3 ])

# using the np.chebint () method

gfg = C.chebint (x, 2 )

 

print (gfg)

Output:

 [-0.3125 0.25 -0.25 0.08333333 0.0625] 

Example # 2:

Output:

 [-0.8125 -2.125 -0.66666667 -0.47916667 0.14583333 0.1375] 

# NumPy import

  import numpy as np

from numpy.polynomial import chebyshev as C

 

x = np.array ([ 2 , 5 , 7 , 11 ])

# using the np.chebint () method

gfg = C.chebint (x, 2 )

  

print (gfg)