### The Maxima on-line user's manual

Algebra Calculator

#### Distribute_over

-- Option variable: distribute_over Default value: `true`

`distribute_over` controls the mapping of functions over bags like lists, matrices, and equations. At this time this feature is implemented for the trigonometric functions, the exponential integrals, and the integer functions like `mod`, `floor`, `ceiling`, `round`.

The mapping of functions is switched off, when setting `distribute_over` to the value `false`.

Examples:

The `sin` function maps over a list:

```          (%i1) sin([x,1,1.0]);
(%o1)                 [sin(x), sin(1), .8414709848078965]```

`mod` is a function with two arguments which maps over lists. Mapping over nested lists is possible too:

```          (%i2) mod([x,11,2*a],10);
(%o2)                    [mod(x, 10), 1, 2 mod(a, 5)]
(%i3) mod([[x,y,z],11,2*a],10);
(%o3)       [[mod(x, 10), mod(y, 10), mod(z, 10)], 1, 2 mod(a, 5)]```

Mapping of the `floor` function over a matrix and an equation:

```          (%i4) floor(matrix([a,b],[c,d]));
[ floor(a)  floor(b) ]
(%o4)                       [                    ]
[ floor(c)  floor(d) ]
(%i5) floor(a=b);
(%o5)                         floor(a) = floor(b)```

Functions with more than one argument map over any of the arguments or all arguments:

```          (%i6) expintegral_e([1,2],[x,y]);
(%o6) [[expintegral_e(1, x), expintegral_e(1, y)],
[expintegral_e(2, x), expintegral_e(2, y)]]```

```(%o1)                                true
(%i2) ```

### Related Examples

##### distribute_over

eq1: a*x + b*y + c*z ...

eq2: d*x + e*y + f*z ...

eq3: g*x + h*y + i*z ...

Calculate

##### distribute_over

? distribute_over;

Calculate

##### distribute_over-matrix

eq1: a*x + b*y + c*z ...

eq2: d*x + e*y + f*z ...

eq3: g*x + h*y + i*z ...

Calculate

##### distribute_over

eq1: a*x + b*y + c*z ...

eq2: d*x + e*y + f*z ...

eq3: g*x + h*y + i*z ...

Calculate

##### distribute_over

eq1: a*x + b*y + c*z ...

eq2: d*x + e*y + f*z ...

eq3: g*x + h*y + i*z ...

Calculate

##### distribute_over

? distribute_over;

Calculate

##### distribute_over-matrix

eq1: a*x + b*y + c*z ...

eq2: d*x + e*y + f*z ...

eq3: g*x + h*y + i*z ...

Calculate

##### distribute_over

eq1: a*x + b*y + c*z ...

eq2: d*x + e*y + f*z ...

eq3: g*x + h*y + i*z ...

Calculate