Algebraic - Maple Programming Help

Online Help

All Products    Maple    MapleSim


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

Algebraic

  

Normal

  

normal form for rational expressions with algebraic number coefficients

 

Calling Sequence

Parameters

Options

Description

Examples

Calling Sequence

Normal(p, options)

Parameters

p

-

any Maple object; typically a rational function with algebraic number coefficients

options

-

(optional) equation(s) of the form keyword = value, where keyword is one of 'symbolic', 'expanded', 'rationalize', 'characteristic', 'makeindependent', or 'recursive'.

Options

• 

If the option 'symbolic'=true is given and a RootOf whose minimal polynomial factors nontrivially is detected, Normal will reduce it to a RootOf of lower degree by picking one of the factors arbitrarily. The default is 'symbolic'=false.

• 

If the option 'expanded'=true is given, the result will be a quotient of two expanded polynomials, with the following properties:

– 

The leading coefficient, with respect to the block-lexicographic ordering of the variables described above, of the denominator is a positive integer.

– 

If there is a denominator, it is non-constant.

– 

The integer content of the denominator is equal to 1.

  

This form is unique, but again it may not exist if the radicals and RootOfs in the input do not define a field. The default is 'expanded'=false.

• 

If the option 'rationalize'=false is given, then leading coefficients of non-constant factors in the result will not be rationalized, and the denominator may contain constant factors that are not integers. This can be useful to avoid blowup in some examples where coefficients or denominators in the input contain many algebraic numbers.

• 

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

• 

Note that if p is positive but not a prime, then p is not a field, and a normal form may not exist. Normal will attempt to compute one anyway. If it does not succeed because it encounters an integer that has no inverse modulo p, it issues the error "zero divisor modulo p detected".

• 

If the option 'makeindependent'=true is given, then Normal 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.

• 

If the option 'recursive'=false is given, then Normal will not map itself recursively over non-algebraic subexpressions. The default is 'recursive'=true.

Description

• 

The Normal command computes a factored normal form for a (multivariate) rational expression whose coefficients contain radicals or RootOfs representing algebraic numbers. In particular, the result is 0 if and only if the input is mathematically equivalent to zero, under certain conditions (see below).

• 

Non-algebraic subexpressions such as sinx that are neither variables, rational numbers, or algebraic objects will first be mapped over recursively (unless the option 'recursive'=false is given; see below). Then they are frozen and temporarily replaced by new local variables, which are not considered to be constant in what follows.

• 

This command preserves partial factorizations in the input and expands polynomials only if necessary, unless the option 'expanded'=true is given (see below).

• 

The normal form satisfies the following properties:

– 

All radicals and powers of RootOfs in the result are reduced with respect to their respective minimal polynomials.  That is, every radical is of the form ar, where 0<r<1 is a rational number, and every integer exponent in a power of the form RootOff&comma;...n satisfies 0<n<degf .

– 

The numerator and the denominator have no non-trivial common factors.

  

Unless option 'expanded'=true or option 'rationalize'=false is given (see below), the normal form also satisfies the following properties:

– 

The leading coefficients, with respect to a block-lexicographic ordering of the variables where all global variables are considered larger than all local ones, of all non-constant factors are positive integers (except possibly if there is only one non-constant factor and no denominator). If all variables have different names, then this ordering is session-independent.

– 

There is at most one constant factor in the denominator, and it is a positive integer.

– 

There are at most two constant factors in the numerator, at most one of them is not a rational number, and the other one, if present, is an integer.

– 

All factors that are not rational numbers have integer content equal to 1, except possibly if there is only one non-constant factor.

• 

If, after freezing non-algebraic subexpressions, the input contains floating point numbers, only normal will be applied to it.

• 

If the set of radicals and RootOfs in the input cannot be embedded into a field algebraically, a normal form with the properties above may not exist, or Normal may be unable to compute one. It will try to find a field representation if there are at most 4 algebraic objects in the input (unless option 'makeindependent' is given; see below), and otherwise attempt to compute the normal form anyway. If it does not succeed, it will first fall back to calling Algebraic[Reduce], and if this fails as well, to normal (unless the option 'symbolic'=true is given; see below). In this case, the result returned may not satisfy all properties of a normal form above.

• 

Otherwise, if the set of radicals and RootOfs in the input do define a field, then Normal returns 0 if and only if the input is mathematically equivalent to zero.

Examples

with(Algebraic):

Introductory examples:

Normal((x^5+y^5)/(x^3+y^3));

x4yx3+y2x2y3x+y4x2yx+y2

(1)

Normal((2*x^2*y+x^2-6*y-3)/(x^2-I*x*y-3^(1/2)*x+I*3^(1/2)*y));

