On Fri, Jan 9, 2009 at 9:05 AM, William Stein <wst...@gmail.com> wrote: > On Fri, Jan 9, 2009 at 9:01 AM, Robert Dodier <robert.dod...@gmail.com> wrote: >> >> On Jan 9, 6:51 am, Slava <slava_se...@mail.ru> wrote: >> >>> I`m trying to solve such simple system of equations: [sqrt(x) == 1, x >>> == y], >>> so I type: >>> >>> x,y = var('x,y'); >>> solve([sqrt(x) == 1, x == y], x, y); >>> >>> the answer is: [] >> >> If I understand correctly, Sage punts to Maxima to solve equations. >> Maxima's built-in solver is not too strong. There is an add-on package >> which can solve equations which contain radicals. Dunno how to call >> it from Sage, but in Maxima itself it's like this: >> >> load (topoly_solver); >> to_poly_solve ([sqrt(x) = 1, x = y], [x, y]); >> => [[x = 1, y = 1]] >> >> Maybe at some point in the not-too-distant future, the built-in >> solver would call to_poly_solve automatically .... > > That would be nice. Here's doing the above in sage: > > sage: x,y=var('x,y') > sage: v = [sqrt(x)==1, x==y] > sage: w = maxima(v) > sage: maxima.load('topoly_solver') > sage: w.to_poly_solve([x,y]) > [[x=1,y=1]] > > There's currently no simple code in sage to turn the output of > to_poly_solve into native sage objects. >
I should correct myself and say it doesn't have any "trivial to use" function to do that. Of course we wrote code to do that when implementing our solve command (which does work as you suggest above). William --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---