expand expressions containing algebraic numbers
any Maple object; typically an expression containing algebraic numbers
(optional) equation(s) of the form keyword = value, where keyword is one of 'symbolic', 'characteristic', 'makeindependent', or 'recursive'.
If the option 'symbolic'=true is given and a RootOf whose minimal polynomial factors nontrivially is detected, Expand will reduce it to a RootOf of lower degree by picking one of the factors arbitrarily. The default is 'symbolic'=false.
If the option 'characteristic'=p is given, where p is a nonnegative integer, the expansion is performed over an extension of the ring ℤp of integers modulo p. The default is 'characteristic'=0 and means that the expansion is performed over an extension of the rational numbers.
Note that if p is positive but not a prime, then ℤp is not a field, and Expand may not be able to expand the input. 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 Expand 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 Expand will not map itself recursively over non-algebraic subexpressions. The default is 'recursive'=true.
This command expands products and powers of (multivariate) rational functions with algebraic number coefficients. Powers of algebraic numbers are also reduced.
The input p 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.
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.
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 .
Partial factorizations in denominators of the input are preserved, but the factors themselves will be recursively expanded.
Expand can be used to normalize polynomials over algebraic number fields. However, if p is not a polynomial, then Expand cannot be used to determine if p is mathematically equivalent to zero. In this case, use Normal.
If, after freezing non-algebraic subexpressions, the input contains floating point numbers, only expand will be applied to it.
Expand will check algebraic objects for dependencies if there are at most 4 of them in the input (unless option 'makeindependent' is given; see below). If there are more than 4 algebraic objects in the input, then expansion will be performed anyway, but not all of the properties of the expanded form given above may be satisfied.
Powers of radicals and RootOfs are reduced. Nested and mixed radicals and RootOfs are handled as well:
p ≔ RootOf⁡x2−x−15+2⁢RootOf⁡x2−x−13,35
Algebraic functions in the coefficients are not accepted:
Error, (in Algebraic:-Expand) 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:
Non-algebraic subexpressions may evaluate to something algebraic after recursive treatment:
Products and powers of polynomials in denominators will not be expanded, but other expressions in denominators will be expanded recursively:
If the input has floating point coefficients, only expand is applied to it:
If there is a RootOf in the input whose leading coefficient is not invertible, the output may not satisfy all of the properties listed above. By using option 'symbolic'=true, Expand can be forced to eliminate the zero divisor by making a substitution:
Using option 'characteristic', expansion can be performed over finite fields:
The polynomial defining a RootOf will also be reduced modulo the characteristic:
The expansion cannot always be performed in composite characteristic:
Error, (in Algebraic:-Expand) zero divisor modulo 10 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
With option 'makeindependent'=false, the input will never be checked for algebraic dependencies:
Download Help Document