Micro introduction into Maxima
来自Ubuntu中文
原文:http://www.math.harvard.edu/computing/maxima/
翻译:dbzhang800
在命令行中可以通过键入“maxima”来启动Maxima。键入“quit();”退出。
数论
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(%);
编程
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];
制图
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]);
微积分
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);
极限
limit( (5*x+1)/(3*x-1),x,inf);
常微分方程
depends(y,x); diff(y,x)=(4-2*x)/(3*y^2-5); ode2(%,y,x); latex(%);
解线性方程
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]);
矩阵操作
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);
文件操作
load(file);
中止计算
factor(2^(2^7)+1); c MAXIMA>>:q
退出 Maxima
quit();