I agree, some consistent syntax for multiple integrals is needed. For example, to me this seems strange:
sage: x,y = var("x,y") sage: f = y*sin(x*y) sage: bool(diff(f,x,y) == diff(diff(f,x),y)) True sage: bool(integral(f,x,y) == integral(integral(f,x),y)) False At least, it is a possible source of confusion for students. Years ago, one of my collegues (now retired) argued that because the Maple syntax for plot3d and the Maple syntax for double integrals was the same, this helped the students understand limits in calc3 better. For definite integrals, I wonder if we should use this reasoning to argue that, in terms of the syntax design, we should try to align the plot/plot3d and integral syntax in a similar way? On Mon, Feb 2, 2009 at 11:16 PM, kcrisman <kcris...@gmail.com> wrote: > > Dear Devel list, > > Before reading this, read the discussions at > http://groups.google.com/group/sage-devel/browse_thread/thread/8ec32e4d895da60c > and tracs # 1221 and # 2787. > > Since nothing has been done on this in over a year, and because I feel > fairly strongly that it is *very* important (to keep "insane ease of > use", in wdj's words) to keep things like > sage: integrate(sin(x),x,0,pi) > viable, I messed around with a toy implementation of some alternate > syntax that would preserve backward compatibility but allow for the > Mathematica-style syntax and multiple integration. > > I now have a working (still toy) implementation that keeps all current > syntax, but adds the following possibilities giving correct answers: > > sage: integrate(sin(x),[x],[var('y')]) # double integral, x first > sage: integrate(sin(x),[x,0,pi],[y]) # one definite, one indefinite > sage: integrate(sin(x),(x,),(x,)) # double integral, using tuples > instead of lists if you like parentheses > sage: integrate(sin(x),(x,),(var('y'),),(var('z'),)) # or more > integrals > > One would not (yet) be able to do something like > sage: integrate(sin(x),[0,pi]) > though I suppose it would be easy to implement; this seems a little > weird to me personally, though, esp. if > sage: integrate(sin(x),0,pi) > is already available. > > Because the integration code is spread in a few places, I am sure it > will take some work to make this work properly, but I am familiar > enough with it from previous work that this proof of concept has > convinced me. (Thanks, Python, for making such things so easy!) It > is really just a matter of asking the right arguments to be passed at > some point, since Maxima and the interface to it take care of the > rest. > > So I am wondering if there is any feedback from esp. William, Ondrej, > Jason, and whomever else posted or discussed this on trac. Certainly > having "native" multiple integrals seems like a no-brainer to try to > have, and enabling easy transfer from Mma is definitely useful. But > I'd also like to ensure that > sage: integrate(sin(x),x,0,pi) > and friends live happily ever after, or at least until I stop > teaching, and I am quite happy to do all the work to make that happen > while addressing the valid points these tickets make. > > Thanks, > - kcrisman > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sage-edu" group. To post to this group, send email to sage-edu@googlegroups.com To unsubscribe from this group, send email to sage-edu+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-edu?hl=en -~----------~----~----~----~------~----~------~--~---