Documentation

# `solvelib`::`Union`

Union of a system of sets

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

```solvelib::Union(`set`, `param`, `paramset`)
solvelib::Union(`set`, `paramlist`, `vectorset`)
```

## Description

`solvelib::Union (set, paramlist, vectorset)` returns the set of all objects that can be obtained by replacing, in some element of `set`, the list of free parameters `paramlist` by an element of `vectorset`.

`set` may be a set of any type; it need not depend on the parameter `param`, and it may also contain other free parameters.

`paramset` may be a set of any type and may depend on some free parameters. See Example 1.

If `paramset` is empty, the result is the empty set. Overloading has no effect in this case.

`vectorset` may be a set of any type, consisting of vectors whose dimension equals the number of variables in `paramlist`.

## Examples

### Example 1

We compute the set of all numbers that are equal to k + 1 or k + 3 for k = 2, k = 4, or k = l, where l is a free parameter.

`solvelib::Union({k+1, k+3}, k, {2,4,l});`
` `

### Example 2

In the same way, we can let a pair of parameters range over a set of pairs:

```solvelib::Union(Dom::ImageSet(PI*k + exp(x) + y, k, Z_), [x, y], {[3, 2], [1, 4]})```
` `

## Parameters

 `set` Set of any type `param` Identifier `paramset` Set of any type `paramlist` List of identifiers `vectorset` Set of vectors

## Return Values

`solvelib::Union` returns a set of any type; see `solve` for an overview of the different types of sets. It may also return the unevaluated call if the union could not be computed.

`set`