RE: Factorizing an expression

"Page, Bill" <[email protected]>
Newsgroups gmane.comp.mathematics.axiom.user
Message-ID <CAE9B164E720CE4D8727792DF8F28AE39D9A1F@corporateex02.Corporate.drdc-rddc.gc.ca>
On Wednesday, November 08, 2006 9:30 AM Ludovic Courtès wrote:
> 
> I'm looking for a way to turn an expression into a factor of another
> one.  For instance, given this equation:
> 
>   (a/b)^2 + (a/b)y + 3(a/b)x
> 
> tell Axiom to somehow turn this into:
> 
>   (a/b).((a/b) + y + 3x)
> 
> Apologize if this is answered elsewhere but I couldn't find it in the
> book.
> 

Here is what I would do:


(1) -> p:MPOLY([x,y],FRAC POLY INT):=(a/b)^2 + (a/b)*y + 3*(a/b)*x

                      2
        3a     a     a
   (1)  -- x + - y + --
         b     b      2
                     b
              Type: MultivariatePolynomial([x,y],Fraction Polynomial Integer)
(2) -> factor p

        3a      1      a
   (2)  -- (x + - y + --)
         b      3     3b
     Type: Factored MultivariatePolynomial([x,y],Fraction Polynomial Integer)
(3) ->

--------

p is a multivariate polynomial in x and y with coefficients from
the ring of polynomial fractions. At first glance this construction
might seem rather strange from a mathmatical point of view, but it
in Axiom's formal approach the only requirement to form a multi-
variate polynomial is to supply a list of variables and the name
of some ring from which the coefficients are drawn. Axiom takes care
of keeping track what is a polynomial variable and what is a
coefficient.

This sort of construction is one of the things that sets Axiom
apart from most other computer algebra systems.

Regards,
Bill Page.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.