[Top][All Lists]

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

Re: [Axiom-developer] "empty list" results, inverse trig substitutions,

From: William Sit
Subject: Re: [Axiom-developer] "empty list" results, inverse trig substitutions, "Floats" in "solve"
Date: Sat, 03 Oct 2009 14:20:56 -0400

Hi James:

When you ask Axiom to solve

I believe (note, this is an educated guess, but simple problems in Axiom can often have deep reasons, so much so it is difficult to understand whether things are bugs or features) that x is treated as a parameter, or as lying in the coefficient domain (usually an integral domain). All polynomial equations are converted into polynomial ideals over the coefficient domain before using the solver. Thus an equation like x=2 is converted to x-2 (=0), but x-2 is a non-zero element of the coefficient domain when x is an indeterminate. To solve the equation in a,b, the coefficient domain is extended to its field of fractions, and x-2 is therefore a unit in the polynomial ring with a, b as indeterminates. The polynomial ideal is then a unit ideal, hence there is no solution.

Of course, this is not what the user wants. The user wants to solve for a,b,x but just wants the projected part a, b of the solution. However, the "equation" x=2 does not involve a or b. If it is replaced by one that does, provided it forms a consistent system in the variables a, b with the rest (thus no single equation in x alone should be resulted through elimination), then the system will solved.

[[a= x + 3,b= 3]]

If x is intended to be solved (not a parameter), then it should be considered as an indeterminate like a, b. Otherwise, if it is intended to substitute x with a value like 2, then it should be done after the system in a, b has been solved.

By distinguishing the two cases when the variables to be solved is [a,b] or [a,b,x], Axiom allows the user to indicate his intention.

I can't do much with the tan problem, since we have:

solve([tan(b) = a],[b])
Error detected within library code:
No identity element for reduce of empty list using operation

(You mileage may differ, since I am using a very old version of Axiom).

This is clearly a bug, for the old version.


On Fri, 02 Oct 2009 13:29:29 -0600
 James <address@hidden> wrote:
I'm new to axiom, using it for calculations. There seems to be odd behaviour when using "solve" on a list of equations. This is with the most recent axiom binary package, Version Axiom (May 2009), on Ubuntu 8.10 "intrepid". For

 (8) -> solve([a=3+x,b=1-x,x=2],[a,b])
 (8)  []
Type: List List Equation Fraction Polynomial Integer

So, the answer is "the empty list"?! That's not very useful, and seems not
correct either.  What am I missing here?

Then instead:

 (9) -> solve([a=3+x,b=1-x,x=2],[a,b,x])
 (9) ->
   (9)  [[a= 5,b= - 1,x= 2]]
Type: List List Equation Fraction Polynomial Integer

That works.  Why?

Similarly, axiom seems confused about finding substitutions. For instance:

(12) -> solve([ tan(bt)=(a*r)/(s*(r-d)), x=100*cos(bt), y=d*sin(bt)],[x,y,bt])
 (12) ->
    (12)  [[]]
Type: List List Equation Expression Integer

Here, "the empty list" again - why?

If, instead, I "spell it out" for axiom, by taking the arctan instead, then

(13) -> solve([bt=atan((a*r)/(s*(r-d))),x=100*cos(bt),y=d*sin(bt)],[x,y,bt])
 (13) ->
(100r - 100d)s a d r [x= ----------------------------, y= ----------------------------, +-------------------------+ +-------------------------+ | 2 2 2 2 2 | 2 2 2 2 2 \|(r - 2d r + d )s + a r \|(r - 2d r + d )s + a r
                   a r
       bt= atan(--------)]
                (r - d)s
Type: List List Equation Expression Integer

Axiom doesn't know about substituting inverse trig functions by itself?

But then, again,

(14) -> solve([bt=atan((a*r)/(s*(r-d))),x=100*cos(bt),y=d*sin(bt)],[x,y])
 (14) ->
    (14)  [[]]
Type: List List Equation Expression Integer

Arrrrgh! Ok, why is that again, returning "the empty list" when using "solve"
with the truncated list of variables?

On anther topic, "Floats" in "solve", where this works, mixing integers and

 (16) -> solve([a=3+x,b=1-x,x=2.0],[a,b,x])
    (16)  [[a= 5.0,b= - 1.0,x= 2.0]]
Type: List List Equation Fraction Polynomial Float

and this works:

 (17) -> solve([a=3+x,b=1-x,x=2],0.001)
   (17)  [[x= 2.0,a= 5.0,b= - 1.0]]
Type: List List Equation Polynomial Float

doing this, using "x=2.0" instead of "x=2":

 (18) -> solve([a=3+x,b=1-x,x=2.0],0.001)
There are 20 exposed and 3 unexposed library operations named solve having 2 argument(s) but none was determined to be applicable.
Cannot find a definition or applicable library operation named solve
      with argument type(s)
                       List Equation Polynomial Float

Arrrrgh! - the dreaded "none was determined to be applicable"!
Does that make sense, that?

Thanks in advance for any clues!  Are these bugs?


Axiom-developer mailing list

William Sit, Professor Emeritus
Mathematics, City College of New York Office: R6/202C Tel: 212-650-5179
Home Page:

reply via email to

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