Issue 2571 in sympy: Regression in Integral.subs

2011-07-18 Thread sympy
Status: Accepted Owner: asmeurer CC: smi...@gmail.com Labels: Type-Defect Priority-High Integration New issue 2571 by asmeurer: Regression in Integral.subs http://code.google.com/p/sympy/issues/detail?id=2571 This used to work: In [1]: Integral((exp(x*log(x))*log(x)), x).subs(exp(x*log(x)), x**

Re: Issue 2571 in sympy: Regression in Integral.subs

2012-02-28 Thread sympy
Comment #14 on issue 2571 by smi...@gmail.com: Regression in Integral.subs http://code.google.com/p/sympy/issues/detail?id=2571 Just a footnote here: xreplace is now available Integral((exp(x*log(x))*log(x)), x).xreplace({exp(x*log(x)): x**x}) Integral(x**x*log(x), x) With it, you can shoot

Re: Issue 2571 in sympy: Regression in Integral.subs

2012-02-28 Thread sympy
Comment #15 on issue 2571 by asmeu...@gmail.com: Regression in Integral.subs http://code.google.com/p/sympy/issues/detail?id=2571 I still think subs should just do this. Substituting terms inside of integrals is very useful, and this limitation is artificial and unnecessary. -- You received

Re: Issue 2571 in sympy: Regression in Integral.subs

2012-02-28 Thread sympy
Comment #16 on issue 2571 by asmeu...@gmail.com: Regression in Integral.subs http://code.google.com/p/sympy/issues/detail?id=2571 That is to say, even for definite integrals it should work. I found myself wanting to do this quite a bit a while ago when working with solving PDEs with integral

Re: Issue 2571 in sympy: Regression in Integral.subs

2012-02-28 Thread sympy
Comment #17 on issue 2571 by smi...@gmail.com: Regression in Integral.subs http://code.google.com/p/sympy/issues/detail?id=2571 Why not just do i = my_integral inew = i.func(i.function.subs(old, new), i.limits) Otherwise you have to come up with an acceptable criteria to govern the rules of th

Re: Issue 2571 in sympy: Regression in Integral.subs

2012-02-28 Thread sympy
Comment #18 on issue 2571 by asmeu...@gmail.com: Regression in Integral.subs http://code.google.com/p/sympy/issues/detail?id=2571 I think we already discussed this. That doesn't work so well if the integral is nested inside an expression. Let's just do the substitution if it works, and raise

Re: Issue 2571 in sympy: Regression in Integral.subs

2012-02-28 Thread sympy
Comment #19 on issue 2571 by smi...@gmail.com: Regression in Integral.subs http://code.google.com/p/sympy/issues/detail?id=2571 Regarding the nesting...that's where xreplace can be used where the transform acts on all Integrals that are in the expression. If you look at how Ronan implemented

Re: Issue 2571 in sympy: Regression in Integral.subs

2012-02-28 Thread sympy
Comment #20 on issue 2571 by asmeu...@gmail.com: Regression in Integral.subs http://code.google.com/p/sympy/issues/detail?id=2571 I guess I would expect that to give Integral(y, (y, y**2)). I get that the user might expect it to do something smart with a change of variables (e.g., with Integr

Re: Issue 2571 in sympy: Regression in Integral.subs

2012-02-29 Thread sympy
Updates: Labels: NeedsReview smichr Comment #21 on issue 2571 by smi...@gmail.com: Regression in Integral.subs http://code.google.com/p/sympy/issues/detail?id=2571 https://github.com/sympy/sympy/pull/690 -- You received this message because you are subscribed to the Google Groups "symp

Re: Issue 2571 in sympy: Regression in Integral.subs

2012-03-16 Thread sympy
Updates: Status: Fixed Comment #22 on issue 2571 by smi...@gmail.com: Regression in Integral.subs http://code.google.com/p/sympy/issues/detail?id=2571 (No comment was entered for this change.) -- You received this message because you are subscribed to the Google Groups "sympy-issues" g

Re: Issue 2571 in sympy: Regression in Integral.subs

2012-03-16 Thread sympy
Updates: Status: Accepted Labels: -NeedsReview -smichr Comment #23 on issue 2571 by asmeu...@gmail.com: Regression in Integral.subs http://code.google.com/p/sympy/issues/detail?id=2571 Sorry, but I still think this isn't powerful enough. The expression from the original post n

Re: Issue 2571 in sympy: Regression in Integral.subs

2012-03-16 Thread sympy
Issue 2571: Regression in Integral.subs http://code.google.com/p/sympy/issues/detail?id=2571 This issue is no longer blocking issue 2010. See http://code.google.com/p/sympy/issues/detail?id=2010 -- You received this message because you are listed in the owner or CC fields of this issue, or becaus

Re: Issue 2571 in sympy: Regression in Integral.subs

2012-04-18 Thread sympy
Comment #26 on issue 2571 by smi...@gmail.com: Regression in Integral.subs http://code.google.com/p/sympy/issues/detail?id=2571 So could the rule be: 1) allow subs(x, u) always and it changes x to u everywhere 2) allow subs(f(x), f(x)) as long as x does not appear in any limit as a limit (but

