VOOZH about

URL: https://www.geeksforgeeks.org/python/numpy-polysub-in-python/

⇱ numpy.polysub() in Python - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

numpy.polysub() in Python

Last Updated : 29 Nov, 2018
numpy.polysub() :This function helps to find the difference of two polynomials and then returning the result as a polynomial. Each input polynomial must be a sequence of polynomial coefficients, from highest to lowest degree.
Parameters : 
p1 : Input polynomial 1 : 1x + 2.
p2 : Input polynomial 2 : 9x2 + 5x + 4
Return:
Difference of polynomials : (0-9)x2 + (1-5)x + (2-4)
Output:
P1 : 
1 x + 2

P2 : 
 2
9 x + 5 x + 4

P1 - P2 : 
 2
-9 x - 4 x - 2
Comment