Department of Mathematics FAS Harvard University One Oxford Street Cambridge MA 02138 USA Tel: (617) 495-2171 Fax: (617) 495-5132
FAS Computer Services to Harvard University IT: (617) 495-7777.
 Maxima is an open source computer algebra system. It has its origins in Macsyma in the late 1960s at MIT. Macsyma was the first of a new breed of computer algebra systems, leading the way for programs such as Maple, Matlab or Mathematica. Since 1998 the source code is released under GPL. A group of users and developers has formed to keep Maxima alive and kicking. Maxima itself is reasonably feature complete at this stage, with abilities such as symbolic integration, 2D and 3D plotting, as well as an ODE solver. You can also just use it as a calculator with arbitrary precision.

In Unix, you start Maxima by typing "maxima" at the command line. You quit it with 'quit();';
 Number theory ```expand((x+y)^6); factor(x^6-1); factor(123412341231234); factor(2^(2^5)+1); 100!; bfloat(%pi); block([fpprec:1000],bfloat(%pi)); cfdisrep([1,2,3,5,2]); bfloat(%); ``` Programming ```for a:-3 thru 26 step 7 do ldisplay(a); s:0; for i:1 while i<=10 do s:s+i; done; s; fib[0]:0; fib[1]:1; fib[n]:=fib[n-1]+fib[n-2]; fib[20]; ``` Plotting ```plot2d(sin(x)/x,[x,-5,5]); plot3d(sin(sqrt(x^2+y^2))/sqrt(x^2+y^2),[x,-12,12],[y,-12,12]); plot3d([cos(y)*(10.0+6*cos(x)),sin(y)*(10.0+6*cos(x)),-6*sin(x)], [x,0,2*%pi],[y,0,2*%pi],['grid,40,40]); plot3d([5*cos(x)*(cos(x/2)*cos(y)+sin(x/2)*sin(2*y)+3.0)-10.0, -5*sin(x)*(cos(x/2)*cos(y)+sin(x/2)*sin(2*y)+3.0), 5*(-sin(x/2)*cos(y)+cos(x/2)*sin(2*y))], [x,-%pi,%pi],[y,-%pi,%pi],['grid,40,40]); plot2d(sec(x),[x,-2,2],[y,-20,20],[nticks,200]); plot2d([parametric,cos(t),sin(t),[t,-%pi*2,%pi*2]]); plot2d([x^3+2,[parametric,cos(t),sin(t),[t,-5,5]]], [x,-3,3]); ``` Differentiation and Integration ```diff(sin(x^2)); 'integrate(%E**sqrt(a*y),y,0,4); integrate(%E**sqrt(a*y),y,0,4); integrate(sin(x),x); sum((1/2)^i,i,0,inf); laplace(delta(T-A)*sin(B*T),T,S); ``` Limits ```limit( (5*x+1)/(3*x-1),x,inf); ``` Ordinary differential equations ```depends(y,x); diff(y,x)=(4-2*x)/(3*y^2-5); ode2(%,y,x); latex(%); ``` Solving linear equation ```linsolve( [3*x+4*y=7, 2*x+4*y=13], [x,y]); eq1: x^2 + 3*x*y + y^2 = 0; eq2: 3*x + y = 1; solve([eq1, eq2]); ``` Working with matrices ```a: matrix([1,2],[3,4]); b: matrix([2,2],[2,2]); a.b; h[i,j]:=1/(i+j); a: genmatrix(h,3,3); determinant(a); b: matrix([2,3],[5,6]); echelon(b); invert(b); eigenvectors(b); ``` Working with files ```load(file); ``` Interrupting computation ```factor(2^(2^7)+1); c MAXIMA>>:q ``` Quitting Maxima ```quit(); ```

## Mathematica - Maxima

 Maxima ```Mathematica ``` ```plot2d( sin(x),[x,-5,5]); ``` ```Plot[Sin[x],{x,-5,5}] ``` ```plot3d( sin(x*y),[x,-3,3],[y,-3,3] ); ``` ```Plot3D[Sin[x y],{x,-3,3},{y,-3,3}] ``` ```diff(cos(x)^5,x) ``` ```D[Cos[x]^5,x] ``` ```integrate(tan(x),x); ``` ```Integrate[Tan[x],x] ``` ```integrate(%e^(-x^2),x,minf,inf); ``` ```Integrate[Exp[-x^2],{x,-Infinity,Infinity}] ``` ```romberg(sin(cos(x)), x, 1, 3); ``` ```NIntegrate[Sin[Cos[x]],{x,1,3}] ``` ```limit((1+1/n)^n,n,inf); ``` ```Limit[(1+1/n)^n,{n ->Infinity}] ``` ```float(%e); ``` ```N[E,100] ``` ```factor(4 + 5*x + 5*x^2 + x^3); ``` ```Factor[4 + 5*x + 5*x^2 + x^3] ``` ```trigsimp(cos(x)^2+2*sin(x)^2); ``` ```TrigReduce[Cos[x]^2+2 Sin[x]^2] ``` ```tex(sin(x)); ``` ```TeXForm[Sin[x]] ``` ```factor(132413241324123412341234); ``` ```FactorInteger[132413241324123412341234] ``` ```solve(x^3-3*x+1,x); ``` ```Solve[x^3- 3*x+1==0,x] ``` ```solve([x^2+2*x+y+3,x*y-3],[x,y]); ``` ```Solve[{x^2+2*x*y+3==0, x*y-3==0},{x,y}] ``` ```sum(k,k,1,n),simpsum; ``` ```Sum[k,{k,1,n}] ``` ```niceindices(powerseries(sin(x), x, 0)); ``` ```Series[Sin[x],{x,0,10}] ```

## Some Links

 Simplicity, Clarity, Generality B.W. Kernighan, R. Pike, in "The Practice of Programming".