2yx+x+23y+3Iy+x

(2)

f := Normal((x+1)*(x+2)*(x/RootOf(_Z^2-2,index=1)+1)/(x^2-2));

fRootOf_Z22&comma;index=1x+1x+22xRootOf_Z22&comma;index=1

(3)

GreatestCommonDivisor(numer(f),denom(f));

1

(4)

p := 1/(x-RootOf(_Z^2-2)) + 1/(x+RootOf(_Z^2-2));

p1xRootOf_Z22+1x+RootOf_Z22

(5)

normal(p);

2xx+RootOf_Z22x+RootOf_Z22

(6)

normal(p,'expanded');

2xx2+RootOf_Z222

(7)

Normal(p,'expanded'=true);

2xx22

(8)

Powers of radicals and RootOfs are reduced and, in particular, constant denominators are inverted. Nested and mixed radicals / RootOfs are handled as well:

p := [RootOf(x^2-x-1)^5+2*RootOf(x^2-x-1)^3,RootOf(x^2-x-1)^(-1)];

pRootOf_Z2_Z15+2RootOf_Z2_Z13&comma;1RootOf_Z2_Z1

(9)

Normal(p);

9RootOf_Z2_Z1+5&comma;RootOf_Z2_Z11

(10)

Normal((1+sqrt(2))^(5/4));

1+214+1+2142

(11)

Normal(RootOf(x^2-x+RootOf(x^2-2))^2);

RootOf_Z2_Z+RootOf_Z22RootOf_Z22

(12)

Normal(1/RootOf(x^2-sqrt(3)));

3RootOf_Z233

(13)

Algebraic functions in the coefficients are not accepted:

Normal((x^2-y)/(x^2+2*sqrt(y)*x+y));

Error, (in Algebraic:-Normal) ratpoly(s) with radalgnum coefficients expected

Non-algebraic subexpressions are first handled recursively (unless option 'recursive'=false is present) and then temporarily replaced by new variables:

Normal(foo(1/RootOf(_Z^2+1))*(x^2-3)/(x+sqrt(3)));

fooRootOf_Z2+1x3

(14)

Normal(foo(1/RootOf(_Z^2+1))*(x^2-3)/(x+sqrt(3)), 'recursive'=false);

foo1RootOf_Z2+1x3

(15)

Non-algebraic subexpressions may evaluate to something algebraic after recursive treatment:

Normal((x+cos(I+RootOf(_Z^2+1,index=2)))/(x^2-1));

1x1

(16)

Partial factorizations in the inputs are preserved, unless option 'expanded'=true is given:

a := (x^2-1)*(x^2-2);

ax21x22

(17)

b := (x^2+2*x+1)*(x-sqrt(2))^2;

bx2+2x+1x22

(18)

Normal(a/b);

x1x+2x+1x2

(19)

Normal(expand(a)/expand(b));

x2+x2x2x2x2+x2

(20)

Normal(a/b, 'expanded'=true);

x2+x2x2x2x2+x2

(21)

By default, leading coefficients are rationalized and made positive. Note that this may factor out a leading term, even if the input is expanded:

Normal(sqrt(2)*x+2);

2x+2

(22)

Since Maple always expands the product of a number and a single factor, the leading coefficient may not be positive and the integer content may be nontrivial in such a case:

restart:

with(Algebraic):

Normal((x^2-2)*(-6*x+9)/(x-sqrt(2)));

3x+22x3

(23)

Normal((x^2-2)*(-6*x+9)/(x-sqrt(2))/(2*x-3));

3x32

(24)

If option 'rationalize'=false is given, then leading coefficients and denominators will not be rationalized in the output:

Normal(x*(sqrt(2)*y+sqrt(3)*z)/(1+sqrt(2)));

22x32z+2y2

(25)

Normal(x*(sqrt(2)*y+sqrt(3)*z)/(1+sqrt(2)),'rationalize'=false);

x2y+3z1+2

(26)

If the input has floating point coefficients, only normal is applied to it:

Normal(2.5*(x^2-2)*(x+1)/(x-sqrt(2))/(x^2-1));

2.5x22x1x+2

(27)

There is no way for Normal to know whether RootOf_Z22 without an index represents 2 or 2, and it reverts to calling Algebraic[Reduce] or normal. In the following example, option 'symbolic'=true picks 2:

Normal((x^3-2*x)/(x-RootOf(_Z^2-2,index=1))/(x^2+sqrt(2)*x));

1

(28)

Normal((x^3-2*x)/(x-RootOf(_Z^2-2))/(x^2+sqrt(2)*x));

