Documentation

# `intlib`::`intOverSet`

Integration over a set

MuPAD® notebooks will be removed in a future release. Use MATLAB® live scripts instead.

MATLAB live scripts support most MuPAD functionality, though there are some differences. For more information, see Convert MuPAD Notebooks to MATLAB Live Scripts.

## Syntax

```intlib::intOverSet(`f`, `x`, `S`)
```

## Description

`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 ab, 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.

## Examples

### Example 1

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))`
` `

### Example 2

In more complex cases, the function returns unevaluated:

`intlib::intOverSet(1/x^2, x, solve(t > sin(t), t))`
` `

## Parameters

 `f` Arithmetical expression `x` Identifier `S` Set-theoretic expression

## Return Values

Arithmetical expression.