- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP

- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who

# Differentiate a Chebyshev series with multidimensional coefficients over axis 1 in Python

To differentiate a Chebyshev series, use the polynomial.chebder() method in Python Numpy. The method returns the Chebyshev series of the derivative. Returns the Chebyshev series coefficients c differentiated m times along axis. At each iteration the result is multiplied by scl. The argument c is an array of coefficients from low to high degree along each axis, e.g., [1,2,3] represents the series 1*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.

The 1st parameter is c, an array of Chebyshev series coefficients. If c is multidimensional the different axis correspond to different variables with the degree in each axis given by the corresponding index. The 2nd parameter is m, Number of derivatives taken, must be non-negative. (Default: 1). The 3rd parameter is scl, i.e. each differentiation is multiplied by scl. The end result is multiplication by scl**m. This is for use in a linear change of variable. (Default: 1). The 4th parameter is axis i.e. an axis over which the derivative is taken. (Default: 0).

## Steps

At first, import the required library −

import numpy as np from numpy.polynomial import chebyshev as C

Create a multidimensional array of Chebyshev series coefficients −

c = np.arange(4).reshape(2,2)

Display the coefficient array −

print("Our coefficient Array...\n",c)

Check the Dimensions −

print("\nDimensions of our Array...\n",c.ndim)

Get the Datatype −

print("\nDatatype of our Array object...\n",c.dtype)

Get the Shape −

print("\nShape of our Array object...\n",c.shape)

To differentiate a Chebyshev series, use the polynomial.chebder() method in Python Numpy. The method returns the Chebyshev series of the derivative −

print("\nResult...\n",C.chebder(c, axis = 1))

## Example

import numpy as np from numpy.polynomial import chebyshev as C # Create a multidimensional array of Chebyshev series coefficients c = np.arange(4).reshape(2,2) # Display the coefficient array print("Our coefficient Array...\n",c) # Check the Dimensions print("\nDimensions of our Array...\n",c.ndim) # Get the Datatype print("\nDatatype of our Array object...\n",c.dtype) # Get the Shape print("\nShape of our Array object...\n",c.shape) # To differentiate a Chebyshev series, use the polynomial.chebder() method in Python Numpy. print("\nResult...\n",C.chebder(c, axis = 1))

## Output

Our coefficient Array... [[0 1] [2 3]] Dimensions of our Array... 2 Datatype of our Array object... int64 Shape of our Array object... (2, 2) Result... [[1.] [3.]]

- Related Questions & Answers
- Differentiate a Chebyshev series with multidimensional coefficients over specific axis in Python
- Differentiate a Hermite_e series with multidimensional coefficients over axis 1 in Python
- Differentiate a Hermite series with multidimensional coefficients over axis 1 in Python
- Differentiate a Laguerre series with multidimensional coefficients over axis 1 in Python
- Differentiate a Legendre series with multidimensional coefficients over axis 1 in Python
- Differentiate a polynomial with multidimensional coefficients over axis 1 in Python
- Differentiate a Chebyshev series with multidimensional coefficients in Python
- Differentiate a Hermite_e series with multidimensional coefficients over specific axis in Python
- Differentiate a Hermite series with multidimensional coefficients over specific axis in Python
- Differentiate a Laguerre series with multidimensional coefficients over specific axis in Python
- Differentiate a Legendre series with multidimensional coefficients over specific axis in Python
- Differentiate a polynomial with multidimensional coefficients over specific axis in Python
- Integrate a Chebyshev series over axis 1 in Python
- Differentiate a Hermite_e series with multidimensional coefficients in Python
- Differentiate a Hermite series with multidimensional coefficients in Python