x22x+RootOf_Z22x+2

(29)

Normal((x^3-2*x)/(x-RootOf(_Z^2-2))/(x^2+sqrt(2)*x), 'symbolic'=true);

x2x+2

(30)

In the following example, there is a zero divisor in the denominator, and the result does not satisfy all properties of a normal form:

Normal((x^2+2*sqrt(3)*x+3)/(x+sqrt(3))/RootOf(_Z^2-_Z)^2);

x2+23x+3RootOf_Z2_Zx+3

(31)

Normal((x^2+2*sqrt(3)*x+3)/(x+sqrt(3))/RootOf(_Z^2-_Z)^2, 'symbolic'=true);

x+3

(32)

If there is a RootOf whose leading coefficient is not invertible, then it is not even possible to reduce a positive power of it:

Normal(RootOf(RootOf(_Z^2-_Z)*_Z^2-1)^2);

RootOfRootOf_Z2_Z_Z212

(33)

Normal(RootOf(RootOf(_Z^2-_Z)*_Z^2-1)^2, 'symbolic'=true);

1

(34)

An example where the normal form can be computed even though there is a non-indexed reducible RootOf:

Normal((x^2-1)/(x^2+2*RootOf(_Z^2-1)*x+1));

xRootOf_Z21x+RootOf_Z21

(35)

Normal((x^2-1)/(x^2+2*RootOf(_Z^2-1,index=2)*x+1));

x+1x1

(36)

Using option 'characteristic', normal forms over finite fields can be computed:

Normal((x^2+1)/(x^2+x), 'characteristic'=2);

x+1x

(37)

Normal((x^2-6)/(x^2+2*I*x-1));

x26x2+2Ix1

(38)

Normal((x^2-6)/(x^2+2*I*x-1), 'characteristic'=7);

x+6Ix+I

(39)

In contrast to characteristic 0, the complex number I, radicals, and indexed RootOfs are not uniquely defined in positive characteristic, and they are treated as if they were non-indexed RootOfs:

Normal((x-2)/(x-I), 'characteristic'=5);

x+3x+4I

(40)

Normal((x-2)/(x-I), 'characteristic'=5, 'symbolic'=true);

x+3x+2

(41)

The polynomial defining a RootOf will also be reduced modulo the characteristic:

Normal(RootOf(_Z^2-3), 'characteristic'=7);

RootOf_Z2+4

(42)

The normal form cannot always be computed in composite characteristic:

Normal((x^2+1)/(x^2+9*x+8), 'characteristic'=65);

x+57x+1

(43)

Normal((x^2+1)/(x^2-4), 'characteristic'=65);

Error, (in Algebraic:-Normal) zero divisor modulo 65 detected

With option 'makeindependent'=true, the input will be checked for algebraic dependencies even if there are more than 4 algebraic objects in the input:

CubeRootOf[-4]:=RootOf(_Z^3+4,index=1);

CubeRootOf−4RootOf_Z3+4&comma;index=1

(44)

CubeRootOf[-2]:=RootOf(_Z^3+2,index=1);

CubeRootOf−2RootOf_Z3+2&comma;index=1

(45)

CubeRootOf[2]:=RootOf(_Z^3-2,index=1);

CubeRootOf2RootOf_Z32&comma;index=1

(46)

CubeRootOf[3]:=RootOf(_Z^3-3,index=1);

CubeRootOf3RootOf_Z33&comma;index=1

(47)

CubeRootOf[4]:=RootOf(_Z^3-4,index=1);

CubeRootOf4RootOf_Z34&comma;index=1

(48)

CubeRootOf[6]:=RootOf(_Z^3-6,index=1);

CubeRootOf6RootOf_Z36&comma;index=1

(49)

Normal(CubeRootOf[4]*CubeRootOf[-2]*CubeRootOf[3]-CubeRootOf[-4]*CubeRootOf[6]);

RootOf_Z3+2&comma;index=1RootOf_Z33&comma;index=1RootOf_Z34&comma;index=1RootOf_Z3+4&comma;index=1RootOf_Z36&comma;index=1

(50)

Normal(CubeRootOf[4]*CubeRootOf[-2]*CubeRootOf[3]-CubeRootOf[-4]*CubeRootOf[6],'makeindependent'=true);

0

(51)

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

Normal(CubeRootOf[2]*CubeRootOf[3]-CubeRootOf[6],'makeindependent'=false);

RootOf_Z32&comma;index=1RootOf_Z33&comma;index=1RootOf_Z36&comma;index=1

(52)

See Also

Algebraic

Algebraic[GreatestCommonDivisor]

Algebraic[Reduce]

evala,Normal

radnormal