Algebraic - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Mathematics : Algebra : Algebraic Numbers : Algebraic/Content

Algebraic

  

Content

  

content of a polynomial with algebraic number coefficients

  

PrimitivePart

  

primitive part of a polynomial with algebraic number coefficients

 

Calling Sequence

Parameters

Options

Description

Examples

Calling Sequence

Content(a, v, options)

Content(a, v, `pp`, options)

PrimitivePart(a, v, options)

PrimitivePart(a, v, `co`, options)

Parameters

a

-

polynomial with algebraic number coefficients

v

-

(optional) name, set of names, or list of names

co, pp

-

(optional) unevaluated names

options

-

(optional) equation(s) of the form keyword = value, where keyword is either 'symbolic', 'makeindependent', or 'characteristic'

Options

• 

If the option 'symbolic'=true is given and a RootOf whose minimal polynomial factors nontrivially is detected, then it will be reduced to a RootOf of lower degree by picking one of the factors arbitrarily. This will eliminate the possibility of a "reducible RootOf detected" error. The default is 'symbolic'=false.

• 

If the option 'characteristic'=p is given, where p is a nonnegative integer, the content and primitive part are computed over an extension of the ring p of integers modulo p. The default is 'characteristic'=0 and means that the content and primitive part are computed over an extension of the rational numbers.

• 

Note that if p is positive but not a prime, then p is not a field, so Content and PrimitivePart may not be able to perform the computation. If they do not succeed because they encounter an integer that has no inverse modulo p, they issue the error "zero divisor modulo p detected".

• 

If the option 'makeindependent'=true is given, then Content and PrimitivePart will always try to find a field representation for algebraic numbers in the input, regardless of how many algebraic objects the input contains. If the input contains many RootOfs, then this can be a very expensive calculation. If 'makeindependent'=false is given, then no independence checking is performed. The default is 'makeindependent'=FAIL, in which case algebraic dependencies will only be checked for if there are 4 or fewer algebraic objects in the input.

Description

• 

The Content and PrimitivePart commands compute the content and primitive part of the multivariate polynomial a with respect to the variable(s) v. The content is defined as a greatest common divisor of the coefficients of a with respect to the indeterminates v and is free of v. The primitive part is a polynomial in v defined as aContenta.

• 

The input a may contain algebraic number coefficients. These may be represented by radicals or with the RootOf notation (see type/algnum, type/radnum). In general, algebraic numbers will be returned in the same representation as they were received in. Nested radicals and RootOfs are also supported.

• 

Formally, the input will be considered as an element of the domain K(y)[v], where

– 

K is an algebraic field generated over the rationals and any algebraic numbers in a (unless the option 'characteristic' is given; see below).

– 

v is the set of indeterminates, which can be given as the optional second argument to Content or PrimitivePart. If the argument v is omitted, then by default, all of the variables in a will be used.

– 

y is the set of names and other non-algebraic subexpressions in the input that are not included in v. These will be treated as elements of the coefficient field.

  

A primitive part pp of a will then be a polynomial in K[y][v] whose coefficients are relatively prime polynomials in K[y]. The corresponding content co is an element of K(y) such that a=copp. The content and primitive part are unique up to a multiplicative constant in K. In particular, it is important to note that the Content and PrimitivePart commands will normalize their output differently, so a will not necessarily be the product of Content(a) and PrimitivePart(a). To obtain the associated factors, use the optional third arguments `co` and `pp` (see below).

• 

Note that the input must be a polynomial in v, but its coefficients may be rational functions in other variables. The primitive part will always be a polynomial in v whose denominator is 1, so any factors in the denominator of the input will be considered as part of the content. If a is a polynomial disguised as a rational function, it will first be normalized using Algebraic[Normal].

• 

The Content command will return the unsigned content, and if the optional parameter `pp` is included, it will be assigned the value of the corresponding primitive part. In this case, priority is given to normalizing the content:

– 

There are no constant factors in the content. All constant factors are multiplied into the primitive part.

– 

The primitive part will contain at most two constant factors, and at most one of them is not a rational number.

– 

All remaining non-constant factors in both the content and the primitive part have signed integer content equal to 1 (except possibly if there is only one non-constant factor in the primitive part).

• 

The PrimitivePart command will return the primitive part, and if the optional parameter `co` is included, it will be assigned the value of the corresponding content. In this case, priority is given to normalizing the primitive part:

– 

There are no constant factors in the primitive part, with the possible exception of −1, since the content is always unsigned. The denominator of the primitive part is 1, and all other constant factors are multiplied into the content.

