• Home
  • Readings
  • Github
  • MIES
  • TmVal
  • About
Gene Dan's Blog

No. 39: Exploring SAGE as an Alternative to Mathematica

21 September, 2011 1:33 AM / 2 Comments / Gene Dan

Hey everyone,

After spending some time experimenting with Mathematica, Maxima, and Sage, I’ve finally decided to use Sage as my primary computer algebra system (CAS)!  In short, computer algebra systems act like high-performance calculators, and their primary strength lies in the fact that they can manipulate mathematical expressions in symbolic form. Sage, in particular, has several benefits over Mathematca:

1) Sage is open source software, which means you can freely download, modify and distribute its source code. Mathematica, on the other hand, is proprietary software and a home license costs $300. If you want to use it for work, it’s a whopping $2500 for an individual license – and you can only install it on one machine. With Sage, it’s affordable, you don’t have to pay more for newer versions, and the fact that it’s open source means you can actively participate in the development community.

2) Sage uses Python. Python is a free programming language and it’s very easy to learn. If you already know Python, you won’t be bogged down learning a new language just to use the software.

3) Sage includes Maxima. Sage is actually made out of more than 90 different mathematical packages – one of which is Maxima – all integrated under a single interface with which you can communicate using only Python. For example, Maxima is written in Lisp, so you would have to learn some of it to become proficient with the program. However, if you use Sage, you can utilize Maxima even if you only know Python.

Sage, released in 2005 is relatively new compared to other CAS programs and still has a lot of raw edges. Known bugs and tasks that need to be completed are posted online and users are free to take on these challenges. I picked up a new, much, much, much needed book, the Sage Beginner’s Guide, which should give me a basic working knowledge of the program. I first tried installing Sage on my Linux machine about 3 years ago, and when I tried doing it then it took a lot of effort and a lot of command-line agony to get it to start working. Now I would say that the package has gone a long way, though it still doesn’t work on Windows. If you want to use it on Windows, you must install a Linux virtual machine using either VirtualBox or VMWare. Right now I have 3 cores and about 4 GB of RAM dedicated to a virtual machine set up on Fedora Linux – from there you can run Sage from your browser:

Sage runs on a Fedora Linux machine

Screenshot of the Sage Notebook Interface

Here are some examples of what Sage can do from the book – we plot 2 functions and place labels at their solutions. The following code:

The code defines the functions, finds the solutions, and plots the graph. Parameters can define labels, colors, etc.

Produces the following image:

Image produced from the preceding code

Also, the following code:

Code for plotting a Klein Bottle

Produces a 3D plot of a Klein Bottle:

A Klein Bottle

Sage can also display results in symbolic form:

Partial Fraction Decomposition

Here, Sage instantly calculates the above partial fraction decomposition. Anyone want to try it by hand?

I’m totally hooked. Sage, which is totally free, is extremely powerful – much more powerful than any expensive HP or TI calculator on the market. Right now Mathematica, Matlab, and Maple are more complete software packages that come with professional support, but they come at a cost. However, I think Sage can be the real Mathematica killer, similar to the way that R is currently eating into the market share of SAS – Sage, which is headed by professor William Stein of the University of Washington, is currently under active development by computer programmers and mathematicians all around the world! Check out the Sage website if you want to get involved. The era of extremely high-priced software can only last so long…

Posted in: Logs, Mathematics

2 Thoughts on “No. 39: Exploring SAGE as an Alternative to Mathematica”

  1. Pingback: No. 91: Learning Linear Algebra | Gene Dan's Blog

  2. Pingback: No. 104: 70 Days of Linear Algebra (Day 2) | Gene Dan's Blog

Leave a Reply Cancel reply

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

Post Navigation

← Previous Post
Next Post →

Archives

  • September 2023
  • February 2023
  • January 2023
  • October 2022
  • March 2022
  • February 2022
  • December 2021
  • July 2020
  • June 2020
  • May 2020
  • May 2019
  • April 2019
  • November 2018
  • September 2018
  • August 2018
  • December 2017
  • July 2017
  • March 2017
  • November 2016
  • December 2014
  • November 2014
  • October 2014
  • August 2014
  • July 2014
  • June 2014
  • February 2014
  • December 2013
  • October 2013
  • August 2013
  • July 2013
  • June 2013
  • March 2013
  • January 2013
  • November 2012
  • October 2012
  • September 2012
  • August 2012
  • July 2012
  • June 2012
  • May 2012
  • April 2012
  • March 2012
  • February 2012
  • January 2012
  • December 2011
  • September 2011
  • August 2011
  • July 2011
  • June 2011
  • January 2011
  • December 2010
  • October 2010
  • September 2010
  • August 2010
  • June 2010
  • May 2010
  • April 2010
  • March 2010
  • September 2009
  • August 2009
  • May 2009
  • December 2008

Categories

  • Actuarial
  • Cycling
  • Logs
  • Mathematics
  • MIES
  • Music
  • Uncategorized

Links

Cyclingnews
Jason Lee
Knitted Together
Megan Turley
Shama Cycles
Shama Cycles Blog
South Central Collegiate Cycling Conference
Texas Bicycle Racing Association
Texbiker.net
Tiffany Chan
USA Cycling
VeloNews

Texas Cycling

Cameron Lindsay
Jacob Dodson
Ken Day
Texas Cycling
Texas Cycling Blog
Whitney Schultz
© Copyright 2025 - Gene Dan's Blog
Infinity Theme by DesignCoral / WordPress