2 启动Maxima用命令“maxima”.Maxima将会显示版本信息及提示符。每一个Maxima命令
3 都以分号结尾。退出maxima用命令“quit()”。下面是一个例子:
6 [wfs@@chromium]$ maxima
7 Maxima 5.9.1 http://maxima.sourceforge.net
8 Using Lisp CMU Common Lisp 19a
9 Distributed under the GNU Public License. See the file COPYING.
10 Dedicated to the memory of William Schelter.
11 This is a development version of Maxima. The function bug_report()
12 provides bug reporting information.
16 (%i2) expand ((x + y)^6);
18 (%o2) y + 6 x y + 15 x y + 20 x y + 15 x y + 6 x y + x
19 (%i3) factor (x^6 - 1);
21 (%o3) (x - 1) (x + 1) (x - x + 1) (x + x + 1)
26 Maxima能搜寻info页。用describe命令可以显示包含那个字符串的所有命令或变量或可选的文档。问号@code{?}是describe命令的省略形式。
30 0: Functions and Variables for Elliptic Integrals
31 1: Functions and Variables for Integration
32 2: Introduction to Elliptic Functions and Integrals
33 3: Introduction to Integration
34 4: askinteger (Functions and Variables for Simplification)
35 5: integerp (Functions and Variables for Miscellaneous Options)
36 6: integer_partitions (Functions and Variables for Sets)
37 7: integrate (Functions and Variables for Integration)
38 8: integrate_use_rootsof (Functions and Variables for Integration)
39 9: integration_constant_counter (Functions and Variables for
41 10: nonnegintegerp (Functions and Variables for linearalgebra)
42 Enter space-separated numbers, `all' or `none': 5 4
44 -- Function: integerp (<expr>)
45 Returns `true' if <expr> is a literal numeric integer, otherwise
48 `integerp' returns false if its argument is a symbol, even if the
49 argument is declared integer.
67 (%i8) declare (n, integer);
72 -- Function: askinteger (<expr>, integer)
73 -- Function: askinteger (<expr>)
74 -- Function: askinteger (<expr>, even)
75 -- Function: askinteger (<expr>, odd)
76 `askinteger (<expr>, integer)' attempts to determine from the
77 `assume' database whether <expr> is an integer. `askinteger'
78 prompts the user if it cannot tell otherwise, and attempt to
79 install the information in the database if possible. `askinteger
80 (<expr>)' is equivalent to `askinteger (<expr>, integer)'.
82 `askinteger (<expr>, even)' and `askinteger (<expr>, odd)'
83 likewise attempt to determine if <expr> is an even integer or odd
84 integer, respectively.
89 要在后面的计算中应用一个结果,你可以将结果赋值给一个变量或者通过自动产生的标号引用它。 另外,@kbd{%}被指向最近的一个计算结果。
92 (%i1) u: expand ((x + y)^6);
94 (%o1) y + 6 x y + 15 x y + 20 x y + 15 x y + 6 x y + x
97 (%o2) 6 y + 30 x y + 60 x y + 60 x y + 30 x y + 6 x
114 (%i1) u: expand ((x + y)^6);
116 (%o1) y + 6 x y + 15 x y + 20 x y + 15 x y + 6 x y + x
119 (%o2) 6 y + 30 x y + 60 x y + 60 x y + 30 x y + 6 x
120 (%i3) integrate (1/(1 + x^3), x);
123 log(x - x + 1) sqrt(3) log(x + 1)
124 (%o3) - --------------- + ------------- + ----------
130 (%i1) linsolve ([3*x + 4*y = 7, 2*x + a*y = 13], [x, y]);
132 (%o1) [x = --------, y = -------]
134 (%i2) solve (x^3 - 3*x^2 + 5*x = 15, x);
135 (%o2) [x = - sqrt(5) %i, x = sqrt(5) %i, x = 3]
139 如果你不想一个结果显示出来,你可以用@kbd{$}代替@kbd{;}来结束命令
141 (%i1) eq_1: x^2 + 3*x*y + y^2 = 0$
142 (%i2) eq_2: 3*x + y = 1$
143 (%i3) solve ([eq_1, eq_2]);
144 3 sqrt(5) + 7 sqrt(5) + 3
145 (%o3) [[y = - -------------, x = -----------],
148 3 sqrt(5) - 7 sqrt(5) - 3
149 [y = -------------, x = - -----------]]
155 (%i1) eq_1: x^2 + 3*x*y + y^2 = 0$
156 (%i2) eq_2: 3*x + y = 1$
157 (%i3) solve ([eq_1, eq_2]);
158 3 sqrt(5) + 7 sqrt(5) + 3
159 (%o3) [[y = - -------------, x = -----------],
162 3 sqrt(5) - 7 sqrt(5) - 3
163 [y = -------------, x = - -----------]]
167 (%i1) plot2d (sin(x)/x, [x, -20, 20]);
169 (%i2) plot2d ([atan(x), erf(x), tanh(x)], [x, -5, 5]);
171 (%i3) plot3d (sin(sqrt(x^2 + y^2))/sqrt(x^2 + y^2), [x, -12, 12],
176 @c FOLLOWING TEXT DESCRIBES THE TCL/TK PLOT WINDOW WHICH IS NO LONGER THE DEFAULT
177 @c Moving the cursor to the top left corner of the plot window will pop up
178 @c a menu that will, among other things, let you generate a PostScript file
179 @c of the plot. (By default, the file is placed in your home directory.)
180 @c You can rotate a 3D plot.