Sage: open-source mathematical software

I’ve recently gained a lot of experience with Sage, an open-source alternative to MATLAB, Mathematica, Maple, MuPAD, and Magma.  Here are a couple of links to check out:

Sage vs. Mathematica

My experience with mathematical software started my freshman year at the University of Illinois when I signed up for a calculus class that was taught almost entirely with Mathematica.  I grew to love Mathematica’s symbolic computation and plotting capabilities, although I found its programming language to be cumbersome.  Once I was no longer a student, Mathematica was no longer an option due to the hefty licensing fees.  With the caveat that I haven’t used Mathematica in many years,  I will say that Sage compares very favorably to my experience with Mathematica.  Sage has a notebook interface that allows you to integrate code, results, text, typeset equations, and graphics in an interactive document that can be viewed with any standards-compliant web browser.  I don’t know how Sage stacks up against Mathematica in areas of advanced mathematics.  I have heard that Sage is far ahead of Mathematica in number theory, because the lead developer of Sage is a number theorist.

Sage vs. MATLAB

I will be honest: I hate MATLAB.  I hate the licensing fees, and the fact that many basic capabilities aren’t even included in the basic application.  Need to call a new function?  Buy another toolbox!   Stop working, contact The Mathworks, get your boss to sign off on a PO, and send it in.  Days later the toolbox license is working, and you can continue your work.  When I’m using Python I just search for the correct package, download it immediately, install it, and get on with the project.
Sage beats MATLAB easily in the area of programming.  I primarily code in Python, but one project requires me to use MATLAB, and I always dislike working on that project.  The MATLAB language is a procedural scripting language with object support tacked on.  It’s fine for one-page scripts, and totally unmanageable for anything larger.  You can create GUIs with MATLAB, but trust me: you don’t want to.  MATLAB GUI code is so hard to read that it’s essentially a “write only” language.  Sage uses Python as its programming language, which is infinitely more capable, more fun to write, and easier to read.  Further, Python is well established in the scientific community.  Sage includes NumPy and SciPy, and many other tools.  Sage also has an interactive shell, which is comparable to the MATLAB command line.
MATLAB can do symbolic mathematics, if you purchase the Symbolic Toolbox.  Years ago, this toolbox was an interface to the Maple kernel.  Today, it is actually a separate product called MuPAD, which provides a graphical interface similar to the Sage notebook.  What’s really crazy is that MuPAD uses a different programming languages from MATLAB!  Now you have to learn yet another programming language.  With Sage, you can do everything through the object-oriented Python interface.

Sage vs. Maxima

This is not really a comparison, because Sage actually uses Maxima as a symbolic computation engine.    I started using Maxima when I wasn’t willing to pay for a Mathematica license.  Maxima has pretty powerful symbolic capabilities, but it’s written in LISP, and you have to program it with LISP.  LISP is so unlike the other languages that I use that it wasn’t worth the time required to master it.  Further, Maxima’s plotting capabilities are pretty primitive.  Sage gives you access to the power of Maxima, and a lot more.
That’s all that I can say from my personal experience.  Try Sage and see what it can do for you!

Sage logo
Sage logo

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.