– 

The content will contain at most two constant factors, and at most one of them is not a rational number.

– 

All remaining non-constant factors in both the content and the primitive part have signed integer content equal to 1 (except possibly if there is only one non-constant factor in the content).

• 

Note that in both Content and PrimitivePart, no effort is made to rationalize leading coefficients or denominators in the output. This helps to keep the output as small and simplified as possible for subsequent computations. To rationalize the output, simply apply Algebraic[Normal] to it.

• 

If the input is mathematically equivalent to zero, both the content and the primitive part are defined to be zero.

• 

These commands preserve partial factorizations in the input and expand polynomials only if necessary.

• 

Non-algebraic sub-expressions such as sinx that are neither variables, rational numbers, or algebraic objects are frozen and temporarily replaced by new local variables, which are considered as elements of the coefficient field.

• 

The v parameter can also contain functions such as sinx, in which case they will be frozen and treated as variables. However, functions that are also of type AlgebraicObject such as sinπ3 will be converted to algebraic numbers before proceeding, so they cannot be treated as variables. Proceed with caution when using functions in v, as treating some functions as variables may produce mathematically unsound results.

• 

All algebraic numbers occurring in the results will be reduced modulo their minimal polynomial (see Algebraic,Reduce), and all arguments of functions, if any, will be normalized recursively (see Algebraic,Normal).

• 

If the set of radicals and RootOfs in the input cannot be embedded into a field algebraically, then Content and PrimitivePart may not be able to perform the computation. Content and PrimitivePart will try to find a field representation if there are at most 4 algebraic objects in the input (unless the option 'makeindependent' is given; see below), and otherwise attempt to proceed anyway. If unsuccessful, a "reducible RootOf detected" error will be returned (unless the option 'symbolic'=true is given; see below).

• 

These functions do not support input containing floats or radical functions such as x.

Examples

withAlgebraic:

Introductory examples:

co1Contentxy+sqrt2x+sqrt2y2+2y,x,pp1

co12+y

(1)

co1

2+y

(2)

pp1

y2+x

(3)

expandco1pp1

xy+x2+2y2+2y

(4)

PrimitivePartx2+1+xyIy,y,co2,co2

y+x+I,I+x

(5)

The input may contain both radicals and RootOfs. Content and PrimitivePart will embed the coefficients into an algebraic field, if possible:

Contentx23x1+xRootOf_Z23_Z1y,y,pp3,pp3

xRootOf_Z23_Z1,y+x+RootOf_Z23_Z13

(6)

Contentx2sqrt2+x2y+y+RootOf_Z22,index=1,x,pp4,pp4

2+y,x2+1

(7)

PrimitivePartxy+xsqrt2+ysqrt3+sqrt6,y,co5,co5

2+y,3+x

(8)

Nested and mixed radicals and RootOfs are handled as well:

Contentxy+RootOf_Z2RootOf_Z22,index=1,index=1+x2y+x2214,x,pp6,pp6

y+214,x2+x

(9)

The content and primitive part will be calculated with respect to the variables in v:

Contentx2y2+x2y+y2x+xy,,pp7,pp7

x2y2+x2y+y2x+xy,1

(10)

Contentx2y2+x2y+y2x+xy,x,pp8,pp8

y2+y,x2+x

(11)

Contentx2y2+x2y+y2x+xy,y,pp9,pp9

x2+x,y2+y

(12)

Contentx2y2+x2y+y2x+xy,x,y,pp10,pp10

1,x2y2+x2y+y2x+xy

(13)

If the v parameter is omitted, then all the variables in the input will be used:

Contentx2y2+x2y+y2x+xy

1

(14)

PrimitivePartx2y2+x2y+y2x+xy

x2y2+x2y+y2x+xy

(15)

The coefficients of the input may be rational functions, but the primitive part will always be a polynomial in v with a denominator of 1:

Contentx2y+xy+1,x,pp11,pp11

1y,y2x+x2+y

(16)

PrimitivePartx2sqrt2+xIy,x,co12,co12

xy22Ix,12y

(17)

An error message will be returned if any elements of v occur in the denominator of the input:

Contentx2y+yx,x

Error, (in Algebraic:-Content) polynom in [x] expected

Contentx2y+yx,x,y

Error, (in Algebraic:-Content) polynom in [x, y] expected

However, if a is a polynomial in v disguised as a rational function, then it will first be normalized using Algebraic[Normal]:

PrimitivePartx2yz+2yzx+sqrt2I,x,y

