[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Axiom-developer] [Axiom-mail] How can I get every term of an expression

From: Francois Maltey
Subject: [Axiom-developer] [Axiom-mail] How can I get every term of an expression ?
Date: Sun, 18 Sep 2005 15:37:53 -0500


I start from a Polynomial Integer : (2*x+3*y)*(4*z+2*x)
     or better from an Expression : (2*log(x)+3*exp(y))*(4*sin(z)+2*log(x))

And I want to get every term : 6 xy, 8 xz, 12 yz and 4 x^2 
                          or   6 %e^y log(x), etc. 
and get easily the integer 6, 8, 12 or 4.

With mupad I do 
 [op (normal ((2*x+3*y)*(4*z+2*x)))] ;
 map ([op (normal ((2*x+3*y)*(4*z+2*x)))], t-> [coeff(t), t/coeff(t)]) ;

The first give me the list  [6 x y, 8 x z, 12 y z, 4 x^2]
and the second              [[6, x y], [8, x z], [12, y z], [4, x ]]

Of corse the command t/coeff(t) isn't the faster way, 
but I don't find better.

How can I do this in an *.input axiom file ?

I look in the big book, I believe I must use DMP, not SUP, but I'm not sure.

Must I use leadingCoefficient, leadingCoefficient and reductum 
or can I use a List coerce ? but I don't find the command.

And I want to play with expression, not polynomial ; 
then what coerce must I do ?

Thanks a lot for any advice, and have a good day !

Axiom-mail mailing list

forwarded from

reply via email to

[Prev in Thread] Current Thread [Next in Thread]