Sponsored links: Algebra eBooks
 

Help Index

A

B

C

D

E

F

G

H

I

J

K

L

M

N

O

P

Q

R

S

T

U

V

W

X

Y

Z

The Maxima on-line user's manual

Algebra Calculator

Search:

Distrib 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.

load(distrib);
 n:10;
p:1/6;
versuche:1000 /* diese Anzahl sollte man variieren: 100,1000,10000,... die Ausführungsdauer steigt allerdings */;
anzahl_6:random_binomial(n,p,versuche);
load(descriptive);
gruppierung:discrete_freq(anzahl_6);
 X:gruppierung[1];
 H:gruppierung[2];
Verteilung: matrix( ["Anzahl der 6-er","Häufigkeit"],  [transpose(X),transpose(H)] );
plot2d([discrete, X, H]);
P:H/1000;
   emp:[discrete,X,P];
 plot2d(emp);
W(k):=binomial(n,k)*p**k*(1-p)**(n-k);
B:makelist(W(k),k,0,n);
 k:makelist(i,i,0,n);
liste:[discrete,k,B];
plot2d(liste);
plot2d(emp);

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) 

Distrib Example

Related Examples

distrib

distrib (x^2*(u2*x^(-...

distrib (x*(-1/2*x^(-...

Calculate

distrib

distrib((x-1)*(x-2)*(...

Calculate

distrib-load-numer

load(distrib);

u:0;

sigma:1;

Calculate

distrib-expand-kill-load

load (distrib);

expand(pdf_noncentral...

kill(all);

Calculate

distrib-exp-load-log-solve-sqrt

load(distrib);

eq1:S=-log(pdf_normal...

eq2: d1 = (-log(lev)+...

Calculate

distrib-length-load-sum

load(descriptive);

load(distrib);

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

Calculate

distrib-hypergeometric-load-numer

load(distrib);

load(descriptive);

pdf_hypergeometric(3,...

Calculate

distrib-load-numer

load(distrib);

quantile_normal(0.91,...

Calculate

distrib

f:(x+1)*x;

distrib(f);

Calculate

distrib-expand-linsolve

eq1:0=(x+2)*(-2*x^2-9);

distrib(eq1);

expand(%);

Calculate