Sponsored links: Algebra eBooks ### The Maxima on-line user's manual

Algebra Calculator

#### Search: #### Map

Function: map (<f>, <expr_1>, ..., <expr_n>) Returns an expression whose leading operator is the same as that of the expressions <expr_1>, ..., <expr_n> but whose subparts are the results of applying <f> to the corresponding subparts of the expressions. <f> is either the name of a function of n arguments or is a `lambda` form of n arguments. `maperror` - if `false` will cause all of the mapping functions to (1) stop when they finish going down the shortest <expr_i> if not all of the <expr_i> are of the same length and (2) apply <f> to [<expr_1>, <expr_2>, ...] if the <expr_i> are not all the same type of object. If `maperror` is `true` then an error message will be given in the above two instances.

One of the uses of this function is to `map` a function (e.g. `partfrac`) onto each term of a very large expression where it ordinarily wouldnt be possible to use the function on the entire expression due to an exhaustion of list storage space in the course of the computation.

```          (%i1) map(f,x+a*y+b*z);
(%o1)                        f(b z) + f(a y) + f(x)
(%i2) map(lambda([u],partfrac(u,x)),x+1/(x^3+4*x^2+5*x+2));
1       1        1
(%o2)                     ----- - ----- + -------- + x
x + 2   x + 1          2
(x + 1)
(%i3) map(ratsimp, x/(x^2+x)+(y^2+y)/y);
1
(%o3)                            y + ----- + 1
x + 1
(%i4) map("=",[a,b],[-0.5,3]);
(%o4)                          [a = - 0.5, b = 3]```

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

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

### Related Examples

##### map

map(log,[1,2,3]);

Calculate

? map;

Calculate

##### map

c(n,k):=n!/(k!*(n-k)!);

c(45,6);

c(49,6);

Calculate

##### map-plot2d-rhs-solve A:[0,1000];

B:[50,3000];

C:[80,6000];

Calculate

##### map

f(x):=(x^2+4*x+3)*x^2;

Intervall:[[4,6],[-6,...

dx(x):=x-x;

Calculate

##### map-solve

eq1: solve([2^(-n)=16...

ta: map (k, eq1);

Calculate

Fg:G*me*mm/rm^2;

Fz:mm*rm*w^2;

H:me*re=mm*rm;

Calculate

##### map

mindestflaeche:1000;

hoechstpreis:100000;

grundstueck:[[30,30,9...

Calculate

##### map

berechnung(x):=[2*x,x...

ergebnis:map(berechnu...

Calculate

##### map-print-subst

g(x) := x^2 + 1;

g(2);

xwerte : [-2,-1,0,1,2];

Calculate 