Professional Documents
Culture Documents
(%i1)
kill(all)$
1 (Evalution)
1.1
: ev
(%i1)
(%o1)
Maxima
d
sin (w) + (w + 1)2
dw
wxMaxima
(Evalution)
(%i2)
ev (expr, diff);
(%o2)
(%i3)
(%o3)
. . . . . . . . . . . . . . . . . .
ev
x+y, x: a+y, y: 2;
(%o4)
y+a+2
(%i5)
2*x - 3*y = 3$
-3*x + 2*y = -4$
solve ([2*x - 3*y = 3, -3*x + 2*y = -4]);
1
6
[[y = , x = ]]
5
5
(%o7)
(%i8)
(%o8)
x+
(%i9)
(%o9)
true
1.2
:evflag,evfun
( )
1
sin
2
Maxima
wxMaxima
(Evalution)
x^3 - 1;
(%o15) x3 1
(%i16) x^3 - 1, factor;
(
)
(%o16) (x 1) x2 + x + 1
(%i17) cos(4 * x) / sin(x)^4;
(%o17)
cos (4 x)
sin (x)4
(%i18)
(%o18)
Maxima
wxMaxima
(Evalution)
(%o19) done
(%i20) (aa : bb, bb : cc, cc : dd);
(%o20) dd
(%i21) aa;
ev(aa);
(%o21) bb
(%o22) cc
(%i23) aa,F;
(%o23)
F (cc)
(%i24) aa,F,G;
(%o24)
1.3
G ( F (cc))
: declare ,,,verbify,nounify
declare
(%i25) foo (x) := x/17;
foo(10);
declare (foo, noun)/**/;
foo(10);
(%o25)
foo (x) :=
x
17
10
17
(%o27) done
(%o26)
(%o28)
foo (10)
[]
[]
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Maxima
wxMaxima
bar (x) := x2
(%o30) 1764
(%i31) 'bar (42);
(%o31)
bar (42)
(%i32) integrate(cos(x),x);
diff(cos(x),x);
(%o32)
sin (x)
(%o34)
cos (x) dx
d
cos (x)
dx
[] verbify(f) f nounify(f) f
nounify(f) C
(%o35)
(%i36)
verbify ('foo);
nounify (foo);
(%o36) f oo
(%o37) f oo
2
2.1
: first,last,rest,lhs,rhs,numfactor
[] first(exp)
. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
[] last(exp)
. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
[] rest(exp,n) . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
[] lhs(eqn) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Maxima
wxMaxima
(%i38)
e: aa + bb = cc;
(%o38) cc + bb = dd
(%i39)
lhs (e);
(%o39) cc + bb
[] rhs(eqn) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
(%i40) rhs (e);
(%o40) dd
(%i41) [rhs (aa < bb), rhs (aa <= bb), rhs (aa >= bb),
foo (x) := 2 x
(%o43)
(%o44) x : y
(%o45) x :: y
(%i46) [rhs (e1), rhs (e2), rhs (e3), rhs (e4)];
(%o46) [2 x, 3 y, y, y]
[] numfactor(exp) . . . . . . . . . . . . . . . . . . . . . . . . . . .
(%i47)
gamma (7/2);
Maxima
wxMaxima
15
(%o47)
8
(%i48)
(%o48)
2.2
numfactor (%);
15
8
:reveal,pickapart,isolate,disolate
[] revel(exp,n
(%i49)
(%o49)
. . . . . . . . . . . . . . . . . . . . . exp n
Sum (3)
Sum (3)
b2 Product (3) + a2
2 Expt + e Product (2) + e Product (2)
b2 2 a b + a2
2 e Sum (2) + e2 b + e2 a
(%o55)
Maxima
wxMaxima
(%i56)
(%o56) log
) sin (x2 ) b + a
x+1+1 +
+
3
2
log
) sin (x2 ) b + a
x+1+1 +
+
3
2
(%o57) %t57
(%i58) pickapart (expr, 1);
(%t58)
log
)
x+1+1
sin (x2 )
3
b+a
(%t60)
2
(%o60) %t60 + %t59 + %t58
(%t59)
(%t62)
)
x+1+1
( )
sin x2
(%t63)
b+a
(%o63)
%t63 %t62
+
%t61
2
3
(%t61)
log
x+1
(
)
sin (x2 ) b + a
+
log
%t64 + 1
3
2
(
)
sin (x2 ) b + a
+
log
x+1+1
3
2
isolate (expr, x) . expr x
Maxima
wxMaxima
(%t66)
b2 + 2 a b + a2
(%o66) c2 + 2 b c + 2 a c + %t66
[]
. . . . . . . . . . . . . . . . . . . . . . true
(%i67)
isolate_wrt_times: true$
isolate (expand ((a+b+c)^2), c);
isolate_wrt_times: false$
(%t68)
2a
(%t69)
2b
(%i71)
isolate_wrt_times: true$
disolate (expand ((a+b+c)^2), a,c);
isolate_wrt_times: false$
(%t72)
b2
2.3
[]
3 %t68 c
2
:part,ipart,dpart,piece,allbut
part (expr, n_1, ..., n_k)
. . . . . . . . . . . . . . . . . . . . . . .
(%i78) part(z+2*y+a,2);
(%o78) 2 y
[]
(%i79) exp:x+y+w*z;
inpart(exp,3,2);
Maxima
wxMaxima
(%o79) w z + y + x
(%o80) z
(%i81) part(exp,1,2);
(%o81) z
(%i82) expr:'limit (f(x)^g(x+1), x, 0, minus);
inpart (expr,1,2);
(%o82)
x0
(%o83)
g (x + 1)
[]
(%i84) dpart(z+2*y+a,2);
(%o84) z + (2 y) + a
[] piece part substpart
(%i85)
(%o85) 27 y 3 + 54 x y 2 + 36 x2 y + y + 8 x3 + x + 1
(%i86)
(%o86) 54 y 2
(%i87) sqrt (piece/54);
(%o87) |y|
[] allbut(arg1,...,argn) part ,inpart,substpart,substinpart ,
10
wxMaxima
2.4
:subst,sublis, substpart,substinpart,ratsubst
[] subst(a,b,expr) . . . . . . . . . . . . . . a expr b
(%i90) subst (a, x+y, x + (x+y)^2 + y);
(%o90) y + x + a2
[]
subst (lhs)
(%i92) sublis ([x=d,y=(3+e)], x + (x+y)^2 + y);
(
(%o92)
)2
b 2 2 a b + a2
b2 2 a b + a2
+
d
+
+
3
+3
d + b+a
2 e + e2 b + e2 a
2 eb+a + e2 b + e2 a
. . . . . . . . . . . . . . . . . . . .
x
z
[] substinpart (x, expr, n_1, ..., n_k)
(%o96)
. . . . . . . . . . . . . . . . . . .
11
wxMaxima
d2
f (x)
d x2
(%o98) x.d2
(%o97) x.
. . . . . . .
2.5
: opsubst,
[] opsubst (f,g,e) . . . . . . . . . . . . . . . . . . .
subst (opsubst:true)
(%i108) load('opsubst)/* boolean opsubst */$
opsubst(f,g,g(g(x)));
Maxima
12
wxMaxima
(%o109) f ( f (x))
(%i110) opsubst(f,g,g(g));
(%o110) f (g)
(%i111) opsubst(f,g[x],g[x](z));
(%o111) f (z)
(%i112) opsubst(g[x],f, f(z));
(%o112) gx (z)
(%i113) opsubst(tan, sin, sin(sin));
(%o113) tan (sin)
[] opsubst[true]
. . . . . . . . . . . . true ,subst
(%i114) subst(f,g,g(g(x)));
(%o114) f ( f (x))
(%i115) subst(tan, sin, sin(sin));
(%o115) tan (tan)
(%i116) opsubst:false;
subst(f,g,g(g(x)));
(%o116) f alse
(%o117) g ( g (x))
2.6
[]
: delete ,rempart
delete (expr1, expr2[,n]) . . . . . . . . . . . . . . .
Maxima
13
wxMaxima
rempart (expr, n) . . . . . . . . . . . . . . . . . . . . . . . . . .
bug ?
(%i123) load(functs);
expr: a*b+c*(d+e)+k;
length(expr);
part(expr,1);
inpart(expr,1);
rempart(expr,2);
(%o123) C : /ADE/programs/M axima/share/maxima/5.29.1/share/simplif ication/f uncts.mac
)
(
b2 2 a b + a2
(%o124) k + c d + b+a
+ ab
2 e + e2 b + e2 a
(%o125) 3
(%o126) k
(%o127) a bM aximaencounteredaLisperror : ErrorinM ACSY M AT OP LEV EL[oracallee] :K
is not of type LIST.Automatically continuing.To enable the Lisp debugger set *debugger-hook*
to nil.
[] first(exp)
2.7
. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
: op,args
Maxima
14
wxMaxima
dispform,dispterms
(%i129) expr:a+b*c/e;
op(expr);
args(expr);
(
)
b 2 eb+a + e2 b + e2 a c
(%o129)
+a
b2 2 a b + a2
(%o130) +
(
)
b 2 eb+a + e2 b + e2 a c
(%o131) [
, a]
b2 2 a b + a2
2.8
listofvars
[] listofvars (expr)
. . . . . . . . . . . . . .
expr
3 dispform,dispterms
[] dispform (expr[,all]) expr (external representation), all
( )
x
Maxima
. . . . . . . . . . . . . expr ,
15
wxMaxima
dispform,dispterms
(%i137) dispterms(a+2*b-d/(k+h)*l);
+
dl
2 ba
k+h
(%o137) done
Maxima
16
wxMaxima