Hi, On Tue, Aug 18, 2009 at 8:02 PM, Jason Grout<jason-s...@creativetrax.com> wrote: > > Fredrik Johansson wrote: >>> 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).
I agree that if we want to support multiple integrals in future then we should get rid of (3). There are some technical issues for implementing (2) in new symbolics directly. As it stands, tuple can't be coerce to SR of pynac. ------- sage: x,a,b = var('x,a,b') sage: f = function('f') sage: f(x, (x,a,b) ) ..... TypeError: cannot coerce arguments: no canonical coercion from <type 'tuple'> to Symbolic Ring ----- I know a quick-hack that bypasses this by using a dummy function say ------------- sage: symbolic_tuple = function('') sage: xab = symbolic_tuple(x,a,b) sage: f(x, xab) f(x, (x, a, b)) ------------- I guess, there may be a better solution. Burcin, do you have any comments/suggestions on this? Thanks Golam --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---