> # Maple sucks, well only slightly more that other software. > # Maple crashes, save early and often > # Maple does not re-execute commands when it loads > # Maple thinks you know what you are doing, it echos commands it does not understand > implictplot3d(x+y+z=1,x=0..2,y=0..2,z=0..2,title=`Command not found`); implictplot3d(x + y + z = 1, x = 0 .. 2, y = 0 .. 2, z = 0 .. 2, title = Command not found) > # Maple is very picky about syntax > # syntax 1, commands that don't end until either a `;' or a `:' appear > 2+2 > Warning, premature end of input > 2+2; 4 > # syntax 2, `:' makes Maple silent > 2+2: > # syntax 3. Maple can't figure out 3x or xy or x y or x(y) > 3x; missing operator or `;` > 3*x; 3 x > xy; xy > x*y; x y > # syntax 4. Maple uses `:=' for assignment, and `=' for equations. > a:=2; a := 2 > b:=3; b := 3 > a*b;ab; 6 ab > solve({x+y=7,x-y=5}); {y = 1, x = 6} > eqn:={x^2+y^2=4,(x-3)^2+y^2=4}; 2 2 2 2 eqn := {x + y = 4, (x - 3) + y = 4} > solve(eqn); 2 {x = 3/2, y = 1/2 RootOf(_Z - 7)} > # Maple sometimes gives ugly answers. The above is another way of writing plus/minus sqrt(7) > allvalues(solve(eqn)); {x = 3/2, y = 1/2 sqrt(7)}, {x = 3/2, y = - 1/2 sqrt(7)} > # f(x):=x^2; does not work, instead use f:=x->x^2; > f(x):=x^2; f(2); f(t); 2 f(x) := x f(2) f(t) > f:=x->x^2; f(2); f(t); 4 2 t > #Maple is too smart for its own good. Both expressions and functions work in many places. > plot(x^2,x=-1..1);plot(f(x),x=-1..1); > # Syntax it is Pi and not pi > pi;Pi;evalf(pi);evalf(Pi); pi Pi pi 3.141592654 > # Syntax the is no e or E, instead do > e:=exp(1);e^2;evalf(e^2); e := exp(1) 2 exp(1) 7.389056096 > #but it can draw some pretty pictures > f:=(x,y)->x^3-3*x*y^2; > plot3d(f(x,y),x=-3..3,y=-3..3,title=`monkey saddle`); > #it can integrate like a champ > int(int(f(x,y),x=0..3),y=0..3); -243/4 > # check answers > subs({x=1,y=1}, eqn); {2 = 4, 5 = 4} > subs(allvalues(solve(eqn))[1],x^2+y^2); 4 > #Maple lies! > a:=2; a := 2 > a+a; 5 > a; 2 >