PolynomialTools[Approximate]
GCD
compute approximate multivariate GCD
Calling Sequence
Parameters
Options
Description
Examples
References
Compatibility
GCD(F, G, vars)
GCD(F, G, vars, options)
F
-
polynom({numeric,complex(numeric)})
G
vars
a set or list of variables
cofactors
if provided, the command returns d,u,v where d is the gcd, and u and v are the cofactors such that fu=d and gv=d.
noexact
if provided, exact gcd computation will not be attempted
optimize
if given then a post-processing step is done on the output, using Optimization[NLPSolve] to return an approximate gcd with smaller backward error. Optionally, it can be given as optimize=list with a list of extra options to be passed to optimization.
After some basic preprocessing to handle exact cases, the numerical gcd of F and G is computed by projecting to the univariate case to determine the degree of the approximate GCD, then the GCD cofactors are computed from the low rank approximation of the generalized SylvesterMatrix. Finally, the GCD is computed with a least-squares polynomial division.
This command will work on univariate polynomials, but there are several other options for the univariate case in the SNAP package.
with⁡PolynomialTools:-Approximate:
infolevelPolynomialTools≔1
d≔sqrt⁡2.0⁢x2+y2−1
d≔1.414213562⁢x2+1.414213562⁢y2−1.414213562
F≔sort⁡expand⁡d⁢x3−y3+1,x,y
F≔1.414213562⁢x5+1.414213562⁢x3⁢y2−1.414213562⁢x2⁢y3−1.414213562⁢y5−1.414213562⁢x3+1.414213562⁢y3+1.414213562⁢x2+1.414213562⁢y2−1.414213562
G≔sort⁡expand⁡d⁢x2−y3+1,x,y
G≔−1.414213562⁢x2⁢y3−1.414213562⁢y5+1.414213562⁢x4+1.414213562⁢x2⁢y2+1.414213562⁢y3+1.414213562⁢y2−1.414213562
ad_8≔GCD⁡expand⁡F+10−8⁢x⁢y,expand⁡G+10−8⁢x2⁢y,x,y
GCD: approximate GCD inputs of total degrees 5 and 5 in [x, y] GCD: approximate GCD determined with an error of 7.484964e-10
ad_8≔0.569494797046587+3.40008238745826×10−10⁢x−1.02787949443617×10−9⁢y−0.569494797402477⁢x2−1.49456632732006×10−10⁢x⁢y−0.569494797883116⁢y2
ad_8≔sort⁡tcoeff⁡d⁢fnormal⁡expand⁡ad_8tcoeff⁡ad_8,x,y
ad_8≔1.414213563⁢x2+1.414213563⁢y2−1.414213562
ilog10⁡norm⁡expand⁡d−ad_8,2norm⁡d,2
−10
ad_4≔GCD⁡expand⁡F+10−5⁢randpoly⁡x,y,degree=2,expand⁡G+10−5⁢randpoly⁡x,y,degree=2,x,y
GCD: approximate GCD inputs of total degrees 5 and 5 in [x, y] GCD: approximate GCD determined with an error of 1.258109e-04
ad_4≔0.569558529000008−0.0000570803626106371⁢x−0.0000202745885674440⁢y−0.569452652923380⁢x2−0.0000375128607616705⁢x⁢y−0.569477701446848⁢y2
ad_4≔sort⁡tcoeff⁡d⁢fnormal⁡expand⁡ad_4tcoeff⁡ad_4,x,y
ad_4≔1.413950672⁢x2+0.00009314441579⁢x⁢y+1.414012867⁢y2+0.0001417305137⁢x+0.00005034179397⁢y−1.414213562
ilog10⁡norm⁡expand⁡d−ad_4,2norm⁡d,2
−4
Gao, S.; Kaltofen, E.; May, J.; Yang, Z.; and Zhi, L. "Approximate factorization of multivariate polynomials via differential equations." Proceedings of the 2004 International Symposium on Symbolic and Algebraic Computation (ISSAC 2004), pp. 167-174. Ed. J. Guitierrez. ACM Press, 2004.
The PolynomialTools:-Approximate:-GCD command was introduced in Maple 2021.
For more information on Maple 2021 changes, see Updates in Maple 2021.
See Also
gcd
SNAP
SylvesterMatrix
Download Help Document