A new blog member asked “Why do you use Mathcad?” in response to my most recent post about using some of the funds donated by visitors to the blog to help fund my research.

It’s a very good technical question, and one that deserves more than just a reply to the comment. So I’ll try to explain why here.

I build dynamic models of the economy using systems of ordinary differential equations. There are many programs that support this these days, from public domain programs like Scilab to commercial giants like Mathematica and Mathcad. I’ve tried most of them, and I’ve stuck with Mathcad for two reasons:

Its interface is very natural; and

Its error messages are easy to interpret.

I’ll try to illustrate this with simulations of the same system in both Mathcad and Mathematica. Firstly, here’s a successful output from Mathematica of my simplest endogenous money model with growth and a credit crunch:

And here’s the same model in Mathcad:

Though there’s much more that you can do with Mathematica graphs, I find the Mathcad display more intuitive–more like what a mathematician would write on a sheet of paper, which is precisely Mathcad’s design philosophy.

But the main difference comes with the next feature: the error messages the two programs generate when, as so often happens, you make a mistake in your early attempts to simulate a model. In this instance, I have typed “ss” where I meant to type “s” in a particular function. Here’s Mathematica’s reaction to that:

Huh? What does “NDSolve::ndinnt: Initial condition 400. ss is not a number or a rectangular array of numbers” mean? That’s a trivial example, and of course I already know, but when you’re crafting a complex model and make an accidental mistake, it can be non-trivial exercise to locate the error–even if it is in fact a trivial one like this.

Now here’s the same error in Mathcad, and the first stage of its reaction:

Ahah! I have an (as yet unidentified) undefined variable! I click on “trace error”, and get the next window. If there was a cascade of errors, the “Previous” button would be highlighted, but since there’s only one, when I shut this window down Mathcad puts the cursor right on the offending “ss” variable.

This makes developing and debugging a model in Mathcad an order of magnitude easier than in Mathematica. I know that Mathematica is the more powerful system, but that power comes at a cost of a much more opaque error correction interface.

If these errors were parsed by the program, so that it did what Mathcad did in identifying the source of the problem, then I could quite easily consider developing initially in Mathematica. There would be advantages here–notably the ability to export equations directly to TeX for journals that require that format, but many many others.

But until that happens, I make an engineer’s choice to choose the most effective tool rather than the most powerful or elegant one.