Alex Thanks for your help. I had searched the group and found the thread about nth roots, but I wasn't putting it together with the plot statement correctly.
Thanks also to Jason for publishing an illustration -- good idea. The published worksheets are a great resource for learning Sage and working through the subtleties, one which I'll remember to search for future questions. On Feb 22, 7:19 am, Alex Ghitza <[EMAIL PROTECTED]> wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hi Andy, > > I had the exact same question a few days ago. There are > many issues involved here, but the short answer to your > question (provided by Carl Witty) is: > > you can plot x^(1/3) with > > show(plot(lambda x : RR(x).nth_root(3), -10, 10), figsize=[5,5], > ymin=-10, ymax=10) > > You don't need to specify xmin and xmax in show since they're > given in the plot command. > > Best, > Alex > > Andy wrote: > > | I am interested in the use of Sage as a teaching tool at all grade > | levels. At the moment, I'm trying to weave Sage into an introductory > | algebra curriculum. > | > | I can graph all the basic functions with plot(x), replacing x with > | x^2, x^3, 1/x, etc. The one I can't get to work is x^(1/3). I've > | tried to express the cube root function several different ways. The > | expression I'm using now is: > | > | sage: > | show(plot(x^(1/3),-10,10),figsize=[5,5],xmin=-10,xmax=10,ymin=-10,ymax=10) > | > | I receive the error message "TypeError: 'float' object is > | unsubscriptable" > | > | Also, is the expression above the most succinct way to generate a > | graph with this kind of view, x and y ranging -10 to 10? > | > | Thanks for any advice. > | > | Andy > | | > | > > - -- > Alexandru Ghitza > Assistant Professor > Department of Mathematics > Colby College > Waterville, ME 04901http://bayes.colby.edu/~ghitza/ > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v2.0.7 (GNU/Linux) > Comment: Using GnuPG with Mozilla -http://enigmail.mozdev.org > > iD8DBQFHvtngdZTaNFFPILgRAvbjAJ9qlM5R2UnmCHwOMV2HOlhg+LcwZACcC21K > Mrx/wRMSjGXeYz2KpkXN0Xo= > =O3v+ > -----END PGP SIGNATURE----- --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---