Hello,

>  1.  The solve wrapper of maxima does some nice stuff symbolically, but
>  of course it can't handle everything, like
>
>  sage: solve(x^5-x-12,x)
>  [0 == x^5 - x - 12]
>
>  which makes sense!  But I poked around a little for a numerical
>  approximation of solutions command and didn't find it.  This probably
>  means I just didn't look in the right places - any ideas?  I
>  understand Mathematica calls this sort of thing nsolve, but I really
>  don't know.

Your best is to use Sage's actual polynomial objects instead of
symbolic expressions (if you're just interested in polynomial
expressions).

sage: R.<y> = ZZ[]
sage: a = y^5 - y - 12
sage: a.roots(RR)
[(1.68758384186451, 1)]
sage: a.roots(CC)

[(1.68758384186451, 1),
 (0.472524075221555 + 1.59046294160722*I, 1),
 (0.472524075221555 - 1.59046294160722*I, 1),
 (-1.31631599615381 + 0.922151856490895*I, 1),
 (-1.31631599615381 - 0.922151856490895*I, 1)]

If you want to use symbolic expressions, you can use the .find_root() method.

sage: a = x^5 - x - 12
sage: a.find_root(0,2)
1.6875838418645157


>  2.  How far does Sage recognize complex numbers a priori?  For
>  instance,
>
>  sage: abs(1+i)
>  sqrt(2)
>
>  but pretty much anything else doesn't seem to recognize it, as indeed

Sage on startup predefines i in the same way it predefines x. (This is
in sage.all_cmdline and sage.all_notebook.) Here's what's going on:

sage: j = I()
sage: abs(1+j)
sqrt(2)


>  A followup would be to ask if any of those functions have functional
>  notation; there are lots of functions for CC, but they mostly seem to
>  use object notation.

What methods did you have in mind?

>
>  3.  I remember that at some point implicit coefficient multiplication
>  was implemented, e.g.

Implicit multiplication is turned off by default.  You can turn it on:

sage: implicit_multiplication(True)
sage: 2x
2*x

--Mike

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@googlegroups.com
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to