On Wed, Aug 19, 2009 at 1:02 AM, Jason Grout<jason-s...@creativetrax.com> wrote: > > Fredrik Johansson wrote: >> On Tue, Aug 18, 2009 at 6:53 PM, Golam Mortuza >> Hossain<gmhoss...@gmail.com> wrote: >>> Hi, >>> >>> I am preparing patches that will resolve >>> >>> http://trac.sagemath.org/sage_trac/ticket/6465 >>> >>> and will also move symbolic integration as a sub-class >>> of SFunction into new symbolics. >>> >>> >>> Currently, Sage allows omitting variable of integration for convenience. >>> However, this convenience comes at a hefty price by making Sage >>> syntax highly inconsistent. On top of this, it mask genuine typing error >>> as a valid input. >>> >>> For example: "integrate(f(x), x, a, )" is treated as "integrate(f(x), x, x, >>> a)" >>> where user may have wanted to type "integrate(f(x), x, a, b)" but >>> missed the "b". >>> >>> Given we are moving to a new settings, I am proposing that we make >>> integration syntax bit stricter and consistent now. In particular, we allow >>> only >>> following inputs as valid >>> >>> (1) integrate( f(x), x) >>> (2) integrate( f(x), (x,a,b) ) >>> (3) integrate( f(x), x, a, b) >> >> I suggest getting rid of (3) if only to support the following syntax >> for multiple integrals without ambiguity: >> >> integrate(f(x,y,z), (x,a,b), (y,c,d), (z,e,f)) >> > > Technically, that's unambiguous now, as it's easy to tell the difference > between a tuple (x, a, b) and a number or symbolic variable. > > However, I think you're right that it is confusing to students to have > the above notation and (3).
It's ambiguous if you want to support indefinite integrations as well. Is integrate(expr, x, y, z) a triple integral with respect to x, y, z, or an integral with respect to x ranging from y to z? It's also ambiguous to the reader in code where the tuples are passed as variables rather than written out as literals at the point of the call. Fredrik --~--~---------~--~----~------------~-------~--~----~ To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---