FACTORIZE INDEX

FACTORIZE _ _ _ _ _ _ _ _ _ _ _ _ operator

The factorize operator factors a given expression into a list of {factor,power} pairs.

syntax:

factorize(<expression>)

<expression> should be a polynomial, otherwise an error will result.

examples:



fff := factorize(x^3 - y^3); 

         2          2
  		  {{X  + X*Y + Y ,1},{X - Y,1}} 


fac1 := first fff; 

             2          2
  FAC1 := {{X  + X*Y + Y ,1} 


factorize(x^15 - 1); 

       8    7    6    5    4
   {{ X  - X  + X  - X  + X  - X + 1,1},
     4    3    2
   {X  + X  + X  + X + 1,1},
     2
   {X  + X + 1,1},
   {X - 1,1}}


lastone := part(ws,length ws); 

  	LASTONE := {X - 1,1} 


setmod 2; 

  1 


on modular; 

factorize(x^15 - 1); 

     4    3    2
  {{X  + X  + X  + X + 1,1},
     4    3
   {X  + X  + 1,1},
     4
   {X  + X + 1,1},
      2
   { X  + X + 1,1},
   {X + 1,1}}

The factorize command returns the factor,power pairs as a list. You can therefore use the usual list access methods ( first, second, third, rest, length and part) to extract these pairs.

If the <expression> given to factorize is an integer, it will be factored into its prime components. To factor any integer factor of a non-numerical expression, the switch ifactor should be turned on. Its default is off. ifactor has effect only when factoring is explicitly done by factorize, not when factoring is automatically done with the factor switch. If full factorization is not needed the switch limitedfactors allows you to reduce the computing time of calls to factorize.

Factoring can be done in a modular domain by calling factorize when modular is on. You can set the modulus with the setmod command. The last example above shows factoring modulo 2.

For general comments on factoring, see comments under the switch factor.