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
address@hidden
http://lists.nongnu.org/mailman/listinfo/axiom-developer