Algebraic
PseudoDivision
pseudo-division of polynomials with algebraic number coefficients
Calling Sequence
Parameters
Options
Description
Examples
PseudoDivision(a, b, x, options)
PseudoDivision(a, b, x, `m`, `q`, options)
a,b
-
multivariate polynomials in x with algebraic number coefficients
x
name
m,q
(optional) unevaluated names
options
(optional) equation(s) of the form keyword = value, where keyword is either 'symbolic', 'makeindependent', or 'characteristic'
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 non-negative integer, the pseudo-division is performed over an extension of the ring ℤp of integers modulo p. The default is 'characteristic'=0 and means that the pseudo-division is performed over an extension of the rational numbers.
If the option 'makeindependent'=true is given, then PseudoDivision 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.
The PseudoDivision command performs pseudo-division on multivariate polynomials a and b with respect to the variable x. It returns the pseudo-remainder r such that the relationship m⁢a=b⁢q+r is satisfied, where m is the multiplier and q is the pseudo-quotient. r and q are polynomials in x, with degree(r,x) < degree(b,x). The multiplier m is defined as lcoeff(b, x) ^ (degree(a, x)-degree(b, x)+1) and is free of x.
If the optional arguments `m` and `q` are included, they will be assigned the values of the multiplier and pseudo-quotient respectively.
The inputs a and b 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.
The property m⁢a=b⁢q+r will hold in the domain K[x], where K is an algebraic field generated over the rationals and any algebraic number coefficients occurring in a and b (unless the option 'characteristic' is given; see below).
Non-algebraic sub-expressions such as sin⁡x that are neither variables, rational numbers, or algebraic objects are frozen and temporarily replaced by new local variables, which are not considered to be constant in what follows.
The arguments a and b must be polynomials in the variable x, but may contain other names, which are considered as elements of the coefficient field.
The x parameter can also be a function such as sin⁡x, in which case it will be frozen and treated as a variable. 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 a function for x, as treating some functions as variables may produce mathematically unsound results.
The inputs a and b can be polynomials disguised as rational functions, in which case they are normalized first using Algebraic[Normal].
The output will be normalized as follows:
All non-constant factors are monic with respect to x.
There are at most two constant factors, and at most one of them is not a rational number.
All algebraic numbers occurring in the result are reduced modulo their minimal polynomial (see Reduce), and all arguments of functions, if any, are normalized recursively (see Normal).
If the set of radicals and RootOfs in the input cannot be embedded into a field algebraically, then PseudoDivision may not be able to perform the division. PseudoDivision 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 proceed anyway. If unsuccessful, a "reducible RootOf detected" error will be returned. (unless the option 'symbolic'=true is given; see below).
This function does not support input containing floats or radical functions such as x.
with⁡Algebraic:
Introductory examples:
PseudoDivision⁡x2+2,2⁢x+sqrt⁡2,x,m1,q1
10
m1,q1
4,2⁢x−2
expand⁡4⁢x2+2−2⁢x+sqrt⁡2⁢2⁢x−sqrt⁡2
PseudoDivision⁡x3+y3+5,I⁢x+I⁢y,x,m2,q2,m2,q2
−5⁢I,−I,−x2+y⁢x−y2
r1≔RootOf⁡_Z2−_Z−1
PseudoDivision⁡x2+1,r1⁢x,x,m3,q3,m3,q3
RootOf⁡_Z2−_Z−1+1,RootOf⁡_Z2−_Z−1+1,RootOf⁡_Z2−_Z−1⁢x
The input may contain both radicals and RootOfs, and PseudoDivision will embed the coefficients into an algebraic field, if possible:
PseudoDivision⁡x⁢y⁢z,sqrt⁡2⁢x−RootOf⁡_Z2−8,index=1,x,m4,q4,m4,q4
2⁢2⁢z⁢y,2,z⁢y
PseudoDivision⁡sqrt⁡2⁢x,sqrt⁡3⁢x−sqrt⁡6,x,m5,q5,m5,q5
2⁢3,3,2
Nested and mixed radicals and RootOfs are handled as well:
PseudoDivision⁡x2−4−23+1,2⁢x+RootOf⁡_Z3−2,index=1,x,m6,q6,m6,q6
4,4,2⁢x−213
PseudoDivision⁡sqrt⁡RootOf⁡_Z2−3,index=1⁢x,RootOf⁡_Z2−RootOf⁡_Z2−3,index=1,index=1,x,m7,q7,m7,q7
0,3,3⁢x
Multivariate input is accepted, but pseudo-division will only be performed on the input with respect to the single variable given in the x parameter, with all other names being considered as elements of the coefficient field:
PseudoDivision⁡x2⁢y2+7,x⁢y,x,m8,q8,m8,q8
7⁢y2,y2,y3⁢x
PseudoDivision⁡x2⁢y2+7,x⁢y,y,m9,q9,m9,q9
7⁢x2,x2,x3⁢y
PseudoDivision⁡x2⁢y2+7,x⁢y,z,m10,q10,m10,q10
0,x⁢y,x2⁢y2+7
If the degree of a is less than the degree of b, then the multiplier will be 1 and the pseudo-quotient will be 0:
PseudoDivision⁡x2,x3,x,m11,q11,m11,q11
x2,1,0
If b is a non-zero constant, the pseudo-remainder will always be zero:
PseudoDivision⁡x10,sqrt⁡2,x,m11,q11,m11,q11
0,32⁢2,32⁢x10
The output will always be fully reduced and normalized:
PseudoDivision⁡x2,RootOf⁡_Z2−_Z−1,x,m12,q12,m12,q12
0,2⁢RootOf⁡_Z2−_Z−1+1,x2⁢RootOf⁡_Z2−_Z−1+x2
PseudoDivision⁡xRootOf⁡_Z2+6⁢_Z−1+7,2⁢x,x,m13,q13,m13,q13
14,2,RootOf⁡_Z2+6⁢_Z−1+6
Algebraic Objects will be converted to algebraic numbers, if possible:
PseudoDivision⁡x+sin⁡π4,sqrt⁡2⁢x+exp⁡I⁢π,x,m14,q14,m14,q14
2,2,1
Non-algebraic sub-expressions such as sin⁡x will be frozen and temporarily replaced by new local variables:
PseudoDivision⁡z2+1,z⁢sin⁡x,z,m15,q15,m15,q15
sin⁡x2,sin⁡x2,z⁢sin⁡x
The x parameter can also be a function, as long as it is not an Algebraic Object:
PseudoDivision⁡sin⁡x+4,2⁢sin⁡x,sin⁡x,m16,q16,m16,q16
8,2,1
a≔π4
PseudoDivision⁡sin⁡a+4,2⁢sin⁡a,sin⁡a
Error, invalid input: Algebraic:-PseudoDivision expects its 3rd argument, x, to be of type Or(name,And(function,Not(AlgebraicObject))), but received 1/2*2^(1/2)
Arguments of functions in the input will be recursively normalized:
PseudoDivision⁡tan⁡x2−1x+1+exp⁡RootOf⁡_Z2−_Z−13,tan⁡x−sin⁡π2,tan⁡x−1,m17,q17,m17,q17
ⅇ2⁢RootOf⁡_Z2−_Z−1+1,1,1
Non-algebraic sub-expressions may become algebraic after recursive normalization occurs:
PseudoDivision⁡sin⁡x2−1x−1⁢x+1⁢π4⁢x,x+1,x,m18,q18,m18,q18
−22,1,22
Rational functions are not accepted:
PseudoDivision⁡1x,1x2,x
Error, (in Algebraic:-PseudoDivision) polynom(s) with radalgnum coefficients expected
Floats are not accepted.
Algebraic functions such as x are not accepted:
PseudoDivision⁡x2+2⁢x⁢sqrt⁡x+x,x+sqrt⁡x,x
When non-indexed RootOfs are given in the input, the pseudo-division can still be performed and the output expressed in terms of the non-indexed RootOfs:
PseudoDivision⁡x2−1+RootOf⁡_Z2−3,2⁢x−RootOf⁡_Z2−4,x,m19,q19,m19,q19
4⁢RootOf⁡_Z2−3,4,2⁢x+RootOf⁡_Z2−4
PseudoDivision⁡x+sqrt⁡2,2⁢x+RootOf⁡_Z2−8,x,m20,q20,m20,q20
−RootOf⁡_Z2−8+2⁢2,2,1
Even if the leading coefficients of the input contain zero divisors, PseudoDivision can still compute the pseudo-remainder, multiplier, and pseudo-quotient in terms of the input such that the identity m⁢a=b⁢q+r is preserved:
PseudoDivision⁡sqrt⁡2⁢x,RootOf⁡_Z2−2,index=1⁢x+sqrt⁡2⁢x+1,x,m21,q21,m21,q21
−2,2⁢2,2
PseudoDivision⁡sqrt⁡2⁢x,RootOf⁡_Z2−2,index=2⁢x+sqrt⁡2⁢x+1,x,m22,q22,m22,q22
0,1,2⁢x
PseudoDivision⁡sqrt⁡2⁢x,RootOf⁡_Z2−2⁢x+sqrt⁡2⁢x+1,x,m23,q23,m23,q23
−2,RootOf⁡_Z2−2+2,2
Also, if the second argument is a zero divisor, then the computation will be performed anyway and an answer will be returned such that the identity m⁢a=b⁢q+r is preserved:
PseudoDivision⁡x,sqrt⁡2−RootOf⁡_Z2−2,x,m24,q24,m24,q24
0,−2⁢2⁢RootOf⁡_Z2−2+4,2⁢x−RootOf⁡_Z2−2⁢x
Using option characteristic, pseudo-division can be performed over finite fields:
PseudoDivision⁡x2+2⁢x+2,2⁢x+1,x,m25,q25,characteristic=0,m25,q25
5,4,2⁢x+3
PseudoDivision⁡x2+2⁢x+2,2⁢x+1,x,m26,q26,characteristic=3,m26,q26
2,1,2⁢x
PseudoDivision⁡x2,I⁢x−sqrt⁡2,x,m27,q27,characteristic=7,m27,q27
2,6,I⁢x+2
If a RootOf with a non-invertible leading coefficient is detected, an error may be returned:
PseudoDivision⁡x,RootOf⁡RootOf⁡_Z2−_Z⁢_Z+1⁢x+1,x
Error, (in Algebraic:-PseudoDivision) reducible RootOf detected. Substitutions are {RootOf(_Z^2-_Z) = 0, RootOf(_Z^2-_Z) = 1}
In the second case, using option 'symbolic'=true will force PseudoDivision to select one of the factors and perform the computation. Here, it makes the substitution RootOf⁡RootOf⁡_Z2−_Z⁢_Z+1=−1:
PseudoDivision⁡x,RootOf⁡RootOf⁡_Z2−_Z⁢_Z+1⁢x+1,x,m29,q29,symbolic=true,m29,q29
−1,−1,1
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
PseudoDivision⁡x+CubeRootOf4⁢CubeRootOf−2⁢CubeRootOf3,x+CubeRootOf−4⁢CubeRootOf6,x,m30,q30,m30,q30
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,1,1
PseudoDivision⁡x+CubeRootOf4⁢CubeRootOf−2⁢CubeRootOf3,x+CubeRootOf−4⁢CubeRootOf6,x,m31,q31,makeindependent=true,m31,q31
0,1,1
With option 'makeindependent'=false, the input will never be checked for algebraic dependencies:
PseudoDivision⁡x+CubeRootOf2⁢CubeRootOf3,x+CubeRootOf6,x,m32,q32,m32,q32
PseudoDivision⁡x+CubeRootOf2⁢CubeRootOf3,x+CubeRootOf6,x,m33,q33,makeindependent=false,m33,q33
RootOf⁡_Z3−2,index=1⁢RootOf⁡_Z3−3,index=1−RootOf⁡_Z3−6,index=1,1,1
See Also
Algebraic[Divide]
Algebraic[Quotient]
Algebraic[Remainder]
Prem
prem
Download Help Document