degree - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Mathematics : Algebra : Polynomials : degree

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+1x+2x2, 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:

degreep,=0

degreep,x1,x2,...=degreep,x1+degreelcoeffp,x1,x2,...

• 

The total degree is then defined as

degreep,{x1,...,xn}=maximum degreep,{x1,...xn}over thetermsinasum=degreep,[x1,...,xn]otherwise

• 

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

Examples

ax410x2+1

a:=x410x2+1

(1)

degreea,x

4

(2)

ldegreea,x

0

(3)

bx22+3x

b:=1x22+3x

(4)

degreeb,x

1

(5)

ldegreeb,x

2

(6)

cx2y+3xy2+x3y3x5

c:=x3y3x5+x2y+3xy2

(7)

degreec,x

5

(8)

degreec,y

3

(9)

degreec

6

(10)

ldegreec,x

1

(11)

ldegreec,y

0

(12)

ldegreec

3

(13)

fxy3+x2

f:=xy3+x2

(14)

degreef,x,degreef,y

2,3

(15)

Find the total degree of f.

degreef

4

(16)

degreef,x,y

4

(17)

degreef,y,x

4

(18)

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

degreef,x,y

2

(19)

degreef,y,x

4

(20)

Examples of non-polynomial inputs

degreeysinx,x

FAIL

(21)

degreeysinx,y

1

(22)

degreex+1x+2,x

FAIL

(23)

Here collect with normalization is necessary.

zeroyxx+1+1x+11

zero:=yxx+1+1x+11

(24)

degreezero,x

FAIL

(25)

degreezero,y

1

(26)

collectzero,x,normal

0

(27)

degreecollectzero,x,normal,x

∞

(28)

degreecollectzero,y,normal,y

∞

(29)

See Also

collect

indets

lcoeff

tcoeff

 


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam