Sponsored links: Algebra eBooks
 

Related

op

a: 3;

op(foo( p, q ) := p -...

'foo(a,2);

Calculate

op-part

u:(6*x+7)/(9*x+2);

part(u,1);

op(part(u,1));

Calculate

op-sqrt

op(sqrt(2));

op(2^(1/2));

Calculate

op

op(a+b);

op(a*b);

op(a/b);

Calculate

op-part-sum

s: sum(a[i],i,0,n);

part(s,0);

part(s,1);

Calculate

op

a: 3;

op(foo( p, q ) := p -...

'foo(a,2);

Calculate

op-part-sqrt

x:sqrt(1+cbrt(x+sqrt(...

part(x,0);

part(x,1);

Calculate

op

op(a+b);

op(a*b);

op(a/b);

Calculate

op-sin

op(sin(x+2));

Calculate

op

Run Example
(%i1)pe(x1,y1,z1,x2,y2,z2):=x1*x2+y1*y2+z1*z2;
(%o1)         pe(x1, y1, z1, x2, y2, z2) := x1 x2 + y1 y2 + z1 z2
(%i2) modulo(x,y,z):=sqrt(pe(x,y,z,x,y,z));
(%o2)            modulo(x, y, z) := sqrt(pe(x, y, z, x, y, z))
(%i3) uv:pe(2,1,0,3,-1,2);
(%o3)                                  5
(%i4) uw:[2,1,0].[4,0,3];
(%o4)                                  8
(%i5) vw:[3,-1,2].[4,0,3];
(%o5)                                 18
(%i6) um:modulo(2,1,0);
(%o6)                               sqrt(5)
(%i7) vm:modulo(3,-1,2);
(%o7)                              sqrt(14)
(%i8) op:um*vm;
(%o8)                          sqrt(5) sqrt(14)
(%i9) 
Run Example
expr: x . dx . dy + z . dy . dz + y . dx . dz;
(%o1)               z . dy . dz + y . dx . dz + x . dx . dy
(%i2) expr2: x . [dx, dy] + z . [dy, dz] + y . [dx, dz];
(%o2)             z . [dy, dz] + y . [dx, dz] + x . [dx, dy]
(%i3) expr3: x * [dx, dy] + z * [dy, dz] + y * [dx, dz];
(%o3)              [dy z + dx y + dx x, dz z + dz y + dy x]
(%i4) expr4: [x, dx, dy] + [z, dy, dz] + [y, dx, dz];
(%o4)                  [z + y + x, dy + 2 dx, 2 dz + dy]
(%i5) expr5: [[x, dx, dy], [z, dy, dz], [y, dx, dz]];
(%o5)               [[x, dx, dy], [z, dy, dz], [y, dx, dz]]
(%i6) expr6: x . del(x) . del(y) + z . del(y) . del(z) + y . del(x) . del(z);
(%o6)   z . del(y) . del(z) + y . del(x) . del(z) + x . del(x) . del(y)
(%i7) part(expr, 1);
(%o7)                             z . dy . dz
(%i8) length(expr);
(%o8)                                  3
(%i9) op(expr);
(%o9)                                  +
(%i10) args(expr);
(%o10)              [z . dy . dz, y . dx . dz, x . dx . dy]
(%i11) map(op, args(expr));
(%o11)                             [., ., .]
(%i12) map(args, args(expr));
(%o12)              [[z, dy, dz], [y, dx, dz], [x, dx, dy]]
(%i13) map(args, args(expr6));
(%o13)  [[z, del(y), del(z)], [y, del(x), del(z)], [x, del(x), del(y)]]
(%i14) diffform(vars, expr) := block(    [n, k],    0);
(%o14)             diffform(vars, expr) := block([n, k], 0)
(%i15) diff(x + y);
(%o15)                          del(y) + del(x)
(%i16) 
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) 

Related Help

Help for Op