Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Get the total degree of a polynomial in any number of variables
ResourceFunction["PolynomialTotalDegree"][f,vars] gives the total degree of f in the variables vars. |
The term of highest degree is x2y with total degree 3:
In[1]:= |
![]() |
Out[1]= |
![]() |
Since xSin[x] is not a polynomial, the input here is returned unevaluated:
In[2]:= |
![]() |
Out[2]= |
![]() |
This works, though:
In[3]:= |
![]() |
Out[3]= |
![]() |
This work is licensed under a Creative Commons Attribution 4.0 International License