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

Algebra Calculator

#### Allbut

-- Keyword: allbut works with the `part` commands (i.e. `part`, `inpart`, `substpart`, `substinpart`, `dpart`, and `lpart`). For example,

```          (%i1) expr : e + d + c + b + a;
(%o1)                   e + d + c + b + a
(%i2) part (expr, [2, 5]);
(%o2)                         d + a```

while

```          (%i1) expr : e + d + c + b + a;
(%o1)                   e + d + c + b + a
(%i2) part (expr, allbut (2, 5));
(%o2)                       e + c + b```

`allbut` is also recognized by `kill`.

```          (%i1) [aa : 11, bb : 22, cc : 33, dd : 44, ee : 55];
(%o1)                 [11, 22, 33, 44, 55]
(%i2) kill (allbut (cc, dd));
(%o0)                         done
(%i1) [aa, bb, cc, dd];
(%o1)                   [aa, bb, 33, 44]```

`kill(allbut(<a_1>, <a_2>, ...))` has the effect of `kill(all)` except that it does not kill the symbols <a_1>, <a_2>, ... .

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

### Related Examples

##### allbut-kill-part

expr : e + d + c + b ...

part (expr, [2, 5]);

expr : e + d + c + b...

Calculate

? allbut;

Calculate

##### allbut-constant-cos-declare-derivabbrev-diff-mainvar-sin-solve-subst-true

derivabbrev:true ;

declare (t, mainvar);

declare (m, constant);

Calculate

##### allbut-cos-derivabbrev-diff-sin-subst-true

derivabbrev:true ;

x(t):= r(t)*sin(theta...

y(t):=r(t)*cos(theta(...

Calculate

##### allbut-constant-cos-declare-derivabbrev-diff-mainvar-sin-solve-true

derivabbrev:true ;

declare (t, mainvar);

declare (m, constant);

Calculate

##### allbut-constant-cos-declare-derivabbrev-diff-mainvar-sin-solve-true

derivabbrev:true ;

declare (t, mainvar);

declare (m, constant);

Calculate

##### allbut-kill-part

expr : e + d + c + b ...

part (expr, [2, 5]);

expr : e + d + c + b...

Calculate

##### allbut-cos-derivabbrev-diff-sin-subst-true

derivabbrev:true ;

x(t):= r(t)*sin(theta...

y(t):=r(t)*cos(theta(...

Calculate

##### allbut-cos-derivabbrev-diff-sin-subst-true

derivabbrev:true ;

x(t):= r(t)*sin(theta...

y(t):=r(t)*cos(theta(...

Calculate

? allbut;

Calculate