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:
Integrate a Chebyshev series and set the order of integration using NumPy in Python
Next article icon

Integrate a Hermite series and multiply the result by a scalar before the integration constant is added using NumPy in Python

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

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 in approximation theory. NumPy has a function called hermite.hermint() that can be used to integrate the Hermite series in a specific order. It will require two parameters: c, which is an array, and scl, which is a scalar that will be multiplied by the integrated Hermite series before the integration constant is added.

Syntax: hermite.hermint(c,scl)

Parameter:

  • c: an array
  • scl: A scalar value

Return: Hermite series coefficients of the integral.

Example 1

In this example, we will create a one-dimensional NumPy coefficient array with 6 elements and integrate the Hermite series and multiply the result by a scalar with the value -2  before the integration constant.

Python3
# import the numpy module import numpy  # import hermite from numpy.polynomial import hermite  # Create an array of hermite series # coefficients with 6 elements coefficient_array = numpy.array([1, 2, 3, 4, 3, 5])  # display array print("Coefficient array: ", coefficient_array)  # display the dimensions print("Dimensions: ", coefficient_array.ndim)  # integrate hermite series with scale=2 print(    hermite.hermint(coefficient_array, scl=-2)) 

Output:

Coefficient array:  [1 2 3 4 3 5]

Dimensions:  1

[-90.          -1.          -1.          -1.          -1.

  -0.6         -0.83333333]   

Example 2

In this example, we will create a two-dimensional NumPy coefficient array with 6 elements each and integrate the Hermite series and multiply the result by a scalar with value -1 before the integration constant.

Python3
# import the numpy module import numpy  # import hermite from numpy.polynomial import hermite  # Create an 2d array of hermite series # coefficients with 6 elements each coefficient_array = numpy.array([[1, 2, 3, 4, 3, 5],                                   [4, 5, 6, 4, 3, 2]])  # display array print("Coefficient array: ", coefficient_array)  # display the dimensions print("Dimensions: ", coefficient_array.ndim)  # integrate hermite series with scale=-1 print(    hermite.hermint(coefficient_array, scl=-1)) 

Output:

Coefficient array:  [[1 2 3 4 3 5]   [4 5 6 4 3 2]]  Dimensions:  2  [[-2.   -2.5  -3.   -2.   -1.5  -1.  ]   [-0.5  -1.   -1.5  -2.   -1.5  -2.5 ]   [-1.   -1.25 -1.5  -1.   -0.75 -0.5 ]]

Next Article
Integrate a Chebyshev series and set the order of integration using NumPy in Python
author
sravankumar_171fa07058
Improve
Article Tags :
  • Python
  • Python-numpy
  • Python numpy-polynomials
Practice Tags :
  • python

Similar Reads

  • Integrate a Laguerre series and multiply the result by a scalar before the integration constant is added in Python
    In this article, we will see how to integrate a Laguerre series and multiply the result by a scalar before the integration constant is added in python. laguerre.lagint method Laguerre polynomials arise in quantum theory because the Laguerre nodes are used as matching points for optimizing polynomial
    2 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
  • Integrate a Chebyshev series and set the lower bound of the integral using NumPy in Python
    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, sc
    3 min read
  • Differentiate a Laguerre series and multiply each differentiation by a scalar using NumPy in Python
    In this article, we are going to see how to differentiate a Laguerre series, set the derivatives, and multiply each differentiation by a scalar in Python using NumPy. Numpy np.lagder() methodPython provides a method called lagder which is present in the Laguerre class that helps us to differentiate
    3 min read
  • Differentiate Hermite series and multiply each differentiation by scalar using NumPy in Python
    In this article, we will see how to differentiate the Hermite series and multiply each differentiation by a scalar in python. hermite.hermder method The hermite.hermder() is used to differentiate the Hermite series which is available in the NumPy module. We can pass the following parameters, the fir
    2 min read
  • Multiply a Hermite series by an independent variable in Python using NumPy
    In this article, we are going to see how to multiply a Hermite series by an independent variable in Python Using NumPy. The NumPy method numpy.polynomial.hermite.hermmulx() is used to Multiply a Hermite series by x(independent variable) to get a new one. Let's understand the syntax to know more abou
    2 min read
  • 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
  • Return the scaled companion matrix of a 1-D array of Chebyshev series coefficients using NumPy in Python
    In this article, we will discuss how to return the scaled companion matrix of a 1D array of Chebyshev series coefficients in python. chebyshev.chebcompanion() method  chebyshev.chebcompanion() method provides the eigenvalue estimates than the unscaled case and for basis polynomials. We can say that
    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
  • Differentiate a Hermite_e series and set the derivatives using NumPy in Python
    In this article, we will cover how to differentiate a Hermite_e series and set derivatives in Python using NumPy. np.polynomial.hermite_e.hermeder method: To Differentiate a Hermite series in python we use the NumPy.polynomial.hermite_e.hermeder() method which is used to return the c differentiated
    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