This is the first of what I intend to be a series of posts, exploring the open source computer algebra system Axiom. Maxima has already been extremely well described on math-blog. I hope to do something similar for Axiom, but over several posts.
Obtaining and using Axiom
First: go to http://www.axiom-developer.org/ for a description and discussion, and then go to http://www.axiom-developer.org/axiom-website/download.html to find and download some binaries. Axiom works best under linux. Under windows you have several choices: you can run a native binary in console mode only, without graphics, or you can run Axiom inside an X-windows server for Windows such as Xming. The best interface for Axiom is to use it as a session within the TeXmacs editor. Screenshots of this can be seen here.
A note on Axiom and its forks
Owing to some disagreement among Axiom developers, the original Axiom has spawned two forks: FriCAS, and OpenAxiom. From the users’ point of view, there is not much to choose between the three. However, the development models and goals of the three are very different:
- Axiom “is intended to support educational and research objectives”, and aims to be very slow and careful in its development, using literate programming, so the development done now will still be useful and readable in 30 years time. Thus Axiom puts great stress on provable correctness of algorithms, and readability of code. This can make adding new material non-trivial.
- FriCAS “will use lightweight developement, allowing much faster evolution.” Also, FriCAS “add hooks which make adding alternative user interfaces easier.” FriCAS aims to be more user friendly than its parent, and in particular easier to extend.
- OpenAxiom “aims at being the open source computer algebra system of choice for research, teaching, engineering, etc.” It differs from its parent in technical details.
I will use the term “Axiom” to mean either the original Axiom, or the user experience of using any of its forks.
In these posts, Axiom will be presented as a sequence of images, showing Axiom output TeX-ed up to look good. This is similar to what you would obtain using TeXmacs.
One very important aspect of Axiom is that it uses types extensively. Everything you do in Axiom takes an input of one of the many types defined in Axiom, and produces an output of a particular type. One of the greatest difficulties for the beginner (well, it was certainly hard for me!) is making sense of the types, and ensuring that your input type is commensurate with the mathematics you are trying to do with it. But this is also one of Axiom’s greatest strengths.
But let’s start simply: Axiom can be used like a calculator:
Axiom has all the standard functions:
Note that %pi produces , and %i the imaginary unit. Other constants include various infinities, which I’ll talk about in a further post.
Note that Axiom, like most computer algebra systems, will attempt to give a result in closed (symbolic) form. To force a floating point output, you need to include a floating point input, or use the numeric function, or coerce your input to be of type Float. (I’ll discuss types and coercion in a later post.)
Axiom has no trouble with integers of arbitrary size:
And Axiom can produce numeric output to arbitrary precision. The number of digits displayed is set by the digits function. The last two commands here are classic examples of “near integer” computations.
The next post can be found at https://amca01.wordpress.com/2008/05/25/an-introduction-to-axiom-2/