Integration over a set
This functionality does not run in MATLAB.
intlib::intOverSet(f, x, S)
intlib::intOverSet(f, x, S) computes the integral where iS(x) is the indicator function of the set S.
If S is an interval with a ≤ b, the call is equivalent to int(f, x=a..b). However, by definition, interchanging the borders to int(f, x=b..a) just reverses the sign of the latter while is empty and any integral over the empty set is zero.
The function may return unevaluated if the integral could not be computed.
For intervals, calling intlib::intOverSet is just equivalent to calling definite integration:
int(1/x, x=1..2), intlib::intOverSet(1/x, x, Dom::Interval(1, 2))
If the lower border is greater than the upper, this does not hold anymore:
int(1/x, x=2..1), intlib::intOverSet(1/x, x, Dom::Interval(2, 1))
In more complex cases, the function returns unevaluated:
intlib::intOverSet(1/x^2, x, solve(t > sin(t), t))