Dear group,
It is not solve/algsys to be blamed! I think the bug report should be
dismissed.
Consider this simple example:
(%i1) ?trace(?ebaksubst);
(%o1) (ebaksubst)
(%i2) algsys([x^2+y^2=9, (x-1)^2+(y-1)^2=9], [x,y]);
<blah-blah>
0: (EBAKSUBST
(((MEQUAL SIMP) $Y
((MTIMES SIMP) ((RAT SIMP) 1 2)
((MPLUS SIMP) 2
((MTIMES SIMP RATSIMP) ((MEXPT SIMP) 2 ((RAT SIMP) 1 2))
((MEXPT SIMP)
((MPLUS SIMP) 9
((MTIMES SIMP RATSIMP) -1 ((MEXPT SIMP) 17 ((RAT SIMP) 1 2))))
((RAT SIMP) 1 2)))))))
((#:Y1822 2 2 0 (#:|sqrt(17)1850| 1 -1 0 -9))))
0: EBAKSUBST returned
((#:|sqrt(17)1850| 1 -2 0
(#:|sqrt(2)1975| 1 (#:|sqrt(9-sqrt(17))2389| 1 2) 0 2)))
(%o2) []
(%i6) bfloat(-2*sqrt(17)+2*sqrt(2)*sqrt(9-sqrt(17))+2);
(%o6) - 2.220446049250313b-16
(%i9) (fpprec:100, bfloat(-2*sqrt(17)+2*sqrt(2)*sqrt(9-sqrt(17))+2));
(%o9)
2.2859747825645499644315670966106819189038199896455973224302516864552652\
71813476391350896043720344059b-100
ebaksubst calls $radcan who fails to recognize the true solution. So the
problem is with simplification of (nested) radicals.
Solve uses algsys by default. Comments at the head of algsys.lisp say that
"Other possible methods seem worse: the Buchberger-Spear canonical ideal basis
algorithm is slow...". Is it still true? Now we have the grobner package! Can
there be examples at wiki about how to use grobner package to solve systems
of polynomial equations?
(BTW, grobner package compiles with errors with Maxima 5.15.0 + sbcl)
--
Andrei Zorine
? ????????? ?? Sunday 03 August 2008 16:09:07 Barton Willis ???????(?):
> -----maxima-bounces at math.utexas.edu wrote: -----
>
> >Hello,
> > s: solve([(x-x0)^2+(y-y0)^2=r^2,(x-x1)^2+(y-y1)^2=r^2],[x,y]);
> >This is a relatively simple problem that my Mathcad can solve in less
> >than a second.
> >Maxima takes about a minute to come up with a [ ] answer.
> >The others on sci.math.symbolic agree this is a bug or should be.
>
> Yes, this is a bug. If you could, report it to our bug list. The
> function algsys isn't nearly as good as it should be. Also:
>
> (%i10) eq : [y0^2-2*y*y0+y^2+x0^2-2*x*x0+x^2=r^2,y1^2-2*y*y1+y^2
> +x1^2-2*x*x1+x^2=r^2]$
>
> OK:
>
> (%i11) algsys(eq,[x,y,r])$
>
> Not OK:
>
> (%i12) algsys(eq,[r,x,y]);
> Maxima encountered a Lisp error:
>
> Set algebraic to true and try again:
>
> (%i13) algebraic : true$
>
> No Lisp error, but no solution either :(
>
> (%i14) algsys(eq,[r,x,y]);
> (%o14) []
>
> Barton
>
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima