On Fri, Jan 9, 2009 at 9:01 AM, Robert Dodier <[email protected]> wrote:
>
> On Jan 9, 6:51 am, Slava <[email protected]> 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.
William
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---