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

Algebra Calculator

#### Listofvars

Function: listofvars (<expr>) Returns a list of the variables in <expr>.

`listconstvars` if `true` causes `listofvars` to include `%e`, `%pi`, `%i`, and any variables declared constant in the list it returns if they appear in <expr>. The default is to omit these.

See also the option variable `listdummyvars` to exclude or include "dummy variables" in the list of variables.

```          (%i1) listofvars (f (x[1]+y) / g^(2+a));
(%o1)                     [g, a, x , y]
1```

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

### Related Examples

##### listofvars-op

eq: x!*(x-y)!/(y-1)!;

listofvars(eq);

op(eq);

Calculate

Calculate

##### listofvars

lst: listofvars(k*x*m...

lst2: [F, k, t, x, m];

is(lst=lst2);

Calculate

##### listofvars-sort

lst: sort(listofvars(...

lst2: sort([F, k, t, ...

is(list = lst2);

Calculate

listofvars(sqrt(1+sqr...

sqrtdenest((sqrt(3-2*...

Calculate

##### listofvars

listofvars(k*x*m/(t^2...

Calculate

##### listofvars-sqrt

listofvars(sqrt(1+sqr...

sqdenst(sqrt(3-2*sqrt...

Calculate

Calculate

Calculate