1MAXIMA(1) General Commands Manual MAXIMA(1)
2
3
4
6 Maxima - Common Lisp version of MACSYMA symbolic mathematics package
7 released under the GNU Public License
8
9 rmaxima - A version of Maxima that supports command autocompletion
10
11 Xmaxima - A graphical version of Maxima
12
14 maxima [options]
15
16 rmaxima [options]
17
18 xmaxima [options]
19
21 Maxima is a version of the MIT-developed MACSYMA system, modified to
22 run under Common Lisp. It is an interactive expert system and program‐
23 ming environment for symbolic and numerical mathematical manipulation.
24 Written in Lisp, it allows differentiation, integration, solution of
25 linear or polynomial equations, factoring of polynomials, expansion of
26 functions in Laurent or Taylor series, computation of Poisson series,
27 matrix and tensor manipulations, and two- and three-dimensional graph‐
28 ics. Procedures may be written using an ALGOL-like syntax, and both
29 Lisp-like functions and pattern matching facilities are provided.
30 Files containing Maxima objects may be read from and written to disk
31 files. Pre-written Maxima commands may be read from a file and exe‐
32 cuted, allowing batch-mode use.
33
35 -b file, --batch=file
36 Process file in noninteractive mode.
37
38 --batch-lisp=file
39 Process Lisp file file in noninteractive mode.
40
41 --batch-string=string
42 Process string in noninteractive mode.
43
44 -d, --directories
45 Display Maxima directory information.
46
47 --disable-readline
48 Disable readline support.
49
50 -g, --enable-lisp-debugger
51 Enable Lisp debugger.
52
53 -h, --help
54 Display a brief usage summary.
55
56 --init=string
57 Load the Maxima and Lisp initialization files string.mac and
58 string.lisp at startup.
59
60 --init-mac=file
61 Load the Maxima initialization file file at startup.
62
63 --init-lisp=file
64 Load the Lisp initialization file file at startup.
65
66 -l lisp, --lisp=lisp
67 Use Lisp implementation lisp. Use --list-avail to see the list
68 of possible values.
69
70 --list-avail
71 List the available Lisp and Maxima versions.
72
73 -p lisp_file, --preload-lisp=lisp_file
74 Preload lisp_file.
75
76 -q, --quiet
77 Suppress Maxima start-up message.
78
79 -r string, --run-string=string
80 Process string in interactive mode.
81
82 -s port, --server=port
83 Connect Maxima to server on port. Note that this does not cre‐
84 ate a Maxima server; Maxima is the client.
85
86 -u version, --use-version=version
87 Launch Maxima version version. Use --list-avail to see the list
88 of possible values.
89
90 --userdir=directory
91 Use directory for user directory (default is %USERPROFILE%/max‐
92 ima for Windows, $HOME/.maxima for others)
93
94 -v, --verbose
95 Print extra information from the Maxima wrapper script.
96
97 --version
98 Print the (default) installed version.
99
100 --very-quiet
101 Suppress expression labels and the Maxima start-up message.
102
103 -X Lisp options, --lisp-options=Lisp options
104 Options to be given to the underlying Lisp.
105
107 Upon initialization, maxima prints a startup message, then a command
108 line prompt:
109
110 (%i1)
111
112 All Maxima commands must be concluded with either:
113
114 1) a semicolon (in which case the result of the command is echoed
115 on a display line, prefaced by %o with an appended sequence num‐
116 ber), or
117
118 2) a dollar sign (which suppresses printing of a display line).
119
121 (%i1) diff(sin(x),x);
122
123 (%o1) cos(x)
124
125 (%i2) integrate(%o1,x);
126
127 (%o2) sin(x)
128
129 The user types in commands which create Maxima objects (such as func‐
130 tions and system variables) and which manipulate these objects.
131
132 On UNIX it may be preferable to run Maxima under Gnu Emacs or XEmacs.
133 You can do this by invoking shell mode in emacs, and then invoking max‐
134 ima. Preferably, install maxima.el from the distribution and use the
135 command:
136
137 M-x maxima
138
139 The main advantage of working inside emacs is that it provides a com‐
140 plete history of input/output. If you execute the command
141
142 display2d: false
143
144 you will be able to use your output as input, by simply killing and
145 yanking.
146
147 Lisp is built into Maxima. The function to_lisp() enters the Lisp
148 read-eval-print loop. The Lisp function (run) may be used to return to
149 Maxima. Alternatively, single Lisp commands may be invoked by starting
150 a command line with :lisp.
151
153 The reference manual can be accessed from the Maxima input prompt. A
154 description of a given command can be obtained by typing the command
155
156 describe(command);
157
158 or, simply,
159
160 ? command
161
162 The command
163
164 ?? command
165
166 searches the list of functions for the string command and prints match‐
167 ing functions.
168
169 Demonstration files provide complete examples of problems solved with
170 Maxima, and may be accessed with the command demo(command);. A library
171 of user-contributed command files is also provided (the share library),
172 directed toward a variety of problems.
173
175 The reference manual is provided in both info and html formats.
176
178 This list includes only commands which the beginner might find useful
179 to know about prior to studying the reference manual and other texts.
180
181 batch("myfile");
182 Execute the contents of file myfile, which is assumed to contain
183 Maxima commands.
184
185 closefile("myfile");
186 Close session file opened by a writefile command (see below).
187
188 demo("myfile");
189 Execute the contents of file myfile, which is assumed to contain
190 Maxima commands, one line at a time.
191
192 ev(infolists);
193 Print the contents of all of the available information lists.
194
195 functions;
196 Print a list of the names of currently defined functions.
197
198 infolists;
199 Print a list of the various available information lists.
200
201 kill(objectlist);
202 Eliminate the object(s) contained within parentheses; kill(all)
203 Delete all objects created by the user, restoring Maxima to its
204 initial state.
205
206 quit();
207 Leave Maxima.
208
209 reset();
210 Reset all Maxima control parameters to their default states.
211
212 values;
213 Print a list of the names of currently assigned scalar values.
214
215 writefile("myfile");
216 Write record of session to file myfile; only one file at a time
217 can be open, and the closefile command must be invoked prior to
218 leaving Maxima to flush the buffer.
219
221 Maxima is capable of producing 2- and 3-dimensional plots. Here is a
222 simple 2-dimensional example
223
224 plot2d (sin(x), [x, -2*%pi, 2*%pi]);
225
226 and a simple 3-dimensional example
227
228 plot3d (2^(-u^2 + v^2), [u, -5, 5], [v, -7, 7]);
229
230 By default plots are made by the gnuplot plotting package. Plots can
231 be made by other means; see "? plot_options". For more information
232 about plotting, see "? plot".
233
235 /usr/lib/maxima/5.45.1/binary-lisp
236 Compiled files for lisp implementation lisp
237
238 /usr/info primary documentation directory, containing info files which
239 are used for the 'describe' command, and also for viewing un‐
240 der emacs or other info viewer.
241
242 /usr/share/maxima/5.45.1/doc/html
243 HTML version of info documentation.
244
245 /usr/share/maxima/5.45.1/demo
246 Maxima demo files.
247
248 /usr/share/maxima/5.45.1/emacs
249 Elisp files for use with Emacs or XEmacs.
250
251 /usr/share/maxima/5.45.1/share
252 Contributed external packages.
253
254 /usr/share/maxima/5.45.1/doc/share
255 Documentation for contributed external packages.
256
257 /usr/share/maxima/5.45.1/src
258 Complete Maxima source.
259
260 /usr/share/maxima/5.45.1/tests
261 Test suite.
262
263 /usr/share/maxima/5.45.1/xmaxima
264 Xmaxima support files.
265
266 /usr/libexec/maxima/5.45.1/
267 Maxima utility scripts.
268
270 MAXIMA_USERDIR
271 Points to a directory for user customization files. Maxima's de‐
272 fault search paths include MAXIMA_USERDIR. Default value:
273 $HOME/.maxima.
274
275 MAXIMA_PREFIX
276 Maxima looks for its input files in the directory configured at
277 compile time, /usr. Maxima can be relocated to a different di‐
278 rectory as long as the maxima script maintains the same relative
279 position with respect to the Maxima input files. If, for some
280 reason, the maxima script needs to be relocated independently,
281 MAXIMA_PREFIX needs to be set to point to the top of the tree
282 holding the input files.
283
284 MAXIMA_DIRECTORY
285 MAXIMA_DIRECTORY is equivalent to MAXIMA_PREFIX. It is included
286 only for backward compatibility with older versions of Maxima.
287
288 Maxima uses several other environment variables for communication be‐
289 tween the maxima script and the lisp image. All such variables start
290 with MAXIMA_. They should not need to be modified by the user.
291
293 maximarc
294 maximarc is sourced by the maxima script at startup. It should
295 be located in $MAXIMA_USERDIR (see above). maximarc can be used,
296 e.g., to change the user's default lisp implementation choice to
297 CMUCL by including the line "MAXIMA_LISP=cmucl".
298
299 maxima-init.lisp
300 At startup, Maxima will load the lisp file maxima-init.lisp if
301 it is found in the search path. For user customization, maxima-
302 init.lisp should be placed in the $MAXIMA_USERDIR (see above).
303 Since Maxima typically has a system maxima-init.lisp in the Max‐
304 ima share directory, the user may want to copy the contents of
305 the system maxima-init.lisp into his/her custom file. Alterna‐
306 tively, the user can load a Lisp initialization file with an‐
307 other name or location by means of the --init-lisp or --init
308 command-line options.
309
310 maxima-init.mac
311 At startup, Maxima will load the file maxima-init.mac if it is
312 found in the search path. For user customization, maxima-
313 init.mac should be placed in the $MAXIMA_USERDIR (see above).
314 Alternatively, the user can load a Maxima initialization file
315 with another name or location by means of the --init-mac or
316 --init command-line options.
317
319 Old Reference: MACSYMA Reference Manual (volumes 1 and 2). The Mathlab
320 Group, Laboratory for Computer Science, MIT. Version 10. January
321 1983.
322
323 Newer references: https://maxima.sourceforge.io
324
326 Maxima is a complex system. It includes both known and unknown bugs.
327 Use at your own risk. The Maxima bug database is available at
328
329 https://sourceforge.net/p/maxima/bugs/
330
331 New bug reports are always appreciated. Please include the output of
332 the Maxima function "build_info()" with the report.
333
335 MACSYMA (Project MAC's SYmbolic MAnipulation System) was developed by
336 the Mathlab group of the MIT Laboratory for Computer Science (origi‐
337 nally known as Project MAC), during the years 1969-1972. Their work
338 was supported by grants NSG 1323 of the National Aeronautics and Space
339 Administration, N00014-77-C-0641 of the Office of Naval Research,
340 ET-78-C-02-4687 of the U.S. Department of Energy, and F49620-79-C-020
341 of the U.S. Air Force. MACSYMA was further modified for use under the
342 UNIX operating system (for use on DEC VAX computers and Sun worksta‐
343 tions), by Richard Fateman and colleagues at the University of Califor‐
344 nia at Berkeley; this version of MACSYMA is known as VAXIMA. The
345 present version stems from a re-working of the public domain MIT MAC‐
346 SYMA for GNU Common Lisp, prepared by William Schelter, University of
347 Texas at Austin until his passing away in 2001. It contains numerous
348 additions, extensions and enhancements of the original. The original
349 version of this manual page was written by R. P. C. Rodgers, UCSF
350 School of Pharmacy, San Francisco, CA 94143 (rodgers@max‐
351 well.mmwb.ucsf.edu) in 1989. It was extensively revised by James Amund‐
352 son in 2002.
353
354 Maxima is now developed and maintained by the Maxima project at
355 <https://maxima.sourceforge.io>.
356
357
359 wxmaxima(1)
360
361
362
363 2020-03-23 MAXIMA(1)