I think that there are other problems. If we generalize the domain of integral to set, it gives incompatible definition that what we had done before.
For example, Integral(f(x), (x, a, b)) and Integral(f(x), (x, b, a)) should have same value if you represent the domain as set, because the set is unordered, however, we lose the identity Integral(f(x), (x, a, b)) == -Integral(f(x), (x, b, a)) which had holded before On Wednesday, June 5, 2024 at 9:20:51 PM UTC+2 [email protected] wrote: > Not presently. There are objects representing sets in SymPy, but there > isn't anything to represent an integral over a set. The current Integral > class is hard-coded to support indefinite integrals or standard definite > integrals over signed intervals. > > You could make your own version of such a thing by making a custom > subclass of Expr. The question is what sort of operations you'd want the > object to support. > > Aaron Meurer > > On Wed, Jun 5, 2024 at 12:36 AM Michael Gfrerer <[email protected]> wrote: > >> One more try for the image: >> [image: setSimplify.png] >> On Wednesday, June 5, 2024 at 12:02:08 AM UTC+2 Michael Gfrerer wrote: >> >>> I would be interested in doing symbolic manipulation of integrals >>> involving unevaluated functions and symbolic integration domains. A >>> simplified problem looks like: >>> >>> >>> I can "typeset" the left-hand-side by: >>> >>> from sympy import * >>> x = Symbol('x') >>> u = Function('u')(x) >>> lhs = integrate(u, (x, 'Omega',)) + integrate(u, (x, Symbol(r'D >>> \setminus \Omega'),)) >>> >>> Obviously, it is not possible to simplify the lhs. Is there a object in >>> Sympy for D and \Omega to enable this? >>> >>> -- >> You received this message because you are subscribed to the Google Groups >> "sympy" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/sympy/09620b17-56ea-4427-be28-7130887f243cn%40googlegroups.com >> >> <https://groups.google.com/d/msgid/sympy/09620b17-56ea-4427-be28-7130887f243cn%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> > -- You received this message because you are subscribed to the Google Groups "sympy" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/6debbd9e-6d5c-4e19-bc97-b8dcf283c7aen%40googlegroups.com.
