Algebraic
Normal
normal form for rational expressions with algebraic number coefficients
Calling Sequence
Parameters
Options
Description
Examples
Normal(p, options)
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'.
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.
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 sin⁡x 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 RootOf⁡f,...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.
with⁡Algebraic:
Introductory examples:
Normal⁡x5+y5x3+y3
x4−y⁢x3+y2⁢x2−y3⁢x+y4x2−y⁢x+y2
Normal⁡2⁢x2⁢y+x2−6⁢y−3x2−I⁢x⁢y−312⁢x+I⁢312⁢y
2⁢y⁢x+x+2⁢3⁢y+3−I⁢y+x
f≔Normal⁡x+1⁢x+2⁢xRootOf⁡_Z2−2,index=1+1x2−2
f≔RootOf⁡_Z2−2,index=1⁢x+1⁢x+22⁢x−RootOf⁡_Z2−2,index=1
GreatestCommonDivisor⁡numer⁡f,denom⁡f
1
p≔1x−RootOf⁡_Z2−2+1x+RootOf⁡_Z2−2
normal⁡p
−2⁢x−x+RootOf⁡_Z2−2⁢x+RootOf⁡_Z2−2
normal⁡p,expanded
−2⁢x−x2+RootOf⁡_Z2−22
Normal⁡p,expanded=true
2⁢xx2−2
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⁡x2−x−15+2⁢RootOf⁡x2−x−13,RootOf⁡x2−x−1−1
p≔RootOf⁡_Z2−_Z−15+2⁢RootOf⁡_Z2−_Z−13,1RootOf⁡_Z2−_Z−1
Normal⁡p
9⁢RootOf⁡_Z2−_Z−1+5,RootOf⁡_Z2−_Z−1−1
Normal⁡1+sqrt⁡254
1+214+1+214⁢2
Normal⁡RootOf⁡x2−x+RootOf⁡x2−22
RootOf⁡_Z2−_Z+RootOf⁡_Z2−2−RootOf⁡_Z2−2
Normal⁡1RootOf⁡x2−sqrt⁡3
3⁢RootOf⁡_Z2−33
Algebraic functions in the coefficients are not accepted:
Normal⁡x2−yx2+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⁡1RootOf⁡_Z2+1⁢x2−3x+sqrt⁡3
foo⁡−RootOf⁡_Z2+1⁢x−3
Normal⁡foo⁡1RootOf⁡_Z2+1⁢x2−3x+sqrt⁡3,recursive=false
foo⁡1RootOf⁡_Z2+1⁢x−3
Non-algebraic subexpressions may evaluate to something algebraic after recursive treatment:
Normal⁡x+cos⁡I+RootOf⁡_Z2+1,index=2x2−1
1x−1
Partial factorizations in the inputs are preserved, unless option 'expanded'=true is given:
a≔x2−1⁢x2−2
b≔x2+2⁢x+1⁢x−sqrt⁡22
b≔x2+2⁢x+1⁢x−22
Normal⁡ab
x−1⁢x+2x+1⁢x−2
Normal⁡expand⁡aexpand⁡b
x2+x⁢2−x−2x2−x⁢2+x−2
Normal⁡ab,expanded=true
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
2⁢x+2
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:
Normal⁡x2−2⁢−6⁢x+9x−sqrt⁡2
−3⁢x+2⁢2⁢x−3
Normal⁡x2−2⁢−6⁢x+9x−sqrt⁡2⁢2⁢x−3
−3⁢x−3⁢2
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⁢z1+sqrt⁡2
−2−2⁢x⁢3⁢2⁢z+2⁢y2
Normal⁡x⁢sqrt⁡2⁢y+sqrt⁡3⁢z1+sqrt⁡2,rationalize=false
x⁢2⁢y+3⁢z1+2
If the input has floating point coefficients, only normal is applied to it:
Normal⁡2.5⁢x2−2⁢x+1x−sqrt⁡2⁢x2−1
−2.5⁢x2−2x−1⁢−x+2
There is no way for Normal to know whether RootOf⁡_Z2−2 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⁡x3−2⁢xx−RootOf⁡_Z2−2,index=1⁢x2+sqrt⁡2⁢x
Normal⁡x3−2⁢xx−RootOf⁡_Z2−2⁢x2+sqrt⁡2⁢x
−x2−2−x+RootOf⁡_Z2−2⁢x+2
Normal⁡x3−2⁢xx−RootOf⁡_Z2−2⁢x2+sqrt⁡2⁢x,symbolic=true
x−2x+2
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⁡x2+2⁢sqrt⁡3⁢x+3x+sqrt⁡3⁢RootOf⁡_Z2−_Z2
x2+2⁢3⁢x+3RootOf⁡_Z2−_Z⁢x+3
Normal⁡x2+2⁢sqrt⁡3⁢x+3x+sqrt⁡3⁢RootOf⁡_Z2−_Z2,symbolic=true
x+3
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⁡_Z2−_Z⁢_Z2−12
RootOf⁡RootOf⁡_Z2−_Z⁢_Z2−12
Normal⁡RootOf⁡RootOf⁡_Z2−_Z⁢_Z2−12,symbolic=true
An example where the normal form can be computed even though there is a non-indexed reducible RootOf:
Normal⁡x2−1x2+2⁢RootOf⁡_Z2−1⁢x+1
x−RootOf⁡_Z2−1x+RootOf⁡_Z2−1
Normal⁡x2−1x2+2⁢RootOf⁡_Z2−1,index=2⁢x+1
x+1x−1
Using option 'characteristic', normal forms over finite fields can be computed:
Normal⁡x2+1x2+x,characteristic=2
x+1x
Normal⁡x2−6x2+2⁢I⁢x−1
x2−6x2+2⁢I⁢x−1
Normal⁡x2−6x2+2⁢I⁢x−1,characteristic=7
x+6⁢Ix+I
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−2x−I,characteristic=5
x+3x+4⁢I
Normal⁡x−2x−I,characteristic=5,symbolic=true
x+3x+2
The polynomial defining a RootOf will also be reduced modulo the characteristic:
Normal⁡RootOf⁡_Z2−3,characteristic=7
RootOf⁡_Z2+4
The normal form cannot always be computed in composite characteristic:
Normal⁡x2+1x2+9⁢x+8,characteristic=65
x+57x+1
Normal⁡x2+1x2−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⁡_Z3+4,index=1
CubeRootOf−2≔RootOf⁡_Z3+2,index=1
CubeRootOf2≔RootOf⁡_Z3−2,index=1
CubeRootOf3≔RootOf⁡_Z3−3,index=1
CubeRootOf4≔RootOf⁡_Z3−4,index=1
CubeRootOf6≔RootOf⁡_Z3−6,index=1
Normal⁡CubeRootOf4⁢CubeRootOf−2⁢CubeRootOf3−CubeRootOf−4⁢CubeRootOf6
RootOf⁡_Z3+2,index=1⁢RootOf⁡_Z3−3,index=1⁢RootOf⁡_Z3−4,index=1−RootOf⁡_Z3+4,index=1⁢RootOf⁡_Z3−6,index=1
Normal⁡CubeRootOf4⁢CubeRootOf−2⁢CubeRootOf3−CubeRootOf−4⁢CubeRootOf6,makeindependent=true
0
With option 'makeindependent'=false, the input will never be checked for algebraic dependencies:
Normal⁡CubeRootOf2⁢CubeRootOf3−CubeRootOf6,makeindependent=false
RootOf⁡_Z3−2,index=1⁢RootOf⁡_Z3−3,index=1−RootOf⁡_Z3−6,index=1
See Also
Algebraic[GreatestCommonDivisor]
Algebraic[Reduce]
evala,Normal
radnormal
Download Help Document