Issue 3716 in sympy: Integrals over non-interval sets

2013-03-26 Thread sympy
Status: Valid Owner: Labels: Type-Enhancement Priority-Medium Integration Sets New issue 3716 by mrock...@gmail.com: Integrals over non-interval sets http://code.google.com/p/sympy/issues/detail?id=3716 integrate supports the following syntax integrate(integrand, (symbol, set)) e.g. integr

Re: Issue 3716 in sympy: Integrals over non-interval sets

2013-03-26 Thread sympy
Issue 3716: Integrals over non-interval sets http://code.google.com/p/sympy/issues/detail?id=3716 This issue is now blocking issue sympy:3711. See http://code.google.com/p/sympy/issues/detail?id=3711 -- You received this message because you are listed in the owner or CC fields of this issue, or

Re: Issue 3716 in sympy: Integrals over non-interval sets

2013-03-26 Thread sympy
Comment #2 on issue 3716 by asmeu...@gmail.com: Integrals over non-interval sets http://code.google.com/p/sympy/issues/detail?id=3716 Wow, I didn't know we could do that. For integral over a finite set, wouldn't that always be 0? Regardless, we should allow it. -- You received this mess

Re: Issue 3716 in sympy: Integrals over non-interval sets

2013-03-26 Thread sympy
Comment #3 on issue 3716 by mrock...@gmail.com: Integrals over non-interval sets http://code.google.com/p/sympy/issues/detail?id=3716 This comes up in stats. Queries like P(X**2 > 1) produce an integrand (the probability density function) and the domain (in this case the union x < -1 U x

Re: Issue 3716 in sympy: Integrals over non-interval sets

2013-03-26 Thread sympy
Comment #4 on issue 3716 by asmeu...@gmail.com: Integrals over non-interval sets http://code.google.com/p/sympy/issues/detail?id=3716 Are sets able to rewrite themselves as a union of intervals? Also, care is needed. Integral(f(x), (x, Union(Interval(a, b), Interval(c, d))) is not the same

Re: Issue 3716 in sympy: Integrals over non-interval sets

2013-03-26 Thread sympy
Comment #5 on issue 3716 by asmeu...@gmail.com: Integrals over non-interval sets http://code.google.com/p/sympy/issues/detail?id=3716 Also, I'm not sure what the mathematically correct thing do to with a delta function over a finite set is. From the definition I've seen, all integrals are

Re: Issue 3716 in sympy: Integrals over non-interval sets

2013-03-26 Thread sympy
Comment #6 on issue 3716 by mrock...@gmail.com: Integrals over non-interval sets http://code.google.com/p/sympy/issues/detail?id=3716 Are sets able to rewrite themselves as a union of intervals? I don't believe so, no. I think Interval(a, a) is actually transformed into FiniteSet(a).

Re: Issue 3716 in sympy: Integrals over non-interval sets

2013-03-26 Thread sympy
Comment #7 on issue 3716 by asmeu...@gmail.com: Integrals over non-interval sets http://code.google.com/p/sympy/issues/detail?id=3716 The real issue is that Interval(b, a) represents the empty set when b > a but Integral(f(x), (x, b, a)) = -Integral(f(x), (x, a, b)). The best I can think

Re: Issue 3716 in sympy: Integrals over non-interval sets

2013-03-26 Thread sympy
Comment #8 on issue 3716 by mrock...@gmail.com: Integrals over non-interval sets http://code.google.com/p/sympy/issues/detail?id=3716 I think when using integrate(integrand, (symbol, interval)) you're assuming the positive case. This case can be clearly selected by using (symbol, interva

Re: Issue 3716 in sympy: Integrals over non-interval sets

2013-03-26 Thread sympy
Comment #9 on issue 3716 by asmeu...@gmail.com: Integrals over non-interval sets http://code.google.com/p/sympy/issues/detail?id=3716 I mean with a, b, c, and d symbolic. I guess NotImplementedError is ok for those. It will still solve issue 3711 for explicit inputs. -- You received this