Function Repository Resource:

PolynomialTotalDegree

Source Notebook

Get the total degree of a polynomial in any number of variables

Contributed by: Wolfram Staff

ResourceFunction["PolynomialTotalDegree"][f,vars]

gives the total degree of f in the variables vars.

Examples

Basic Examples (3) 

The term of highest degree is x2y with total degree 3:

In[1]:=
ResourceFunction["PolynomialTotalDegree"][(x^2 + x + 1) y, {x, y}]
Out[1]=

Since xSin[x] is not a polynomial, the input here is returned unevaluated:

In[2]:=
ResourceFunction["PolynomialTotalDegree"][x Sin[x], {x, y}]
Out[2]=

This works, though:

In[3]:=
ResourceFunction["PolynomialTotalDegree"][x Sin[x], {x, Sin[x]}]
Out[3]=

Publisher

George Beck

Version History

  • 1.0.0 – 04 March 2020

License Information