Re: Issue 2571 in sympy: Regression in Integral.subs

2012-04-18 Thread sympy
Comment #27 on issue 2571 by smi...@gmail.com: Regression in Integral.subs http://code.google.com/p/sympy/issues/detail?id=2571 I tried to make the first change by inserting as the first line of Integral._eval_subs, the following: if old.is_Symbol and new.is_Symbol and not \

Re: Issue 2571 in sympy: Regression in Integral.subs

2011-07-18 Thread sympy
Issue 2571: Regression in Integral.subs http://code.google.com/p/sympy/issues/detail?id=2571 This issue is now blocking issue 2010. See http://code.google.com/p/sympy/issues/detail?id=2010 -- You received this message because you are listed in the owner or CC fields of this issue, or because you

Re: Issue 2571 in sympy: Regression in Integral.subs

2011-07-19 Thread sympy
Comment #2 on issue 2571 by smi...@gmail.com: Regression in Integral.subs http://code.google.com/p/sympy/issues/detail?id=2571 Nothing involving dummy symbols is changed anymore. If you look at the integral with the as_dummy() method you can see what variables are "off limits": >>> Int

Re: Issue 2571 in sympy: Regression in Integral.subs

2011-07-19 Thread sympy
Comment #3 on issue 2571 by asmeurer: Regression in Integral.subs http://code.google.com/p/sympy/issues/detail?id=2571 Well, this needs to be changed. This makes sense for definite integrals, but not for indefinite integrals, where the integration variable is free. -- You received this mess

Re: Issue 2571 in sympy: Regression in Integral.subs

2011-07-19 Thread sympy
Comment #4 on issue 2571 by smi...@gmail.com: Regression in Integral.subs http://code.google.com/p/sympy/issues/detail?id=2571 I'm willing to look at any sensible rewrite. -- You received this message because you are subscribed to the Google Groups "sympy-issues" group. To post to this group,

Re: Issue 2571 in sympy: Regression in Integral.subs

2011-07-20 Thread sympy
Comment #5 on issue 2571 by smi...@gmail.com: Regression in Integral.subs http://code.google.com/p/sympy/issues/detail?id=2571 Should `Integral(x, x).subs(x, 5).doit()` be 25 or 25/2? You get 25 if you allow subs to target the dummy x of the integrand and the x of the limit `Integral(x, (x,

Re: Issue 2571 in sympy: Regression in Integral.subs

2011-07-20 Thread sympy
Comment #6 on issue 2571 by asmeurer: Regression in Integral.subs http://code.google.com/p/sympy/issues/detail?id=2571 The way I see it, there should be no dummies involved with indefinite integrals. On the other hand, it doesn't make sense to allow substitution in the integration variable

Re: Issue 2571 in sympy: Regression in Integral.subs

2011-07-21 Thread sympy
Comment #7 on issue 2571 by renato.c...@gmail.com: Regression in Integral.subs http://code.google.com/p/sympy/issues/detail?id=2571 I think `Integral(x, x).subs(x, 5).doit()` is analogous to `Derivative(f(x), x).subs(x, 5)`. There's no sense putting the 5 inside the Integral, so either we

Re: Issue 2571 in sympy: Regression in Integral.subs

2011-07-21 Thread sympy
Comment #8 on issue 2571 by asmeurer: Regression in Integral.subs http://code.google.com/p/sympy/issues/detail?id=2571 There's no sense putting the 5 inside the Integral Yes there is. Why should I be prevented from substituting some nested part of an expression just because it happens to l

Re: Issue 2571 in sympy: Regression in Integral.subs

2011-07-21 Thread sympy
Updates: Cc: renato.c...@gmail.com Comment #9 on issue 2571 by asmeurer: Regression in Integral.subs http://code.google.com/p/sympy/issues/detail?id=2571 So I see your issue, though. There are two ideas of what subs should do. One is evaluating the expression at a point, and the othe

Re: Issue 2571 in sympy: Regression in Integral.subs

2011-07-21 Thread sympy
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

Re: Issue 2571 in sympy: Regression in Integral.subs

2011-07-21 Thread sympy
Comment #11 on issue 2571 by asmeurer: Regression in Integral.subs http://code.google.com/p/sympy/issues/detail?id=2571 OK, to be clear, I agree that we should not replace integration/differentiation variables with subs (or anything else where only a Symbol make sense). I'm not sure if sub

Re: Issue 2571 in sympy: Regression in Integral.subs

2011-07-22 Thread sympy
Comment #12 on issue 2571 by smi...@gmail.com: Regression in Integral.subs http://code.google.com/p/sympy/issues/detail?id=2571 This is what I refer to as 'post-subs semantics', I believe, in the discussion of what subs should do. -- You received this message because you are subscribed to the G

Re: Issue 2571 in sympy: Regression in Integral.subs

2011-07-22 Thread sympy
Comment #13 on issue 2571 by smi...@gmail.com: Regression in Integral.subs http://code.google.com/p/sympy/issues/detail?id=2571 And Ronan's comments are probably apropos here: rather than trying to control this with keywords, perhaps semantically distinc functions should be created. -- You rece