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
Difference of polynomials : (0-9)x2 + (1-5)x + (2-4)
P1 : 1 x + 2 P2 : 2 9 x + 5 x + 4 P1 - P2 : 2 -9 x - 4 x - 2
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.
- Programs for printing pyramid patterns in Python
- Python | Pandas series.str.get()
- Random Numbers in Python
- Python | Introduction to Matplotlib
- Python | globals() function
- Python | Pandas str.join() to join string/list elements with passed delimiter
- Python | Pandas Series.str.cat() to concatenate string
- Python | Pandas.Categorical()
- Python | Pandas Categorical DataFrame creation
- Why Python is called Dynamically Typed?