I2y+xy

(18)

The content will always be unsigned, so negatives will always be moved into the primitive part, regardless of which command is used:

Contentxyy,x,pp13,pp13

y,x1

(19)

PrimitivePartxyy,x,pp14,pp14

x1,y

(20)

Depending on which command is used, priority may be given to normalizing either the content or the primitive part, so the values returned by Content and PrimitivePart can differ by a constant. Here, the constant is 35:

Content3xysqrt5+6ysqrt10,x,pp15,pp15

y,652+35x

(21)

PrimitivePart3xysqrt5+6ysqrt10,x,co16,co16

x+22,35y

(22)

If the input is mathematically equivalent to zero, both the content and the primitive part are, by definition, zero:

Contentx2+1xIx+I,x,pp17,pp17

0,0

(23)

PrimitivePartx2+1xIx+I,x,co18,co18

0,0

(24)

Factorizations in the input will be preserved and expanded only if necessary:

Contentxy+3yxz+xz+2,x,pp19,pp19

yz+1z+2,x+3x

(25)

Contentexpandxy+3yxz+xz+2,x,pp20,pp20

yz2+3yz+2y,x2+3x

(26)

Non-algebraic sub-expressions such as sinx will be frozen and treated as elements of the coefficient field:

Contentx2sinx+xsinxfooy,x,pp21,pp21

sinx,fooyx+x2

(27)

PrimitivePart3xfooy+RootOf_Z23x2fooy2,x,co22,co22

RootOf_Z23x+3fooyx,1fooy2

(28)

However, whenever possible, such expressions will be converted to algebraic numbers (see ConvertRootOf):

PrimitivePartxyzsinπ3+x2y2z2tanπ6,x,y,co23,co23

2zy2x2+3xy,3z6

(29)

Contentxy2+expIπ+ysecπ,x,pp24,pp24

y+1,xyx+1

(30)

Non-algebraic functions can also be included in the v parameter, as long as they are not of type Algebraic Object:

Contentsinx2cosy+sinxcosy,sinx,pp25,pp25

cosy,sinx2+sinx

(31)

Contentsinπ92cosy+sinπ9cosy,sinπ9

Error, invalid input: too many and/or wrong type of arguments passed to Algebraic:-Content; first unused argument is sin(1/9*Pi)

The arguments of functions in the input will be recursively normalized and simplified (see Algebraic,Normal):

Contentsinx23xRootOf_Z23x+sinx+RootOf_Z23,x

sinx+RootOf_Z23

(32)

Contentsinxy2+cosxπ2y,y

sinx

(33)

Non-algebraic functions in the input may become algebraic after recursive treatment:

Contentxyx+y+cosπy+πy+1,x,pp26,pp26

y1,x+1

(34)

All algebraic numbers will be reduced modulo their minimal polynomial (see Reduce):

PrimitivePartxy+xRootOf_Z2_Z32+y+RootOf_Z2_Z3+3,x,co27,co27

x+1,RootOf_Z2_Z3+y+3

(35)

Algebraic functions such as y are not accepted:

Contentx2y+2xsqrty+xy,x

Error, (in Algebraic:-Content) polynom with radalgnum coefficients expected

Floats are not accepted.

Contentx22x0.5

Error, (in Algebraic:-Content) polynom with radalgnum coefficients expected

When a non-indexed RootOf is given in the input, sometimes the content and primitive part can still be computed:

Contentx2y24+xy+RootOf_Z24,x,pp28,pp28

y+RootOf_Z24,x2yx2RootOf_Z24+x

(36)

Contentx2y24+xy+RootOf_Z24,index=1,x,pp29,pp29

y+2,x2y2x2+x

(37)

However, in this case, Content and PrimitivePart must know whether RootOf_Z23_Z+2 without an index represents 1 or 2 in order to determine whether the coefficients of the input can be factored out into the content:

Contentx2y+1+xy+RootOf_Z23_Z+2,index=1,x,pp30,pp30

y+1,x2+x

(38)

Contentx2y+1+xy+RootOf_Z23_Z+2,index=2,x,pp31,pp31

1,x2y+x2+xy+2x

(39)

Contentx2y+1+xy+RootOf_Z23_Z+2,x

Error, (in Algebraic:-Content) reducible RootOf detected. Substitutions are {RootOf(_Z^2-3*_Z+2) = 1, RootOf(_Z^2-3*_Z+2) = 2}

To force Content or PrimitivePart to reduce this RootOf to one of lower degree by picking one of the substitutions arbitrarily, use option 'symbolic'=true. Here, it makes the substitution RootOf_Z23_Z+2 = 2:

