Integrate a Laguerre series and set the lower bound of the integral in Python

To integrate a Laguerre series and set the lower bound of the integral, use the laguerre.lagint() method in Python. This method returns the Laguerre series coefficients integrated m times from the specified lower bound lbnd. At each iteration, the resulting series is multiplied by a scaling factor and an integration constant is added.

Syntax

numpy.polynomial.laguerre.lagint(c, m=1, k=[], lbnd=0, scl=1, axis=0)

Parameters

The key parameters for the lagint() method are ?

  • c ? Array of Laguerre series coefficients
  • m ? Order of integration (default: 1)
  • k ? Integration constant(s) (default: [])
  • lbnd ? Lower bound of the integral (default: 0)
  • scl ? Scaling factor applied after each integration (default: 1)
  • axis ? Axis over which the integral is taken (default: 0)

Example

import numpy as np
from numpy.polynomial import laguerre as L

# Create an array of coefficients
c = np.array([1, 2, 3])

# Display the array
print("Our Array...")
print(c)

# Check the Dimensions
print("\nDimensions of our Array...")
print(c.ndim)

# Get the Datatype
print("\nDatatype of our Array object...")
print(c.dtype)

# Get the Shape
print("\nShape of our Array object...")
print(c.shape)

# Integrate Laguerre series with lower bound set to -2
print("\nResult with lbnd = -2...")
print(L.lagint(c, lbnd=-2))
Our Array...
[1 2 3]

Dimensions of our Array...
1

Datatype of our Array object...
int64

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

Result with lbnd = -2...
[33.  1.  1. -3.]

Different Lower Bounds

Let's compare results with different lower bound values ?

import numpy as np
from numpy.polynomial import laguerre as L

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

# Default lower bound (0)
print("Default (lbnd = 0):")
print(L.lagint(c))

# Lower bound = -1
print("\nWith lbnd = -1:")
print(L.lagint(c, lbnd=-1))

# Lower bound = 1
print("\nWith lbnd = 1:")
print(L.lagint(c, lbnd=1))
Default (lbnd = 0):
[ 0.  1.  1. -3.]

With lbnd = -1:
[10.  1.  1. -3.]

With lbnd = 1:
[-6.  1.  1. -3.]

How It Works

The lbnd parameter determines where the integration constant is evaluated. When you change the lower bound, the first coefficient (constant term) changes while the higher-order coefficients remain the same. This is because the integration process adds a constant that makes the integral equal zero at the lower bound.

Conclusion

Use numpy.polynomial.laguerre.lagint() with the lbnd parameter to integrate Laguerre series with a custom lower bound. The lower bound affects only the constant term of the resulting integrated series.

Updated on: 2026-03-26T20:17:45+05:30

250 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements