### Related

eq:x[t]+y[s]+2;

listofvars(eq);

Calculate

##### listofvars-ratvars

listofvars(x^2+2*x+1);

ratvars(x^2+2*x+1);

Calculate

##### listofvars

listofvars(F=k*x*m/(t...

Calculate

Calculate

? listofvars;

Calculate

##### listofvars

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

Calculate

##### listofvars

Calculate

listofvars(sqrt(1+sqr...

sqrtdenest(sqrt((sqrt...

Calculate

##### listofvars

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

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

is(lst=lst2);

Calculate

##### listofvars

listofvars(df_u[1,2]);

Calculate

### listofvars

Run Example
```(%i1)/* check denominator */expr: ratexpand(a*x^2*y^2*u10*P+b*u01^2*P*Q);
2              2  2
(%o1)                     b u01  P Q + a u10 x  y  P
(%i2) alist: args(expr);
2             2  2
(%o2)                     [b u01  P Q, a u10 x  y  P]
(%i3) alistlen: length(alist);
(%o3)                                  2
(%i4) blist: makelist(args(alist[ii]),ii,1,alistlen);
2                   2   2
(%o4)               [[b, u01 , P, Q], [a, u10, x , y , P]]
(%i5) clist: makelist(listofvars(alist[ii]),ii,1,alistlen);
(%o5)                 [[b, u01, P, Q], [a, u10, x, y, P]]
(%i6) ```
Run Example
```diffetak(n,eta,[idx]):=block(    [k,leq,i,leqlen,neq,j,tmp,varlist,varlistlen,deglist],        if length(idx)=0 then (        k: 1    )    else (        k: idx[1]    ),        if n=0 then return(eta[k]),    if n=1 then return(eta[k+1]-eta[k]*eta[1]),    leq: eta[k+1]-eta[k]*eta[1],    for i:2 thru n do (        leqlen: length(leq),        neq: 0,        for j:1 thru leqlen do (            tmp: part(leq,j),            varlist: listofvars(tmp),            varlistlen: length(varlist),            deglist: makelist(hipow(tmp,varlist[ii]),ii,1,varlistlen),            idxlist: makelist(part(varlist[ii],1),ii,1,varlistlen),            neq: neq+sum(tmp/varlist[ii]*(eta[idxlist[ii]+1]-eta[idxlist[ii]]*eta[1])*deglist[ii],ii,1,varlistlen)        ),        leq: expand(neq)    ),        return(leq));
(%o1) diffetak(n, eta, [idx]) := block([k, leq, i, leqlen, neq, j, tmp,
varlist, varlistlen, deglist], if length(idx) = 0 then k : 1 else k : idx ,
1
if n = 0 then return(eta ), if n = 1 then return(eta      - eta  eta ),
k                           k + 1      k    1
leq : eta      - eta  eta , for i from 2 thru n
k + 1      k    1
do (leqlen : length(leq), neq : 0, for j thru leqlen
do (tmp : part(leq, j), varlist : listofvars(tmp),
varlistlen : length(varlist), deglist :
makelist(hipow(tmp, varlist  ), ii, 1, varlistlen),
ii
idxlist : makelist(part(varlist  , 1), ii, 1, varlistlen),
ii
tmp
neq : neq + sum(--------- (eta              - eta          eta ) deglist  ,
varlist       idxlist   + 1      idxlist      1         ii
ii            ii                 ii
ii, 1, varlistlen)), leq : expand(neq)), return(leq))
(%i2) diffetak(2,eta,k);
2
(%o2)        eta      - 2 eta  eta      - eta  eta  + 2 eta  eta
k + 2        1    k + 1      2    k        1    k
(%i3) ```
Run Example
```diffetak(n,eta,[idx]):=block(    [k,leq,i,leqlen,neq,j,tmp,varlist,varlistlen,deglist],        if length(idx)=0 then (        k: 1    )    else (        k: idx[1]    ),        if n=0 then return(eta[k]),    if n=1 then return(eta[k+1]-eta[k]*eta[1]),    leq: eta[k+1]-eta[k]*eta[1],    for i:2 thru n do (        leqlen: length(leq),        neq: 0,        for j:1 thru leqlen do (            tmp: part(leq,j),            varlist: listofvars(tmp),            varlistlen: length(varlist),            deglist: makelist(hipow(tmp,varlist[ii]),ii,1,varlistlen),            idxlist: makelist(part(varlist[ii],1),ii,1,varlistlen),            neq: neq+sum(tmp/varlist[ii]*(eta[idxlist[ii]+1]-eta[idxlist[ii]]*eta[1])*deglist[ii],ii,1,varlistlen)        ),        leq: expand(neq)    ),        return(leq));
(%o1) diffetak(n, eta, [idx]) := block([k, leq, i, leqlen, neq, j, tmp,
varlist, varlistlen, deglist], if length(idx) = 0 then k : 1 else k : idx ,
1
if n = 0 then return(eta ), if n = 1 then return(eta      - eta  eta ),
k                           k + 1      k    1
leq : eta      - eta  eta , for i from 2 thru n
k + 1      k    1
do (leqlen : length(leq), neq : 0, for j thru leqlen
do (tmp : part(leq, j), varlist : listofvars(tmp),
varlistlen : length(varlist), deglist :
makelist(hipow(tmp, varlist  ), ii, 1, varlistlen),
ii
idxlist : makelist(part(varlist  , 1), ii, 1, varlistlen),
ii
tmp
neq : neq + sum(--------- (eta              - eta          eta ) deglist  ,
varlist       idxlist   + 1      idxlist      1         ii
ii            ii                 ii
ii, 1, varlistlen)), leq : expand(neq)), return(leq))
(%i2) diffetak(2,eta,1);
3
(%o2)                     eta  - 3 eta  eta  + 2 eta
3        1    2        1
(%i3) ```

### Related Help

Help for Listofvars