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

Algebra Calculator

#### Distrib

Function: distrib (<expr>) Distributes sums over products. It differs from `expand` in that it works at only the top level of an expression, i.e., it doesnt recurse and it is faster than `expand`. It differs from `multthru` in that it expands all sums at that level.

Examples:

```          (%i1) distrib ((a+b) * (c+d));
(%o1)                 b d + a d + b c + a c
(%i2) multthru ((a+b) * (c+d));
(%o2)                 (b + a) d + (b + a) c
(%i3) distrib (1/((a+b) * (c+d)));
1
(%o3)                    ---------------
(b + a) (d + c)
(%i4) expand (1/((a+b) * (c+d)), 1, 0);
1
(%o4)                 ---------------------
b d + a d + b c + a c```

There are also some inexact matches for `distrib`. Try `?? distrib` to see them.

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

### Related Examples

expand(pdf_noncentral...

kill(all);

Calculate

17*2;

20*3;

Calculate

f(x):=pdf_normal(x,2,...

plot2d([f(x)],[x,0,4....

Calculate

d1(lev,r,t,sig) := (-...

d2(lev,r,t,sig) := d1...

Calculate

cdf_hypergeometric(1,...

Calculate

urliste:[1,1,3,2,4,5,...

Calculate

data: [1455.84,1091.8...

Calculate

f:(a+b)*(c+d);

distrib(f);

Calculate

##### distrib-simp

s1 + s2 + 0.5*d - s1 ...

Calculate