degree - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Mozilla Firefox.

Online Help

All Products    Maple    MapleSim


degree

degree of a polynomial

ldegree

low degree of a polynomial

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

degree(a, x)

ldegree(a, x)

Parameters

a

-

any expression

x

-

(optional) indeterminate or a list or set of indeterminates

Description

• 

If x is a single indeterminate, the degree and ldegree commands compute the degree and low degree, respectively, of the polynomial a in x. If x is not specified then the degree and ldegree commands compute the total degree and total low degree, respectively, of the polynomial a in all of its indeterminates. The definitions for the cases where x is a list or set of indeterminates are given below.

• 

The polynomial a can have negative integer exponents in x. Thus degree and ldegree functions can return a negative or positive integer.  If a is not a polynomial in x in this generalized sense, then FAIL is returned.

• 

The identically 0 polynomial is defined to have degree -infinity and ldegree +infinity.

• 

The polynomial a must be in collected form in order for degree/ldegree to return an accurate result.  For example, given x+1⁢x+2−x2, degree would not detect the cancellation of the leading term, and would incorrectly return a result of 2.  Applying collect with normalization or expand to the polynomial before calling degree avoids this problem.

• 

If x is a set of indeterminates, the total degree/ldegree is computed.  If x is a list of indeterminates, then the vector degree/ldegree is computed. Finally, if x is not specified, this is short for degree(a,indets(a)), meaning that the total degree in all the indeterminates is computed. The vector degree is defined as follows:

degree⁡p,=0

degree⁡p,x1,x2,...=degree⁡p,x1+degree⁡lcoeff⁡p,x1,x2,...

• 

The total degree is then defined as

degree⁡p,x1,…,xn={maxall termstofpdegree⁡t,x1,…,xn,ifpis a sumdegree⁡p,x1,…,xn,otherwise

• 

Notice that the vector degree is sensitive to the order of the indeterminates, whereas the total degree is not.

Examples

> 

a≔x4−10⁢x2+1

a≔x4−10⁢x2+1

(1)
> 

degree⁡a,x

4

(2)
> 

ldegree⁡a,x

0

(3)
> 

b≔x−2−2+3⁢x

b≔1x2−2+3⁢x

(4)
> 

degree⁡b,x

1

(5)
> 

ldegree⁡b,x

−2

(6)
> 

c≔x2⁢y+3⁢x⁢y2+x3⁢y3−x5

c≔x3⁢y3−x5+x2⁢y+3⁢x⁢y2

(7)
> 

degree⁡c,x

5

(8)
> 

degree⁡c,y

3

(9)
> 

degree⁡c

6

(10)
> 

ldegree⁡c,x

1

(11)
> 

ldegree⁡c,y

0

(12)
> 

ldegree⁡c

3

(13)
> 

f≔x⁢y3+x2

f≔x⁢y3+x2

(14)
> 

degree⁡f,x,degree⁡f,y

2,3

(15)

Find the total degree of f.

> 

degree⁡f

4

(16)
> 

degree⁡f,x,y

4

(17)
> 

degree⁡f,x,y

4

(18)

Find the vector degree of f, which is sensitive to the order of the indeterminates.

> 

degree⁡f,x,y

2

(19)
> 

degree⁡f,y,x

4

(20)

Examples of non-polynomial inputs

> 

degree⁡y⁢sin⁡x,x

FAIL

(21)
> 

degree⁡y⁢sin⁡x,y

1

(22)
> 

degree⁡x+1x+2,x

FAIL

(23)

Here collect with normalization is necessary.

> 

zero≔y⁢xx+1+1x+1−1

zero≔y⁢xx+1+1x+1−1

(24)
> 

degree⁡zero,x

FAIL

(25)
> 

degree⁡zero,y

1

(26)
> 

collect⁡zero,x,normal

0

(27)
> 

degree⁡collect⁡zero,x,normal,x

−∞

(28)
> 

degree⁡collect⁡zero,y,normal,y

−∞

(29)

See Also

collect

indets

lcoeff

tcoeff