factor - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Mathematics : Algebra : Polynomials : Factorization and Root Finding : factor

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]). 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, series, relation, or function, then factor is applied recursively to the components of a.

• 

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.70997594667670x21.70997594667670x+2.92401773821287

(9)

factorx3+5,complex

x+1.70997594667670x0.854987973338349+1.48088260968236Ix0.8549879733383491.48088260968236I

(10)

factory42,2

y2+2y2+2

(11)

aliasα=RootOfx22:

factory42,α

y2+αy2+α

(12)

factorx3+y3

x+yx2xy+y2

(13)

factorx3+y3,312

x+yy−3+2xyy−32x+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+1xRootOf_Z4_Z2+1RootOf_Z4_Z2+13RootOf_Z4_Z2+1+x

(17)

Represent it using radicals.

converta1,radical

32+I23+32+I2+xx+32+I2x32I232+I2332I2+x

(18)

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

factora,22I3

2x+3+I2xI+32x+3I2x+I+316

(19)

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 factor command was updated in Maple 2019.

See Also

AFactor

collect

Factor

factors

galois

ifactor

irreduc

RootOf

roots

sqrfree