I would make it a distinct object, so there isn't a relationship to the
usual signed Integral. The object would represent something like a Lebesgue
integral over a measurable set. There would also be expressions where the
integral might not be well-defined, so it would have to make certain
assumptions about the input.

Of course, to actually compute things, it might need to convert the
integral into a usual multidimensional signed Integral, since that is what
SymPy knows how to work with. Although SymPy's ability to operate on
multidimensional integrals is fairly limited and there might be better
algorithms that can be implemented there anyways.

Aaron Meurer

On Thu, Jun 6, 2024 at 7:19 AM Sangyub Lee <sylee...@gmail.com> wrote:

> 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 asme...@gmail.com 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 <mhgf...@gmail.com>
>> 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 sympy+un...@googlegroups.com.
>>> 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 sympy+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sympy/6debbd9e-6d5c-4e19-bc97-b8dcf283c7aen%40googlegroups.com
> <https://groups.google.com/d/msgid/sympy/6debbd9e-6d5c-4e19-bc97-b8dcf283c7aen%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 sympy+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/CAKgW%3D6LAOx3ebW5SrPf7SP-7-E3irRze3GdjTyZeRMJfC_vGKw%40mail.gmail.com.

Reply via email to