Sponsored links: Algebra eBooks
 

Related

listofvars-sqrt

listofvars(sqrt(1+sqr...

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

Calculate

listofvars-load-sqrt

listofvars(sqrt(1+sqr...

load(sqdnst);

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

Calculate

listofvars

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

listofvars(eq);

Calculate

listofvars-radcan-sqrt

listofvars(sqrt(1+sqr...

radcan(sqrt(3-2*sqrt(...

Calculate

listofvars-load-sqrt

listofvars(sqrt(1+sqr...

load(sqdnst);

sqrtdenest(sqrt((sqrt...

Calculate

listofvars

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

Calculate

listofvars-load-sqrt

listofvars(sqrt(1+sqr...

load(sqdnst);

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

Calculate

listofvars

answer:x+y=1;

listofvars(answer);

is(listofvars(answer)...

Calculate

listofvars

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

listofvars(eq);

Calculate

listofvars-load-sqrt

listofvars(sqrt(1+sqr...

load(sqdnst);

sqrtdenest((sqrt(3-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