Symbolic Math

One of my colleagues in the lab finds the symbolic program Mathematica indispensable. I’ve heard similar stories about Mathematica from some of my other friends. Canadian universities tend to prefer Maple over Mathematica, so I’ve never had a chance to try it out (Maple is built by a Canadian company so maybe they also get a discount.)

The only other symbolic program I’m familiar with is Maxima. Infact, I wrote a whole introduction to Maxima many years ago, much of it now obsolete.

While reading some reviews about the newly released Mathematica 6.0, I came across a post on the wolfram blog showcasing many of the new features. One particular post that I found very useful is the visualization of various abstract features in Mathematica. I’ve taken two examples: Map and Expand. For others, read the whole post.

Map

Expand

This is really awesome. As a numerical practitioner, implementing numerical algorithms requires a context switch from a mathematician to a computer scientist. There are numerous ways to implement the same mathematical operation, not all of them equivalent (arising from the non-associative property of floating point numbers.) For example, for differentiation alone, there’s forward, backward and central differences amongst other schemes.

Another advantage of using symbolic languages is that it’s really easy to do Common Subexpression Elimination on analytical expressions. I had previously written about the special case of diffusion tensors. A particular framework for dealing with such objects is the Log-Euclidean framework. One method of computing the exponential of a matrix (one of the many described in this publication) takes about forty minutes on an image. It would be nice to eliminate places where Logs and Exps are done consecutively to save some time and improve accuracy.

I have another idea about mixing symbolic and numerical code, which I’ll write about soon.

One Response to “Symbolic Math”

  1. [...] written previously about Mathematica. I’m going to describe a really cool feature that none of the other [...]