Contentx2y+1+xy+RootOf_Z23_Z+2,x,pp32,symbolic=true,pp32

1,x2y+x2+xy+2x

(40)

Non-indexed RootOfs can be treated as constants, even if one of them is a zero divisor. However, if the input contains a zero divisor as a common factor, then it will always be left in the primitive part:

PrimitivePartx2RootOf_Z28_Z3+xRootOf_Z28_Z3,x,co33,co33

x2+x,RootOf_Z28_Z3

(41)

PrimitivePartx2RootOf_Z28_Z+xRootOf_Z28_Z,x,co34,co34

x2RootOf_Z28_Z+xRootOf_Z28_Z,1

(42)

Using option 'characteristic', the content and primitive part can be computed over finite fields:

Contentxy+4x+3y+2,x,pp35,pp35

1,xy+4x+3y+2

(43)

Contentxy+4x+3y+2,x,pp36,characteristic=5,pp36

y+4,x+3

(44)

PrimitivePartx2y26+xy2+2Iy1,x,co37,characteristic=7,co37

x2y+6Ix2+xy+Ix,y+I

(45)

In composite characteristic, the content and primitive part cannot always be computed. Content and PrimitivePart will return an error if they encounter a zero divisor:

Content2xy+x+4y+2,x,pp38,characteristic=9,pp38

y+5,2x+4

(46)

Content2xy+x+4y+2,x,characteristic=10

Error, (in Algebraic:-Content) zero divisor modulo 10 detected

With the value of 'makeindependent' set to true, the input will be checked for algebraic dependencies even if there are more than 4 algebraic objects in the input:

CubeRootOf4RootOf_Z3+4,index=1

CubeRootOf−4RootOf_Z3+4,index=1

(47)

CubeRootOf2RootOf_Z3+2,index=1

CubeRootOf−2RootOf_Z3+2,index=1

(48)

CubeRootOf2RootOf_Z32,index=1

CubeRootOf2RootOf_Z32,index=1

(49)

CubeRootOf3RootOf_Z33,index=1

CubeRootOf3RootOf_Z33,index=1

(50)

CubeRootOf4RootOf_Z34,index=1

CubeRootOf4RootOf_Z34,index=1

(51)

CubeRootOf6RootOf_Z36,index=1

CubeRootOf6RootOf_Z36,index=1

(52)

PrimitivePartxy+CubeRootOf4CubeRootOf2CubeRootOf3+y+CubeRootOf4CubeRootOf6,x,co39,co39

Error, (in Algebraic:-PrimitivePart) reducible RootOf detected. Substitutions are {RootOf(_Z^3+4,index = 1) = 1/2*RootOf(_Z^3-4,index = 1)^2*RootOf(_Z^3+2,index = 1), RootOf(_Z^3+4,index = 1) = RootOf(RootOf(_Z^3-4,index = 1)^2*RootOf(_Z^3+2,index = 1)*_Z-2*RootOf(_Z^3-4,index = 1)^2+2*_Z^2+4*RootOf(_Z^3+2,index = 1))}

PrimitivePartxy+CubeRootOf4CubeRootOf2CubeRootOf3+y+CubeRootOf4CubeRootOf6,x,co40,makeindependent=true,co40

x+1,RootOf_Z3+2,index=1RootOf_Z36,index=1RootOf_Z34,index=122+y

(53)

With option 'makeindependent'=false, the input will never be checked for algebraic dependencies:

PrimitivePartxy+CubeRootOf2CubeRootOf3+y+CubeRootOf6,x,co41,co41

x+1,y+RootOf_Z36,index=1

(54)

PrimitivePartxy+CubeRootOf2CubeRootOf3+y+CubeRootOf6,x,co42,makeindependent=false,co42

Error, (in Algebraic:-PrimitivePart) reducible RootOf detected. Substitutions are {RootOf(_Z^3-2,index = 1) = 1/3*RootOf(_Z^3-6,index = 1)*RootOf(_Z^3-3,index = 1)^2, RootOf(_Z^3-2,index = 1) = RootOf(RootOf(_Z^3-6,index = 1)*RootOf(_Z^3-3,index = 1)^2*_Z+RootOf(_Z^3-6,index = 1)^2*RootOf(_Z^3-3,index = 1)+3*_Z^2)}

See Also

Algebraic

Algebraic[GreatestCommonDivisor]

Algebraic[Normal]

content

evala,Content

evala,Primpart