2009/8/19 Golam Mortuza Hossain <[email protected]>: > > Hi, > > > On Wed, Aug 19, 2009 at 2:30 PM, William Stein<[email protected]> wrote: >> >> On Tue, Aug 18, 2009 at 11:00 PM, Ondrej Certik<[email protected]> wrote: > >>> >>> well, I would interpret it differently: >>> >>> int f(x) d(x^2) = int f(x) 2 x dx >>> = 2 integrate(x*f(x),x) >> >> That's exactly what I meant. I was just being very sloppy because I >> was in a hurry. The point is that "int f(x) d(x^2) = int f(x) 2 x >> dx" seems very reasonable. We could easily make Sage use this >> interpretation even though Maxima doesn't. It woud be an additional >> 2-3 lines of code in calculus.py. >> >> I am equally for either: >> >> (1) raising an error like Mathematica does >> and >> (2) Use the interpretation that Ondrej and I agree upon above. >> >> I favor (1) a little bit more than (2), because it's clear that there >> is some confusion over this issue > > > Hmm, could you please clarify a bit? When you say "raise an error" > do you mean > > (A) (damn the user!!) > ------- > sage: integrate( sin(x), x^2) > .... > TypeError: blah.. blah... > ------- > > or (B) (leave it symbolic) > ------- > sage: integrate(f(x), x^2) > integrate( sin(x), x^2) > ------- > > > (A) will have some bad consequences like > > ----- > sage: h = sin(x) + integrate( sin(x), x) > sage: h.subs(x==2*x) > sin(2*x) - cos(2*x) > ----- > will work but > ----- > sage: h = sin(x) + integrate( sin(x)/x, x) > sage: h.subs(x==2*x) > ... > TypeError: ..... > ----- > > It would be bad if we don't allow even constant scaling > of variable in the integration. > > I guess, there are no ambiguity when it is an expression > containing single variable and we should process it as you > and Ondrej suggested. For other cases, we leave > it symbolic as Robert (Dodier) suggested.
I am personally fine with Robert Dodier's suggestion, i.e., A above and don't "damn the user". William --~--~---------~--~----~------------~-------~--~----~ To post to this group, send an email to [email protected] To unsubscribe from this group, send an email to [email protected] For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---
