Comment #10 on issue 2571 by renato.c...@gmail.com: Regression in Integral.subs
http://code.google.com/p/sympy/issues/detail?id=2571

There's no sense putting the 5 inside the Integral

Sorry, what I meant here was: there's no sense in integrating wrt a number (that's why I said it should raise), so when you use subs(x, 5) on an Integral, you can only mean one of two things:

* evaluate the expression at x=5 (gives current result, Integral(x, (x, 5)) - I overlooked this form of expressing this, Subs is not needed)

* replace all occurrences of x in the integrand with 5.

As you noted, I tend to think of subs() as an "eval" function. In particular, I expect that if mathematically a == b (f.e. if a.doit() == b), then we should have a.subs(old, new) == b.subs(old, new) (mathematically). I'm not sure if subs() currently satisfies this, but it may if old is a Symbol.

The documentation of subs() doesn't clarify if the relation above should hold or not, I think different people are using subs() with different meanings in mind, which certainly confuses matters. In case we go with "subs() replaces anywhere in the expression irrespective of mathematical meaning", I think we should implement an alternative that does keep the mathematical equality.

--
You received this message because you are subscribed to the Google Groups 
"sympy-issues" group.
To post to this group, send email to sympy-issues@googlegroups.com.
To unsubscribe from this group, send email to 
sympy-issues+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sympy-issues?hl=en.

Reply via email to