Skip to content
geeksforgeeks
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • Tutorials
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
  • Practice
    • Build your AI Agent
    • GfG 160
    • Problem of the Day
    • Practice Coding Problems
    • GfG SDE Sheet
  • Contests
    • Accenture Hackathon (Ending Soon!)
    • GfG Weekly [Rated Contest]
    • Job-A-Thon Hiring Challenge
    • All Contests and Events
  • Numpy exercise
  • pandas
  • Matplotlib
  • Data visulisation
  • EDA
  • Machin Learning
  • Deep Learning
  • NLP
  • Data science
  • ML Tutorial
  • Computer Vision
  • ML project
Open In App
Next Article:
Compute the roots of a Chebyshev series using NumPy in Python
Next article icon

Integrate a Chebyshev series and set the lower bound of the integral using NumPy in Python

Last Updated : 02 Jun, 2022
Comments
Improve
Suggest changes
Like Article
Like
Report

In this article, we will see how to integrate a Chebyshev series and set the lower bound of the integral in Python using Numpy.

To perform Chebyshev integration, NumPy provides a function called chebyshev.chebint which can be used to integrate Legendre series.

Syntax: chebyshev.chebint(c, lbnd=0, scl=1, axis=0)

Parameters:

c – Array of Chebyshev series coefficients.
lbnd – 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 5 elements with a lbnd set to -2. Import the necessary packages as shown and pass the appropriate parameters as shown below. We are also displaying shape, dimensions, and data type of created numpy array.

Python3
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, lbnd=-2)  # integrated chebyshev series # with  lbnd=-2 print(f'Resultant series ---> {res}') 

Output:

The shape of the array is (5,)

The dimension of the array is 1D

The datatype of the array is int64

Resultant series ---> [ 3.77083333e+02  4.50000000e+00 -5.00000000e-01 -3.33333333e-01

  1.75000000e+00  1.50000000e+00]

Example 2:

In the first example. let us consider a 2D array with 5 elements each with a lbnd set to -1. Import the necessary packages as shown and pass the appropriate parameters as shown below. We are also displaying the shape, dimensions, and data type of created NumPy array.

Python3
import numpy as np from numpy.polynomial import chebyshev  # co.efficient array c = np.array([[11, 12, 13, 14, 15], [56, 55, 44, 678, 89]])  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, lbnd=-1)  # integrated chebyshev series # with  lbnd=-1 print(f'Resultant series ---> {res}') 

Output:

The shape of the array is (2, 5)

The dimension of the array is 2D

The datatype of the array is int64

Resultant series ---> [[  -3.     -1.75    2.   -155.5    -7.25]

 [  11.     12.     13.     14.     15.  ]

 [  14.     13.75   11.    169.5    22.25]]


Next Article
Compute the roots of a Chebyshev series using NumPy in Python
author
sravankumar_171fa07058
Improve
Article Tags :
  • Python
  • Python-numpy
  • Python numpy-polynomials
Practice Tags :
  • python

Similar Reads

  • Integrate Legendre series and set the lower bound of the integral using NumPy in Python
    In this article, we will see how to integrate a Legendre series and set the lower bound of the integral in Python using NumPy. To perform Legendre integration, NumPy provides a function called legendre.legint which can be used to integrate Legendre series. Syntax: legendre.legint(c, lbnd=0, scl=1, a
    3 min read
  • Integrate a Chebyshev series and set the order of integration using NumPy in Python
    In this article, we will discuss how to integrate the Chebyshev series and set the order of integration in Python and NumPy. chebyshev.chebint method Chebyshev polynomials are significant in approximation theory because the Chebyshev nodes are used as matching points for optimizing polynomial interp
    4 min read
  • Compute the roots of a Chebyshev series using NumPy in Python
    This article will discuss how to compute the roots of a Chebyshev series in NumPy using Python. Chebyshev polynomials are important in approximation theory these are never formally generated. Only the coefficients are required for all calculations. If we want to compute the roots of a polynomial we
    2 min read
  • Differentiate a Chebyshev series using NumPy in Python
    In this article, we will cover how to integrate a Chebyshev series and set the integration constant in Python using NumPy. chebyshev.chebder method The Chebyshev series has polynomials with the largest possible leading coefficient, whose absolute value on the interval [−1, 1] is bounded by 1. They a
    3 min read
  • Integrate a Legendre series over axis 0 using NumPy in Python
    In this article, we will cover how to integrate a Legendre series over axis 0 using NumPy in Python. polynomial.legendre.legint method The polynomial.legendre.legint() method from the NumPy library is used to Integrate a Legendre series over axis 0 in python.The resulting series is multiplied by scl
    3 min read
  • Get the Least squares fit of Chebyshev series to data in Python-NumPy
    In this article, we will cover how to get the Least-squares fit of the Chebyshev series to data in Python. chebyshev.chebfit method The NumPy library provides us numpy.polynomial.chebyshev.chebfit() method to get the Least-squares fit of the Chebyshev series to data in python. The method returns the
    3 min read
  • Integrate a Hermite series and multiply the result by a scalar before the integration constant is added using NumPy in Python
    In this article, we will see how to integrate a Hermite series and multiply the result by a scalar before the integration constant is added in Python. hermite.hermint method     Hermite nodes are utilised as matching points for optimising polynomial interpolation, Hermite polynomials are important i
    2 min read
  • Return the infinity Norm of the matrix in Linear Algebra using NumPy in Python
    In this article, we will how to return the infinity Norm of the matrix in Linear Algebra in Numpy using Python. numpy.linalg.norm() method The numpy.linalg.norm() method returns the matrix's infinite norm in Python linear algebra. This function can return one of eight possible matrix norms or an inf
    3 min read
  • Integrate a Hermite_e series Over Axis 0 using Numpy in Python
    In this article, we will cover how to integrate a Hermite_e series over axis 0 using NumPy in Python. NumPy e.hermeint() method  We use the hermite e.hermeint() function present in the NumPy module of python to integrate a Hermite e series. The first parameter 'arr' is an array of coefficients from
    2 min read
  • Raise Chebyshev series to a power using NumPy in Python
    In this article, we will cover how to raise a Chebyshev series to power in Python using NumPy. polynomial.chebyshev.chebpow method The Chebyshev polynomials are like the other classical orthogonal polynomials which can be defined from a variety of starting locations.  Here, we will see how to raise
    3 min read
geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox
Improvement
Suggest Changes
Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.
geeksforgeeks-suggest-icon
Create Improvement
Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.
geeksforgeeks-improvement-icon
Suggest Changes
min 4 words, max Words Limit:1000

Thank You!

Your suggestions are valuable to us.

What kind of Experience do you want to share?

Interview Experiences
Admission Experiences
Career Journeys
Work Experiences
Campus Experiences
Competitive Exam Experiences