[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [Axiom-mail] Factorizing an expression
From: |
Page, Bill |
Subject: |
RE: [Axiom-mail] Factorizing an expression |
Date: |
Wed, 8 Nov 2006 10:03:33 -0500 |
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.