Python | Numpy np.chebmulx() method

Python | Numpy np.chebmulx() method

The np.chebmulx() function in the NumPy library is used for multiplying the Chebyshev series c by x, where c is a 1-D sequence of Chebyshev series coefficients ordered from low to high degree.

In simpler terms, it returns the Chebyshev series c scaled by the variable x.

The formula for this operation is given by: ck​×x=(ck−1​−ck+1​+2ck​)/2 where k is the index of the coefficient in the series.

Let's take a look at an example:

import numpy as np # Chebyshev series coefficients for f(x) = x^3 c = [0, 0, 0, 1] # Multiply the series by x result = np.chebmulx(c) print(result) # Output: array([ 0. , 0. , 1. , 0. , -0.5]) 

In this example, we started with the series for f(x)=x3. After multiplying by x, the series represents f(x)=x4. The returned result is the new set of coefficients for this series.


More Tags

skip frequency selectonemenu select-for-update wordcloud2 tf-idf design-patterns aws-fargate tortoisegit android-navigation-bar

More Programming Guides

Other Guides

More Programming Examples