factors - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Mathematics : Algebra : Expression Manipulation : Factoring : factors

factors

factor a multivariate polynomial

 

Calling Sequence

Parameters

Description

Examples

References

Compatibility

Calling Sequence

factors(a)

factors(a, K)

factors(f, method="Wang")

Parameters

a

-

multivariate polynomial

K

-

field extension over which to factor

f

-

multivariate polynomial with rational coefficients

method

-

(optional) equation method="Wang"

Description

• 

The factors command computes the factorization of a multivariate polynomial over the rationals, an algebraic number field, and with real or complex numeric coefficients.

• 

Unlike the factor function where the input is any expression and the output is a product of sums in the general case, the input to the factors function must be a polynomial or a rational function, and the output is a data structure more suitable for programming purposes.

• 

The factorization is returned in the form u,f1,m1,...,fn,mn where a=uf1m1...fnmn where each fk (the factor) is a unit normal irreducible polynomial and each mk (its multiplicity) is a positive integer.

• 

For multivariate polynomials with integer coefficients, the factors command offers two algorithms: Wang's algorithm (see [Wang78]) and the algorithm by Monagan and Tuncer ([MT16]). The default is the latter, since it is faster on most examples. To explicitly request Wang's algorithm, which was the default in Maple 2018 and earlier versions, use the option method="Wang".

• 

The call factors(a) factors over the field implied by the coefficients present: thus, if all the coefficients are rational, then the polynomial is factored over the rationals.

• 

If the second argument K is the keyword real or complex, a floating-point factorization is performed over R and C respectively.  Note, at present this is only implemented for univariate polynomials.

• 

The call factors(a, K) factors the polynomial a over the algebraic number field defined by K. K must be a single RootOf, a list or set of RootOfs, a single radical, or a list or set of radicals.

Examples

factors3x2+6x+3

3,x+1,2

(1)

factorsx44

1,x22,1,x2+2,1

(2)

factorsx44.0

1,x2+1.999999999,1,x+1.41421356237310,1,x1.41421356237310,1

(3)

factorsx44,2

1,x2,1,x+2,1,x2+2,1

(4)

factorsx44,2,I

1,x+I2,1,I2+x,1,x2,1,x+2,1

(5)

aliasα=RootOfx22:

aliasβ=RootOfx2+2:

factorsx44,α

1,x+α,1,x2+2,1,xα,1

(6)

factorsx44,β

1,x+β,1,x22,1,xβ,1

(7)

factorsx44,α,β

1,x+β,1,x+α,1,xβ,1,xα,1

(8)

factorsx44,real

1,x1.41421356237310,1,x+1.41421356237310,1,x2+1.999999999,1

(9)

factorsx44,complex

1,x+1.414213562I,1,x1.41421356237310,1,x1.414213562I,1,x+1.41421356237310,1

(10)

The following is an example that has a rational function as input.

qexpandz1z3expandz2z4

qz24z+3z26z+8

(11)

factorsq

1,z2,−1,z4,−1,z1,1,z3,1

(12)

References

  

[MT16] Michael Monagan and Baris Tuncer. Using Sparse Interpolation in Hensel Lifting. Proceedings of CASC 2016, Springer-Verlag LNCS 9890, 381-400 (2016).

  

[Wang78] Wang, P.S. An improved Multivariate Polynomial Factoring Algorithm, Mathematics of Computation 32, (1978).

Compatibility

• 

The factors command was updated in Maple 2019.

See Also

AFactors

factor

Factors

ifactors

PolynomialTools[Split]

roots

sqrfree