Yesterday, I was searching for some nice mathematics applications, mainly for computer algebra, in Linux and here are my two main conclusions.
- First, there are hundreds of math programs and libraries out there for any need!
- Second, try to stick with Debian-based distros, or else you ‘ll end up compiling the universe.
In the beginning, I had not exact idea what I was searching for, but to be honest I would love to have something like Mathcad (which unfortunately is commercial and not open-source). Unfortunately, I don’t believe there is such thing in Free Software, at least for the moment.
Nevertheless, after a little search with apt-cache (using Debian unstable), various applications came to my attention.
For instance, Octave. This is a great app for numerical computations, with familar instructions and Matlab-like mentality. In fact, I tried some of my old Matlab scripts in Octave, and most of them had no problem running. What is more, Octave can run my scripts from the bash shell — all I did was to add
#!/usr/bin/octave in the first line of each script. The problem with Octave is its interface. By default, it doesn’t have a GUI, but you can use QtOctave, if you like. Note that Octave does not offer a visual representation for equations. Everything is being worked out using matrices, which is not what I always want.
Similar to Octave is Scilab, which is also based in matrix computations. Scilab apparently offers more features than Octave, has more active development and documentation but it is also complex and its learning curve is very very steep. Finally, I decided that it was not what I wanted. Maybe, I should check it again in the near future.
After Octave, I installed Axiom, a strong Computer Algebra System (CAS) originally developed by IBM as ScratchPad in the ’70s, but it seemed too complicated to me. Then, it was Euler‘s turn, which turned out to be a very old version (which also uses GTK, period). Then, I came across Mathomatic. This seemed a simple but promising CAS project, since it has some nice features. For instance, you can telnet Mathomatic and use it without installing it:
[email protected]:~/$ telnet mathomatic.org 63011 Trying 22.214.171.124... Connected to mathomatic.org. Escape character is '^]'. Debian GNU/Linux 4.0 Secure Mathomatic version 12.7.9 (www.mathomatic.org) Copyright (C) 1987-2007 George Gesslein II. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 50 equation spaces available, 960 kilobytes per equation space. ANSI color mode enabled. 1-> x = (a + 1) * (b + 2) #1: x = (a + 1)*(b + 2) 1-> b ; solve for b x #1: b = ------- - 2 (a + 1) 1->
Mathomatic sports an extensive documentation and works both as a simple calculator and CAS, supporting algebraic equations and calculus (i.e. derivatives, extrema, Taylor series), complex numbers, polynomials, etc. On the downside, you cannot name functions (i.e f(x), log(x)) and there are not plotting facilities nor matrices! But, still, it is quite useful.
If I was searching for a statistics package, my only serious solution would be R . This is both a programming language and a software environment for statistical computing and graphics, originally developed at the University of Auckland, New Zealand, but it is now developed by a team of developers. R supports useful methods, such as linear and nonlinear modeling, statistical tests, time-series analysis, classification, clustering, etc, and it can be easily extended through “packages” which can be downloaded from the Comprehensive R Archive Network (CRAN).
In the end, APT revealed Maxima. This a descendant of Macsyma, a famous and commercial CAS, originally developed in MIT and funded by the US government. The late Bill Schelter (a seminal figure; professor of Mathematics at the Univ. of Texas and a free software developer well known for the first port of GNU C compiler to 386 machines and the development of GNU Common Lisp) maintained a version of Macsyma from 1982 until 2001, and in 1998 he released his version under the GPL, with the permission of the copyright holders. That version is now called Maxima and is being developed by independent developers as free software.
Maxima is a command line interpreter, which accepts symbolic and numerical expressions, written in an almost natural way (mathematically speaking!), and supports pretty much everything: derivatives, integrals, Taylor series, Laplace transforms, ODE (ordinary differential equations), linear systems, polynomials, sets, matrices, etc. Furthermore, it can can plot functions and data in 2D and 3D. Under the hood, all the calculations are being done by Common Lisp, but the user doesn’t even need to know that.
The nice thing about Maxima is its visual representation of equations and algebraic expressions. For instance, should you input
'integrate (x^2,x, 0, 2)= integrate ((x)^2,x, 0, 2);
the program will respond by displaying an ASCII-art integral sign along with the result:
2 / [ 2 8 (%o1) I x dx = - ] 3 / 0
which is a very close representation of
For those that prefer “point-and-click” instead of the command line, there is xMaxima, which is just an X interface to the command line facilities, and wxMaxima, a wxWidgets GUI for Maxima. which seemed more promising. Both were very easy to apt-get in Debian. WxMaxima offers a basic window, with an INPUT line where you enter equations, a panel of buttons for fast access to Maxima functions and a big display, where equations appear in their natural form.
The documentation of Maxima is excellent, as one would expect from an app with so many years of continuous development. Nevertheless, some usual mathematical operations and tricks are not explained very well there. Happily, there are numerous tutorials which deal with that. For instance, you can read Maxima by Example by professor Edwin L. Woollett. This a series of tutorials spanning in six chapters, and covering algebra basics, equations solving, plots and graphics and differential calculus.
Also, Alexei Beshenov maintains a Frequently-Asked-Questions (FAQ) document, that is answers to questions that are asked repeatedly on the Maxima mailing list, which is very enlightening. Beginners may prefer Introduction to Maxima by Richard Rand.
Other Mathematics software, which can be found in your repositories:
- scilab – Matrix-based scientific software package
- gap – Groups, Algorithms and Programming computer algebra sys
- jacal – Interactive symbolic math system
- pari-gp – PARI/GP Computer Algebra System
- magnus – Computational group theory software with GUI
- singular – A commutative algebra system
- yacas – Computer Algebra System
- lie – Computer algebra package for Lie group computations