Maxima by Example

Ted Woollett

Edwin (Ted) Woollett Computational Physics with Maxima or R Economic Analysis with Maxima

The new textbook "Symbolic Mathematics for Chemists: A Guide for Maxima Users" by Fred Senese (Wiley, 2019) provides a thorough introduction to the use of the Maxima program, concentrating on the use of the wxMaxima interface. I highly recommend this textbook as an efficient path to the use of Maxima.
wxMaxima Links


Maxima (link to project page) is a freely available and powerful computer algebra system (CAS) which is an open source cousin of the commercial Macsyma CAS. Maxima has powerful symbolic, numerical, and graphical capabilities, and you can download as many copies as you need without the hassle of license negotiations with Mathematica or Maple. Maxima is being steadily improved by an energetic development team of volunteers. An email "mailing list" provides an effective and friendly means of getting and providing advice on the practical use of Maxima with your research or project.


Maxima by Example is a series of tutorial notes which include many examples of the power of Maxima. Designed for the new user, we include some "nuts and bolts" suggestions for working with the Maxima software, especially for the Windows user. The posted files use 12 point type, which makes for easier reading at the computer screen, but costs more to print.

Reading these notes on your computer makes more sense than printing them out, although you may want to print out the first page which has the table of contents. It is easier to keep a live set of notes up to date than a book.


Notepad++ is my Windows editor of choice for editing Maxima, html, and tex files. The Sourceforge download page is here.

Test plot2d with Your Version of Maxima

Some recent versions of Maxima have not behaved as expected, due to changes in the Lisp version used for the core functions, and changes in the methods used to prepare Windows versions installed using xxx.exe files.

You can use the files plot2dtest.wxm (with wxMaxima) or plot2dtest.mac (with xMaxima) to see what features may not be working as expected with the version of Maxima you are using. plot2d is used in the first few chapters of Maxima by Example. If the examples in these chapters are not working as expected, you can substitute draw2d (which has its own syntax) by first loading the draw package (only needed once per session). Each of the files available here include suggested draw2d versions which should do the job, albeit with more lines of code.

To use the batch file (with the xMaxima interface), type batch(plot2dtest) or batch("plot2dtest.mac") or batch("c:/work5/plot2dtest.mac"), etc. The run will pause after each plot until you close the gnuplot window.

  1. --plot2dtest.wxm : Open with wxMaxima, run each cell one at a time, Dec. 21, 2017
  2. --plot2dtest.mac : This is a batch file for xMaxima; use: batch(plot2dtest) to run, 12/21/2017

Chapter links

  1. Ch 1   Introduction to Maxima
  2. Ch. 2   Plots, Files, Read, Write, and Fit
  3. Ch. 3   Ordinary Differential Equation Tools
  4. Ch. 4   Solving Equations
  5. Ch. 5   Matrix Solution Methods
  6. Ch. 6   Differential Calculus
  7. Ch. 7   Symbolic Integration
  8. Ch. 8   Numerical Integration
  9. Ch. 9   Bigfloats and High Accuracy Quadrature
  10. Ch. 10   Fourier Series, Fourier and Laplace Transforms
  11. Ch. 11   Fast Fourier Transform Tools
  12. Ch. 12   Dirac Algebra and Quantum Electrodynamics, Version 3
  13. Ch. 13   2D Plots and Graphics using qdraw and wxqdraw
  14. Ch. 14   Fitting a Model Function to Data
  15. Ch. 15   Financial Mathematics