Hi James:
solve([a=3+x,b=1-x,x=2.0],0.001)
is an "incorrectly" constructed command. The "solve"
function that was applicable in
solve([a=3+x,b=1-x,x=2],0.001)
is available for the domain List Equation Fraction
Polynomial Integer (from the package FLOATRP) but is not
available when Integer is replaced by Float.
According to documentation from FLOATRP, "solve(leq, eps)"
finds all the real solutions of the system leq of
equations of *rational* functions with respect to all the
variables appearing in lp [sic:leq], with precision eps.
Thus, despite the package is called with FLOATRP(FLOAT),
the leq must be from List equation Fraction Polynomial
Integer. I think the reason is that the package uses
Groebner basis. See numsolve.spad for source: the
restriction is given near the top, in package
InnerNumericFloatingSolver (K specifies the coefficient
field of the input polynomials and must be either Fraction
Integer or Complex(Fraction Integer).
William
On Fri, 02 Oct 2009 13:29:29 -0600
James <ja...@onyx.nurealm.net> 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
instance:
(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) ->
(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
floats:
(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
Float
Arrrrgh! - the dreaded "none was determined to be
applicable"!
Does that make sense, that?
Thanks in advance for any clues! Are these bugs?
James
_______________________________________________
Axiom-developer mailing list
Axiom-developer@nongnu.org
http://lists.nongnu.org/mailman/listinfo/axiom-developer
William Sit, Professor Emeritus
Mathematics, City College of New York
Office: R6/202C Tel: 212-650-5179
Home Page: http://scisun.sci.ccny.cuny.edu/~wyscc/
_______________________________________________
Axiom-developer mailing list
Axiom-developer@nongnu.org
http://lists.nongnu.org/mailman/listinfo/axiom-developer