Dear sage-devel,

We have some inconsistency in solve.

sage: solve(x^5+x^3+17*x+1,x)

[x == -0.0588115172555,
 x == (-1.33109991788 + 1.52241655184*I),
 x == (-1.33109991788 - 1.52241655184*I),
 x == (1.36050567904 + 1.5188087221*I),
 x == (1.36050567904 - 1.5188087221*I)]

sage: from sage.symbolic.expression import Expression
sage: Expression.solve?
Docstring:

            Analytically solve the equation ``self == 0`` for the
            variable `x`.

            .. warning::

               This is not a numerical solver - use ``find_root`` to
solve
               for self == 0 numerically on an interval.

Note that

sage: maxima.solve(x^5+x^3+17*x+1,x)
[0=x^5+x^3+17*x+1]

The reason for this is that sometime earlier this year, we added the
topoly_solver package in Maxima to our solve routines to address.  See
the discussion at
http://groups.google.com/group/sage-support/browse_thread/thread/6de90b91d7cf0f75/70b437ea856ff030?#70b437ea856ff030.
I cannot find the ticket where this was added, though a few days ago I
could.

Anyway, the reason for this is that the solve routine for multiple
equations in Maxima (which to_poly_solve uses) allows non-exact
answers as output.  This is documented (see algsys).  In fact, trying
to solve the equation above and y==1 simultaneously will yield the
float answers.

What is the desired behavior of solve()?  Since roots() uses it for
symbolic input, we already have some problems (also note that
to_poly_solve does not return multiplicities).  However, getting rid
of to_poly_solve seems unpleasant too, since it does solve a lot of
equations which formerly were mysterious to Sage.

If you have an opinion, please let me know.  Unfortunately, it doesn't
look easy to keep an exact-solution-only behavior here.  The author of
to_poly_solve expects to fix some bugs later this fall, but probably
not this aspect, since it's not a bug in Maxima, rather in our use of
Maxima.

- kcrisman
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to