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

Online Help

All Products Maple MapleSim


[フレーム] [フレーム]

degree

degree of a polynomial

ldegree

low degree of a polynomial

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={maxall termstofpdegreet,x1,,xn,ifpis a sumdegreep,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

ax410x2+1

(1)
>

degreea,x

4

(2)
>

ldegreea,x

0

(3)
>

bx22+3x

b1x22+3x

(4)
>

degreeb,x

1

(5)
>

ldegreeb,x

−2

(6)
>

cx2y+3xy2+x3y3x5

cx3y3x5+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

fxy3+x2

(14)
>

degreef,x,degreef,y

2,3

(15)

Find the total degree of f.

>

degreef

4

(16)
>

degreef,x,y

4

(17)
>

degreef,x,y

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

zeroyxx+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)


Download Help Document

AltStyle によって変換されたページ (->オリジナル) /