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

Algebra Calculator

#### First

Function: first (<expr>) Returns the first part of <expr> which may result in the first element of a list, the first row of a matrix, the first term of a sum, etc. Note that `first` and its related functions, `rest` and `last`, work on the form of <expr> which is displayed not the form which is typed on input. If the variable `inflag` is set to `true` however, these functions will look at the internal form of <expr>. Note that the simplifier re-orders expressions. Thus `first(x+y)` will be `x` if `inflag` is `true` and `y` if `inflag` is `false` (`first(y+x)` gives the same results). The functions `second` .. `tenth` yield the second through the tenth part of their input argument.

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

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

### Related Examples

##### first-linsolve-rhs

eq1:x*4+y-2=y;

eq2:x+2=y;

uno:linsolve([eq1,eq2...

Calculate

##### first-solve

f:(x/a)^2+(y/b)^2;

f1: f,x=4.5,y=2929/3600;

f2: f,x=2.3,y=89/400;

Calculate

##### first-fullratsimp-solve

eq_v1: gr1*(v1-x) - (...

eq_v2: (gl1*(v2-v1)+i...

eq_a: fullratsimp(fir...

Calculate

##### first-kill-last-length-plot2d-rhs-second-solve-sum

x:[-2,-1,1,2,3];

/* x-Werte (aufsteig...

/* y-Werte */xlist:x;

Calculate

##### first-fullratsimp-solve

eq_v1: gr1*(v1-x) - (...

eq_v2: (gl1*(v2-v1)+i...

fullratsimp(first(sol...

Calculate

##### first-ifactors-lambda-map-phi-product-rest

phi(n) := map(lambda(...

phi(10) ;

product(i, i, 1, 3) ;

Calculate

##### first-fullratsimp-solve

eq_v1: gr1*(v1-x) - (...

eq_v2: (gl1*(v2-v1)+i...

eq_a: fullratsimp(fir...

Calculate

##### first-solve

eq_out : i_oa - (in_n...

eq_in_pos : (in_pos -...

eq_in_neg : (vin2 - i...

Calculate

##### first-ratsimp-second-solve

eq_out : i_oa - (in_n...

eq_in_pos : (in_pos -...

eq_in_neg : -(vin1 - ...

Calculate

##### first-solve

eq_x: -(gc1*(y-0)-ic1...

eq_v1: (gc3*(v1-0)-ic...

eq_v2: -(gc2*(y-v2)-i...

Calculate