On January 23, 2007 2:02 PM Wiesner Thomas wrote: > > I'm sorry that i bug you with this (probably) simple > problem: > > How can i do the following (from Maple) in Axiom: > > > expand(((-r1*r2*uoff)+((r2+r1)*r3+r1*r2)*ue)/(r2*r3)); > r1 uoff ue r1 ue r1 > - ------- + ue + ----- + ----- > r3 r2 r3 > > I've been trying and googling for hours. I've tried MPOLY but > have only managed to to pull one variable in front of the > fraction and didn't find out how to split it up completely. > > I found the MPOLY approach in the Rosetta pages > (http://wiki.axiom-developer.org/RosettaStone) > but it doesn't do what i want. > > This seems to be such a simple task and I can't find out. > > I am writing a quit overview about CA Systems for hobby > electronics and want to explain some usual tasks in > different CA Systems. >
I would suggest the following computation: (1) -> ex1:=((-r1*r2*uoff)+((r2+r1)*r3+r1*r2)*ue)/(r2*r3) - r1 r2 uoff + ((r2 + r1)r3 + r1 r2)ue (1) -------------------------------------- r2 r3 Type: Fraction Polynomial Integer (2) -> ex1::DMP([r1,ue,uoff],FRAC POLY INT) r3 + r2 1 (2) ------- r1 ue - -- r1 uoff + ue r2 r3 r3 Type: DistributedMultivariatePolynomial([r1,ue,uoff], Fraction Polynomial Integer) The reason why this apparently simple task might seem difficult at first to a novice Axiom user is because Axiom is strongly- typed. Unlike Maple (and most other CA systems) expressions in Axiom always have some type (domain) that explicitly defines the operations appearing in the expression. Instead of "expanding" an expression within a given domain, we are often faced with "coercing" (represented by the :: symbol) expressions from one domain to another more suitable for our task. In my opinion learning to deal with the Axiom type system is what makes Axiom's learning curve very steep at the beginning, but this initial investment pays off later in more sophisticated applications. In (2) above, the reason that the first term is not expanded further is that Axiom does not have any domain (as far as I know) that has ue r1 ue r1 ----- + ----- r2 r3 as separate terms. Regards, Bill Page. _______________________________________________ Axiom-mail mailing list Axiom-mail@nongnu.org http://lists.nongnu.org/mailman/listinfo/axiom-mail