axiom-developer
[Top][All Lists]
Advanced

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

Re: [Axiom-developer] Am I posing this solve problem wrong?


From: Ralf Hemmecke
Subject: Re: [Axiom-developer] Am I posing this solve problem wrong?
Date: Mon, 05 May 2008 09:43:39 +0200
User-agent: Thunderbird 2.0.0.14 (X11/20080421)

On 05/05/2008 05:46 AM, Bill Page wrote:
On Sun, May 4, 2008 at 10:23 PM, C Y wrote:
--- Bill Page <address@hidden> wrote:

I guess you need to be a little more explicit about the variables:
Ah.  Thanks Bill.  I wonder if this is the desired default behavior?

Cliff, I guess, you asked for the result you got. Bill has just shown you how to get what you actually had in mind.

Well, Axiom is a strongly typed system so specifying the main
variables of a multivariate polynomial with coefficients from some
other ring is not entirely unexpected.

Right. Now look at Cliff's original expression.

(1) -> E1 := x2*D12+(y-y1)2*C12 - C12*D12
(1) ->
         2  2      2         2 2     2 2     2  2
  (1)  C1 y1  - 2C1 y y1 + C1 y  + D1 x  - C1 D1
                         Type: Polynomial Integer

Without further information, Axiom puts it into the domain Polynomial(Integer). *Don't* think that this type represents a polynomial in x and y with C1 and D1 being in the coefficient domain.
None of these variables is a distinguised one. If you now say

solve(E1=0,y)

then before looking at the result, think of what would *you* return.
Maybe you are asking for an expression for y. But, hey, that is of course not the only thing that you could have asked for. Suppose, I consider the above input expression as an element in R[y]] where the coefficient domain R is Z[C1,D1,y1,x]. And I would like

  solve(E1=0,y)

to stand for "find a (or several) z \in R such that E1[y<--z]=0" where E1[y<--z] is my (fancy) notation for substitution of y by z in E1.

Now, if Axiom had given you

               +----------+                 +----------+
               |   2     2                  |   2     2
            D1\|- x  + C1   + C1 y1    - D1\|- x  + C1   + C1 y1
   (2)  [y= -----------------------,y= -------------------------]
                       C1                          C1
                                Type: List Equation Expression Integer

that would even be wrong, since your intention was to get elements of R.
Having types, Axiom should actually allow you to specify what you want.

  R:=MPOLY([C1,D1,y1,x],Integer)
  P:=MPOLY([y],R)
  E1: P := x^2*D1^2+(y-y1)^2*C1^2 - C1^2*D1^2
  solve(E1=0,y)@List(R))

Unfortunately, that doesn't work (yet), but I would expect it to work in an ideal AXIOM.

Ralf




reply via email to

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