Differentiate a Hermite series with multidimensional coefficients over axis 1 in Python

To differentiate a Hermite series with multidimensional coefficients, use the hermite.hermder() method in Python. This method allows differentiation along specific axes when working with multidimensional coefficient arrays.

Parameters

The hermite.hermder() method accepts the following parameters ?

  • c ? Array of Hermite series coefficients. For multidimensional arrays, different axes correspond to different variables
  • m ? Number of derivatives taken (default: 1). Must be non-negative
  • scl ? Scalar multiplier for each differentiation (default: 1). Final result is multiplied by scl**m
  • axis ? Axis over which the derivative is taken (default: 0)

Example

Let's create a multidimensional coefficient array and differentiate along axis 1 ?

import numpy as np
from numpy.polynomial import hermite as H

# Create a multidimensional array of coefficients
c = np.arange(4).reshape(2,2)

# Display the array
print("Our 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)

# Differentiate Hermite series along axis 1
print("\nResult...\n",H.hermder(c, axis=1))
Our Array...
 [[0 1]
  [2 3]]

Dimensions of our Array...
2

Datatype of our Array object...
int64

Shape of our Array object...
(2, 2)

Result...
 [[2.]
  [6.]]

How It Works

When differentiating along axis 1, the method processes each row independently. The derivative of a Hermite series H_n(x) follows the rule: d/dx H_n(x) = 2n * H_{n-1}(x). In our example ?

  • First row [0, 1]: derivative of 1*H_1(x) is 2*1*H_0(x) = 2
  • Second row [2, 3]: derivative of 3*H_1(x) is 2*3*H_0(x) = 6

Conclusion

Use hermite.hermder() with the axis parameter to differentiate Hermite series along specific dimensions. This is particularly useful when working with multidimensional polynomial systems where each axis represents different variables.

Updated on: 2026-03-26T20:16:22+05:30

210 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements