Approximate Polynomial Algebra - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : System : Information : Updates : Maple 2021 : Approximate Polynomial Algebra

Approximate Polynomial Algebra Package in Maple 2021

 

New PolynomialTools Subpackage

CoefficentVector and FromCoefficientVector

Divide and ConvolutionMatrix

GCD and SylvesterMatrix

Factor and RuppertMatrix

References

New PolynomialTools Subpackage

• 

New in Maple 2021 is the PolynomialTools:-Approximate subpackage. It includes three main commands for computing approximate operations on polynomials in many variables: Factor, GCD, and Divide, as well as commands for computing the matrices used for these operations.

• 

These new commands are useful for cases where no exact answer is possible, and a solution is instead found for a nearby problem which does have a solution. Typically, this assumes that some amount of error or noise was introduced into the coefficients of the input polynomial(s) that destroyed algebraic structure, and which these commands attempt to recover.

• 

The SNAP package has provided the gcd and division with remainder operations for univariate polynomials but those commands typically require the user to provide a numerical tolerance.  These new commands do not take a tolerance as input, but instead always return an approximate solution, even if it has very large backward error following the model in the papers of Gao et al. and Kaltofen et al in the references below.

• 

This new package supports univariate computations of quotients and gcd under that model (univariate inputs to Factor are just sent to the top-level command factor).

factor( x^4-3.0*x^2-4.0 );

x+2.x2.x2+1.

(1)

factor( x^4-3.0*x^2-4.0*I );

x+1.85321006568802+0.291797565955056Ix+0.6274044037328900.861903714978381Ix0.627404403732890+0.861903714978381Ix1.853210065688020.291797565955056I

(2)

SNAP:-QRGCD( x^4-3.0*x^2-4.0, x^2-4.0, x, 10e-10);

0,0.2425356250,0.970142500145332+0.242535625036333x2

(3)

SNAP:-Quotient( x^4-3.0*x^2-4.0, x^2-4.0, x );

1.00000000000000x2+1.00000000000000

(4)
• 

New functionality is described below.

with(PolynomialTools):

with(Approximate);

ConvolutionMatrix,Divide,Factor,GCD,RuppertMatrix,SylvesterMatrix

(5)

CoefficentVector and FromCoefficientVector

• 

The commands CoefficientVector and FromCoefficientVector in the main PolynomialTools package were both enhanced to work with multivariate polynomials.

v := CoefficientVector(y^3-y^2*x+(y-2)*x^2+x^3, [x,y]);

v000−20011−11

(6)

FromCoefficientVector( v, [a, b]);

a3+a2bab2+b32a2

(7)

Divide and ConvolutionMatrix

• 

Approximate division using a LeastSquares computation on the matrix representing polynomial division.

f := x^2+y^2-1;

fx2+y21

(8)

ConvolutionMatrix(f, [x,y], 2);

(9)

infolevel[PolynomialTools] := 1;

infolevelPolynomialTools1

(10)

d := sqrt(2.0)*(x^2+y^2-1);

d1.414213562x2+1.414213562y21.414213562

(11)

G := sort( (x^2-y^3+1), [x,y]); F := sort( expand( d*G ), [x,y]);

Gy3+x2+1

F1.414213562x2y31.414213562y5+1.414213562x4+1.414213562x2y2+1.414213562y3+1.414213562y21.414213562

(12)

ad_8 := Divide( expand( F + 10^(-8)*x*y ), expand(G+10^(-8)*x^2*y), [x,y] );

Divide:   computed approximate quotient has backward error 2.291288e-08
Divide:   computed approximate quotient has backward error 2.291288e-08

ad_81.41421356376777+1.72890601399040×10−16x+4.71404493218586×10−9y+1.41421356730330x2+3.33333340088403×10−9xy+1.41421356200000y2

(13)

ad_8 := sort( tcoeff(d)*fnormal(expand(ad_8)/(tcoeff(ad_8))), [x,y]);

ad_81.414213566x2+1.414213560y21.414213562

(14)

ilog10(norm(expand(d-ad_8),2) / norm(d,2));

−9

(15)

GCD and SylvesterMatrix

• 

Approximate GCD computation using a low-rank approximation of a generalized Sylvester matrix.

d := sqrt(2.0)*(x^2+y^2-1);

d1.414213562x2+1.414213562y21.414213562

(16)

F := sort( expand( d*(x^3-y^3+1) ), [x,y]);

F1.414213562x5+1.414213562x3y21.414213562x2y31.414213562y51.414213562x3+1.414213562y3+1.414213562x2+1.414213562y21.414213562

(17)

G := sort( expand( d*(x^2-y^3+1) ), [x,y]);

G1.414213562x2y31.414213562y5+1.414213562x4+1.414213562x2y2+1.414213562y3+1.414213562y21.414213562

(18)

S1 := SylvesterMatrix(F, G, [x,y], 3);

(19)
• 

Maximal rank, means degree( gcd(F,G) ) < 3

min(upperbound(S1)) - LinearAlgebra:-Rank(S1);

0

(20)

ad_8 := GCD( expand( F + 10^(-8)*x*y ), expand(G+10^(-8)*x^2*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_80.569494797046587+3.40008238745826×10−10x1.02787949443617×10−9y0.569494797402477x21.49456632732006×10−10xy0.569494797883116y2

(21)

ad_8 := sort( tcoeff(d)*fnormal(expand(ad_8)/(tcoeff(ad_8))), [x,y]);

ad_81.414213563x2+1.414213563y21.414213562

(22)

ilog10(norm(expand(d-ad_8),2) / norm(d,2));

−10

(23)

Factor and RuppertMatrix

• 

Approximate factorization computation using a low-rank approximation of a Ruppert matrix.

F := sort( expand( (x^2+y^2-1)*(x^3-y^3+1) ), [x,y]);

Fx5+x3y2x2y3y5x3+y3+x2+y21

(24)

R1 := RuppertMatrix( F, [x,y]);

(25)
• 

The rank deficiency of the Ruppert matrix is equal to the number of factors.

min(upperbound(R1)) - LinearAlgebra:-Rank(R1);

2

(26)

aF_8 := Factor( expand( F + 10^(-8)*x*y ), [x,y] );

Factor:   approximate factorization input of degree [5, 5] in [x, y]
Factor:   factorization square-free input of degree [5, 5] in [x, y]
Factor:   polynomial has 2 approximate factors at numerical tolerance 10e-9

aF_83.510778523328650.553434072558778+1.77801493208625×10−9x+7.90820151946415×10−10y+0.553434076452427x2+3.77682411351434×10−9xy+0.553434072372129y20.5146721539774482.34835368967946×10−9x5.64898113877529×10−9y1.17024429658888×10−9x21.49078210800354×10−9xy+2.96989995359614×10−9y20.514672156404694x35.26729024754203×10−10x2y2.25599642616380×10−9y2x+0.514672152857353y3

(27)

sort( fnormal( expand(aF_8) ), [x,y] );

1.000000007x5+1.000000004x3y20.9999999990x2y30.9999999926y50.9999999953x3+1.000000004y3+0.9999999999x2+1.000000001y20.9999999951

(28)

ilog10( norm(expand(F-aF_8),2) / norm(F,2) );

−9

(29)

References

  

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. Gutierrez. ACM Press, 2004.

  

Kaltofen, E.; May, J.; Yang, Z.; and Zhi, L. "Approximate factorization of multivariate polynomials using singular value decomposition." Journal of Symbolic Computation Vol. 43(5), (2008): 359-376.