Sponsored links: Algebra eBooks
 

Related

endcons

endcons (0,[1]);

Calculate

endcons

endcons (1,[]);

Calculate

endcons

c: makelist[pon,uto,p...

d: endcons([sri,cet,n...

Calculate

endcons

endcons (0,[1]);

Calculate

endcons

endcons (1,[]);

Calculate

endcons

c: makelist[pon,uto,p...

d: endcons([sri,cet,n...

Calculate

endcons

Run Example
(%i1)list_of_derivatives(x) := block([result : []], scanmap(lambda([x], if not atom(x) then result : endcons(x, result), x), x), result);
(%o1) list_of_derivatives(x) := block([result : []], 
scanmap(lambda([x], if not atom(x) then result : endcons(x, result), x), x), 
result)
(%i2) list_of_derivatives('diff(y,x,2)+y*'diff(y,z,3)+x^2*'diff(y,x,1,y,2));
           3     2         3          3           3      2      3    3
          d y   d y    2  d y     2  d y     2   d y    d y    d y  d y
(%o2)  [y --- + --- + x  ------, x  ------, x , ------, ---, y ---, ---]
            3     2           2          2           2    2      3    3
          dz    dx       dx dy      dx dy       dx dy   dx     dz   dz
(%i3) 
Run Example
display2d:false;

(%o1) false
(%i2) 
list_of_derivatives(x) := block([result : []], scanmap(lambda([x], if not atom(x) then print(op(x), is(op(x)=op('diff('f(x),x)))), if not atom(x) then result : endcons(x, result), x), x), result);

(%o2) list_of_derivatives(x):=block([result:[]],
                          scanmap(lambda([x],
                                         if not atom(x)
                                             then print(op(x),
                                                        is(
                                                         op(x)
                                                           = op(
                                                           'diff('f(x),x)))),
                                         if not atom(x)
                                             then result:endcons(x,result),x),
                                  x),result)
(%i3) 
list_of_derivatives('diff(y,x,2)+y*'diff(y,z,3)+x^2*'diff(y,x,1,y,2));

+ false 
* false 
^ false 
derivative true 
derivative true 
* false 
derivative true 
(%o3) [y*'diff(y,z,3)+'diff(y,x,2)+x^2*'diff(y,x,1,y,2),x^2*'diff(y,x,1,y,2),
       x^2,'diff(y,x,1,y,2),'diff(y,x,2),y*'diff(y,z,3),'diff(y,z,3)]
(%i4) 
Run Example
d(n):=divsum(n)-n;
(%o1)                        d(n) := divsum(n) - n
(%i2) abu(n):=if d(n) >
 n then true else false;
(%o2)                   abu(n) := if d(n) > n then true
(%i3) l : [];
(%o3)                                 []
(%i4) for i : 0 thru 28123 do(  if abu(i) then (    l : endcons(i,l)  ));
(%o4)                                done
(%i5) len : length(l);
(%o5)                                6966
(%i6) a : array(fixnum,28);
(%o6)                               fixnum
(%i7) a[7];
(%o7)                               fixnum
                                          7
(%i8) 

Related Help

Help for Endcons