Python Program to Integrate a Chebyshev Series and Set the Integration Constant Last Updated : 05 Sep, 2024 Summarize Comments Improve Suggest changes Share Like Article Like Report In this article, we will discuss how to integrate a Chebyshev Series and set the integration constantTo perform Chebyshev integration, NumPy provides a function called chebyshev.chebint which can be used to integrate Chebyshev series. Syntax: chebyshev.chebint(c, m=1, k=[], lbnd=0, scl=1, axis=0)Parameters:c - Array of Chebyshev series coefficients.m - (integer) Order of integration, must be positivek - Integration constant. The value of the first integral at zero is the first value in the list, the value of the second integral at zero is the second value, etclbnd - The lower bound of the integral. (Default: 0) scl - Following each integration the result is multiplied by scl before the integration constant is added. (Default: 1)axis - Axis over which the integral is taken.Example 1:In the first example. let us consider a 1D array with a first-order integration and 3 as an integration constant. Import the necessary packages as shown and pass the appropriate parameters as shown below. Python import numpy as np from numpy.polynomial import chebyshev # co.efficient array c = np.array([11, 12, 13, 14, 15]) print(f'The shape of the array is {c.shape}') print(f'The dimension of the array is {c.ndim}D') print(f'The datatype of the array is {c.dtype}') res = chebyshev.chebint(c, m=1, k=3) # integrated chebyshev series # with integration constant of 1 print(f'Resultant series ---> {res}') Output: Example 2:In the second example. let us consider a 2D array with a first-order integration and 5 as an integration constant. Import the necessary packages as shown and pass the appropriate parameters as shown below. Python import numpy as np from numpy.polynomial import chebyshev # co.efficient array c = np.array([[11, 12, 13, 14, 15], [3, 4, 5, 6, 7]]) print(f'The shape of the array is {c.shape}') print(f'The dimension of the array is {c.ndim}D') print(f'The datatype of the array is {c.dtype}') res = chebyshev.chebint(c, m=1, k=5) # integrated chebyshev series # with integration constant of 5 print(f'Resultant series ---> {res}') Output: Example 3:In the third example. let us consider a 3D array with a fifth-order integration and 7 as an integration constant. Import the necessary packages as shown and pass the appropriate parameters as shown below. Python import numpy as np from numpy.polynomial import chebyshev # co.efficient array c = np.array([[[11, 12, 13, 14, 15], [3, 4, 5, 6, 7], [21, 22, 23, 24, 25]]]) print(f'The shape of the array is {c.shape}') print(f'The dimension of the array is {c.ndim}D') print(f'The datatype of the array is {c.dtype}') res = chebyshev.chebint(c, m=5, k=7) # integrated chebyshev series # with integration constant of 7 print(f'Resultant series ---> {res}') Output: Comment More infoAdvertise with us Next Article sympy.integrals.transforms.cosine_transform() in python J jssuriyakumar Follow Improve Article Tags : Python Python Programs Python-numpy Python numpy-polynomials Practice Tags : python Similar Reads Python Program Integrate a Chebyshev Series and Set the Lower Bound of the Integral The Chebyshev series has polynomials with the largest possible leading coefficient, whose absolute value on the interval [â1, 1] is bounded by 1. They are also the "extremal" polynomials. Chebyshev polynomials are significant in approximation theory because the roots of Tn(x), which are also called 3 min read Python Program to Evaluate a Chebyshev Series at Points X When Coefficients are multi-dimensional In this article, we will discuss how to evaluate a Chebyshev Series at points X when coefficients are multi-dimensional.To evaluate the Chebyshev series at points, NumPy provides a function called chebyshev.chebval which can be used to integrate the Chebyshev series. Syntax: Chebyshev.chebval(x, c, 3 min read Python Program to Remove Small Trailing Coefficients from Chebyshev Polynomial Given a Chebyshev Polynomial, the task is to Remove Small Trailing Coefficients from Chebyshev Polynomial in Python and NumPy.ExampleInput: [-1, 0, 2, 0]Output: [-1. 0. 2.]Explanation: One dimensional array in which trailing zeroes are removed.NumPy.polynomial.Chebyshev methodPython provides a metho 2 min read Python program to find Cumulative sum of a list Calculating the cumulative sum of a list means finding the running total of the elements as we move through the list. In this article, we will explore How to find the cumulative sum of a list. Using itertools.accumulate()This is the most efficient method for calculating cumulative sums. itertools mo 3 min read sympy.integrals.transforms.cosine_transform() in python With the help of cosine_transform() method, we can compute the cosine transformation and return the transformed function by using this method. cosine transformation Syntax : cosine_transform(f, x, k, **hints) Return : Return the transformed function. Example #1 : In this example we can see that by u 1 min read sympy.integrals.rationaltools.ratint_logpart() in python With the help of ratint_logpart() method, we can integrate the indefinite rational function by implementing Lazard Rioboo Trager algorithm by using this method and returns the integrated polynomial. Syntax : ratint_logpart(f, g, x, t=None) Return : Return the integrated function. Example #1 : In thi 1 min read Like