factor of polynome



(%i1) (2*X+1)*(1-5*X)*(X+1);
(%o1)                     (1 - 5 X) (X + 1) (2 X + 1)
(%i2) expand(%);
                                 3       2
(%o2)                      - 10 X  - 13 X  - 2 X + 1
(%i3) factor(%);
(%o3)                    - (X + 1) (2 X + 1) (5 X - 1)
(%i4) -%;
(%o4)                     (X + 1) (2 X + 1) (5 X - 1)
(%i5) maplist(lambda([x],x),%);
(%o5)                      [X + 1, 2 X + 1, 5 X - 1]
(%i6)
The step at %i4 is necessary to change the internal representation, you 
can execute
?print(%03) and ?print(%o4) to see what is happening.
Dan Stanger
Daniel Malik wrote:

> i want create a list of the factors of polynomes.
> P(X):=(2*X+1)*(1-5*X)*(X+1)
> my function must return
> p1(X):(2*X+1)
> p2(X):(1-5*X)
> p3(X):(X+1)
>
> Thank's for reply
>
> _______________________________________________
> Maxima mailing list
> Maxima@math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>
>