> > 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
Ah, I knew there had to be a method! As usual, I'm looking for the easiest interface, and this is very nice. > 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) Hmm. So sage: z=1+i nonetheless is interpreted as symbolic until further notice? That's useful to know. > > > 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? Just the usual - everything! :) But upon further experimentation I find that I must have been not trying the right things yesterday, because arg works functionally, and the behavior that log(i) returns log(I) is consistent with log(2) returning log(2), symbolically, as above. Sorry for asking that - I must have been too tired last night to try everything. > > > 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 Or I could make an init.sage file and put it in, right? It could be useful to put a sample of the sort of commands which live in that kind of file on the Wiki FAQ, or even a blank file with suggestions commented out in the actual distribution. Thanks! --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---