Topic  Discussion  Maxima Input  Maxima Output 
Starting up Maxima  Windows  Doubleclick on the icon on the desktop.  Maxima launches in the Terminal in Mac OS X and Linux, in a twopaned window in Windows (the top pane will contain calculations and results, while the bottom pane displays help, tutorials, etc. The panes can be resized by clicking and dragging on the dividing line between them). 
Mac OS X and Linux 
Open a terminal window and type in "maxima" (minus the quotes), followed by a carriage return.  
What you see  Maxima displays some informational text, and a prompt.  None  (C1) 
Adding two numbers  Type in: 2+2  2+2  None 
Now, type in a semicolon to let Maxima know where the calculation ends.  2+2;  None  
Finally, hit the "enter" (or "return") key to have Maxima evaluate the result  2+2;  4  
More complex calculations  The four basic operations (+, , *, /) and parentheses work as expected.  (2+5)/(172*5);  1 
Exponentiation  To raise a number n to a power p, simply type: n^p  2^5;  32 
Builtin constants  Key mathematical constants are built into Maxima, including pi, e, and i  the names are typed in allcaps, preceded by %  %E^(%I*%PI);   1 
How does Maxima represent its results?  To avoid roundoff error, Maxima will represent results as algebraic expressions wherever possible  1+2/5;  7  5 
Converting results to decimal (floating point) notation  Method 1: use decimal points in numbers.  1.0+2.0/5.0;  1.4 
Method 2: enclose the calculation within "float()".  float(1+2/5);  1.4  
Other common mathematical functions  Most common mathematical functions are built into Maxima. The most frequently used are: sqrt (square root), exp (exponential), log (natural logarithm)  sqrt(2.0);  1.414213562373095 
Trigonometric: these assume that the argument is expressed
in radians  sin, cos, tan 
sin(%PI/2);  1  
Hyperbolic: sinh, cosh, tanh Inverses: asinh, acosh, atanh 
sinh(1.0);  1.175201193643801  
Scientific notation  To express a number in scientific notation in Maxima, write it in the form cep: the coefficient (c), followed by the lowercase letter e, followed by the power of ten (p).  1.5e2*2.0e4;  300.0 
Chaining calculations  Maxima will replace a standalone % symbol in any expression with the result of the previous line.  2*4.5; sqrt(%); 
9.0 3.0 
Maxima will replace %th(n) in any expression with the result of the nth previous line.  2*5; 
10 

Printing your results  Maxima does not have builtin printing capabilities  instead, select the lines you want to print out, copy them and paste them into a text editor.  To make sure the printout aligns correctly, select a monospaced font (e.g., Courier) in your text editor. You may also need to adjust the position of the first tab (in your tab ruler) for proper alignment.  None 
Saving a calculation for later reuse  To save all your work as a "tape" that can be replayed later, all your input can be saved to a file.  stringout("/Users/myusername/file1maxima.mc",INPUT); Note: the exact pathname for your file will vary according to your setup. 
/Users/myusername/file1maxima.mc 
Reloading a saved calculation  Using cut and paste: the saved file is just a listing of commands, which can be copied and pasted into the terminal window.  Paste in the saved file.  The saved results. 
Loading the saved file: the saved file can also be loaded directly, although the exact numbering of lines will change from the original calculation.  batch("/Users/myusername/file1maxima.mc"); Note: the exact pathname for your file will vary according to your setup. 
The saved results, but shifted in numbering by one (assuming the batch command was the first one issued upon starting Maxima).  
Quitting Maxima  To end a session, type quit() into the terminal window.  quit();  Maxima quits. 
We welcome your feedback on this workflow/tutorial  please email us at symmath@hippasus.com
© 2003 Ruben R. Puentedura