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

Online Help

All Products    Maple    MapleSim


factor

factor a multivariate polynomial

 

Calling Sequence

Parameters

Description

Examples

References

Compatibility

Calling Sequence

factor(a)

factor(a, K)

factor(f, method="Wang")

Parameters

a

-

expression

K

-

field extension over which to factor

f

-

multivariate polynomial with rational coefficients

method

-

(optional) equation method="Wang"

Description

• 

The factor function computes the factorization of a multivariate polynomial with integer, rational, (complex) numeric, or algebraic number coefficients.

• 

The factor function does NOT factor integers. Nor does it factor integer coefficients in a polynomial. Use the ifactor function to factor integers.

• 

For multivariate polynomials with integer coefficients, the factor command offers two algorithms: Wang's algorithm (see [Wang78]) and the algorithm by Monagan and Tuncer ([MT16], [MT18]). 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".

• 

If the second argument K is not given, the polynomial is factored over the field implied by the coefficients.  For example, if the coefficients are all integers then factor computes all irreducible factors with integer coefficients.  Thus factor does not necessarily factor into linear factors. Note that any integer content (see first example below) is not factored.

• 

If the input, a, is a rational expression, then it is first normalized (see normal) and the numerator and denominator of the resulting expression are then factored. This provides a fully factored form which can be used to simplify an expression in the same way the normal function is used. However, it is more expensive to compute.

• 

If the input, a, is a list, set, equation, range, relation, or function, then factor is applied recursively to the components of a. If a is an exact series, that is, a series object with no order term, then it is first converted to a polynomial before applying factor. If a is a series but not an exact series, then factor is applied recursively to the components of a (that is, its coefficients).

• 

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

• 

If the second argument K is a single RootOf, a list or set of RootOfs, a single radical, or a list or set of radicals, then the expression is factored over the algebraic number field defined by K.

Examples

factor6x2+18x24

6x+4x1

(1)

factor6

6

(2)

ifactor6

23

(3)

factorx3y3x4y4

x2+xy+y2x+yx2+y2

(4)

factor1x21+1x2+3x+2

2x+1x+2x+1x1

(5)

factorx3+5

x3+5

(6)

factorx3+5,513

523513x+x2x+513

(7)

factorx3+5,513,312

513−3+5132x513−3+2x513x+5134

(8)

factorx3+5.0

x+1.709975947x21.709975947x+2.924017740

(9)

factorx3+5,complex

x+1.709975947x0.8549879733+1.480882610Ix0.85498797331.480882610I

(10)

factory42,sqrt2

y2+2y2+2

(11)

aliasα=RootOfx22:

factory42,α

y2+αy2+α

(12)

factorx3+y3

x+yx2xy+y2

(13)

factorx3+y3,312

y−3+2xyy−32x+yx+y4

(14)

The following is a splitting field example. The polynomial a is a polynomial over the rationals.

ax4x2+1

ax4x2+1

(15)

To factor a over the rationals, use the following.

factorx4x2+1

x4x2+1

(16)

To factor a into linear factors, you must extend the field of coefficients using algebraic extensions.

withPolynomialTools:

a1Splita,x

a1RootOf_Z4_Z2+13+RootOf_Z4_Z2+1+xx+RootOf_Z4_Z2+1RootOf_Z4_Z2+13RootOf_Z4_Z2+1+xxRootOf_Z4_Z2+1

(17)

Represent it using radicals.

converta1,radical

32+I23+32+I2+xx+32+I232+I2332I2+xx32I2

(18)

Depending on the algebraic extension, this can factor in several different ways.

factora,sqrt22Isqrt3

2x+I32x+I+32x+3+I2x+I316

(19)

References

  

Mark van Hoeij, Factoring polynomials and the knapsack problem. Journal of Number Theory, 95, 167-189, (2002).

  

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

  

[MT18] Michael Monagan and Baris Tuncer. Factoring multivariate polynomials with many factors and huge coefficients. Proceedings of CASC 2018, Springer-Verlag LNCS 11077, 319-334 (2018).

  

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

Compatibility

• 

The factor command was updated in Maple 2019.

See Also

AFactor

collect

Factor

factors

galois

ifactor

irreduc

RootOf

roots

sqrfree