I was just asking about the recommended way to solve some general problems. You've answered my question by saying that maxima will be more transparent in the future.
By the way, it's unintuitive that this should give an error in SAGE: f =x - 3.3 <type 'exceptions.TypeError'>: unsupported operand parent(s) for '-': 'Univariate Polynomial Ring in x over Rational Field' and 'Real Field with 53 bits of precision' What's the workaround? Thanks, Brian On 5/7/07, William Stein <[EMAIL PROTECTED]> wrote: > > On 5/7/07, Brian Harris <[EMAIL PROTECTED]> wrote: > > > Nice, I didn't know about .derivative(). For calculus presented in > > the tutorial (http://modular.math.washington.edu/sage/doc/html/tut/ > > node22.html) you do everything in Maxima calls/functions. An > > explanation in the tutorial (and as a google group posting as I have > > an assignment due tomorrow!) of the options and trade-offs for > > performing calculus computations would be helpful. > > Almost all the explicit calls to maxima in the tutorial will go away > with sage-2.5. Everything will be done via working directly > in SAGE -- maxima will be used in some cases behind the scenes. > > > I'm doing density estimation right now for a statistics/probability > > class which involves maximizing log-likelihood formulas. I would be > > happy to provide material for a short tutorial on how to do this as I > > learn it myself. Perhaps first we could show how to estimate the > > That would be good. > > > single parameter of an exponential density, then showing how to > > estimate the 2 parameters of a normal density using partial > > derivatives, and finally show how to estimate the 2 parameters of a > > logistic density using gradient ascent (we were told that maximizing > > the system of equations resulting from taking the partial derivatives > > of the logistic log-likelihood formula is a problem that cannot be > > solved analytically, so we're doing this iterative estimation > > method). > > > > What do you think, and by the way, do you have a solve() method for > > finding function maxima? > > Maxima itself has a solve command, and in sage-2.5 there will > be an algebraic solve command. Again a clear example of what > you're asking for would be helpful. > > > Brian > > > > On May 7, 10:09 am, William Stein <[EMAIL PROTECTED]> wrote: > > > On Monday 07 May 2007 10:11 am, Brian Harris wrote: > > > > > > > Thanks for the scatter plot pointers. For question 2, imagine > > > > something like: > > > > f(x) = 5 * SUM(1<i<10, x^i) > > > > Probably not standard sum notation, but I hope it's clear. Now I want > > > > to use SAGE to compute f'(x). > > > > > > This doesn't help you today, but in SAGE-2.5 (which will be much > > > more aimed at Calculus use), which will be released this week, > > > you'll be able to do this: > > > > > > sage: f = 5*sum(x^i for i in range(1,10)); f > > > 5*(x^9 + x^8 + x^7 + x^6 + x^5 + x^4 + x^3 + x^2 + x) > > > sage: f.derivative() > > > 5*(9*x^8 + 8*x^7 + 7*x^6 + 6*x^5 + 5*x^4 + 4*x^3 + 3*x^2 + 2*x + 1) > > > > > > Actually, the above would also work in sage-2.4, but would > > > have slightly different output. > > > > > > Maybe you could send some more complicated examples along these > > > lines that you're interested in. They are useful to us, since > > > we can add them as examples in the reference manual and/or > > > tutorial. > > > > > > william > > > > > > > > > > > > > On May 6, 9:04 pm, Marshall Hampton <[EMAIL PROTECTED]> wrote: > > > > > I'm not completely sure what you mean for your question 2 - can you > > > > > give an example? > > > > > > > > For your first question, if you have a tuple of 2D data called 'data', > > > > > then in the notebook you can do > > > > > > > > show(point(data)) > > > > > > > > and you get a scatterplot. In the reference manual under 2D-plotting > > > > > there is more information on graphics primitives, such as adding > > > > > colors (http://modular.math.washington.edu/sage/doc/html/ref/module- > > > > > sage.plot.plot.html). > > > > > > > > There is also a list_plot command, so you can do > > > > > > > > show(list_plot(data)) > > > > > > > > to a list of data points; this has a 'plotjoined' option. > > > > > > > > Hopefully that helps. I am not a SAGE guru, so there may be other > > > > > nice options as well. > > > > > > > > -M.Hampton > > > > > > > > On May 6, 2:49 pm, Brian <[EMAIL PROTECTED]> wrote: > > > > > > 1. How do you do scatter plots in SAGE, without using an interface > > > > > > to > > > > > > underlying commercial software like MATLAB? > > > > > > > > > 2. Can maxima or another tool compute [partial] derivatives or > > > > > > integrals containing arithmetic sums or products? > > > > > > -- > > > William Stein > > > Associate Professor of Mathematics > > > University of Washington > > > > > > > > > > > > -- > William Stein > Associate Professor of Mathematics > University of Washington > http://www.williamstein.org > > > > --~--~---------~--~----~------------~-------~--~----~ 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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~----------~----~----~----~------~----~------~--~---
