*Numerous open-source software packages now provide engineering math capabilities and go easy on the pocketbook.*

*Leland Teschler • Executive Editor*

The Mars Climate Orbiter made headlines back in 1999 when it approached Mars on a trajectory bringing it too close to the planet and wound up either destroyed in the Mars atmosphere or orbiting the Sun. What caught the public’s attention wasn’t so much the failed mission as the cause of the failure: An investigation found a measurement mismatch between two software systems. NASA had used metric units while spacecraft builder Lockheed Martin had used English units.

If engineers working on the Orbiter had access to today’s software for engineering math, the spacecraft might still be happily orbiting the Red Planet. That’s because this kind of software frequently supports all measurement units, allowing English and metric units to be mixed in equations without fear. Generally, software users can add equations, text, and images in a freeform manner. In many packages, equations are live-linked in a manner resembling that of a spreadsheet so their values update when something changes.

And happily, many such engineering software packages are now available for free or nearly so. The motivation for these open-source programs seems to be the desire for low-cost alternatives to established math packages such as MathCad, Maple, and Maple Flow. First released in 1986, the most recent version of MathCad is called MathCad Prime and is now available via subscription with a commercial license typically running around $700 annually. A single seat of Maple or Maple Flow costs about $2,400.

Among the free alternatives with features resembling those of these commercial packages is SMath Studio. Users say it behaves much like older generations of MathCad. As do other packages in this category, SMath keeps track of units. For example, suppose you ask the program to solve *X + Y = Z *and tell it that *X* is in feet while *Y* is in meters. SMath knows enough to automatically convert the differing units so *Z* is consistent with them.

*X + Y = Z*) as well as solve systems of symbolic equations and do symbolic differentiation, do matrix operations as well as find determinants, find roots of polynomials and functions, do numeric differentiation and integration, execute simple multiline looped programs, and handle user-defined functions.

Users have said the program’s user interface resembles that of graphing calculators of yesteryear. Though there’s no single help file, a tutorial on various forms of math (SMath for Physics) is available from the SMath site and is enough to get most users up and running. The program boxes each equation off and solves it, automatically providing some organization to entered data. In addition, the program provides a drop-down menu of functions that can be inserted by name, useful for users who know the name of an equation but not how to write it.

Users say the primary difference between SMath and later versions of MathCad, now called MathCad Prime, seems to be MathCad Prime’s inclusion of collaboration features. Also, Prime seems to be better at handling large systems of equations.

The Matlab commercial analytics program has at least two free alternatives, GNU Octave and Scilab. Developed by Mathworks, Matlab is billed as a proprietary multi-paradigm programming language and numeric computing environment. It has a reputation for handling heavy duty numeric computing tasks and allows matrix manipulations, plotting of functions and data, implementation of algorithms, and creation of user interfaces. An optional toolbox uses the MuPAD symbolic engine for symbolic computing. An additional package called Simulink adds graphical multi-domain simulation and model-based design for dynamic and embedded systems.

Matlab uses its own programming language, so entry of equations isn’t as intuitive as for programs like SMath. But Matlab supports high-level features such as object-oriented programming and can call functions and subroutines written in C or Fortran. Currently a perpetual license for Matlab runs $2,150 with an annual license going for $860.

Like Matlab, Scilab is a numerical computational package and a high-level, numerically oriented programming language. It is used for many of the same applications as Matlab such as signal processing, statistical analysis, fluid dynamics simulations, and so forth. The syntax of Scilab resembles that of Matlab, and a built-in source code translator helps convert code from Matlab to Scilab.Also like Matlab, Scilab has many contributed toolboxes for handling tasks in specific domains such as image processing and wavelets. Originally released in 1990, since 2016 Scilab can be embedded in a browser and be called via an interface written in Scilab or an API. This new deployment method is said to have the advantages of masking code and data as well as providing access to large computational power.

Another Matlab-inspired free program is FreeMat. The FreeMat home page says the program is chartered to go beyond Matlab to include features such as a codeless interface to external C/C++/Fortran code, parallel/distributed algorithm development, and advanced volume and 3D visualization capabilities. FreeMat is said to support roughly 95% of the features in Matlab, but not GUI/Widgets. The FreeMat site also says this feature is in development, but the last release of FreeMat seems to have been in 2013.

##### Math helpers

In addition to the programs oriented toward engineering, there are numerous free packages that focus on algebra and calculus. These may lack the domain-specific programming aids and units-cognizance of Matlab and MathCad-inspired freeware. But they can be helpful for knotty math problems.

The math freeware that perhaps has the most computational horsepower is of use to those comfortable programming in the Python language. ScientificPython is an open-source library of scientific tools for the Python programming language. However, as of this writing, it has not been updated since 2014. The library includes mathematical tools like differentiation for functions of any number of variables up to any order; numerical integration; a Newton-Raphson method for numerical root finding; non-linear least squares fitting; and several other capabilities.

Another Python resource is SciPy. This is another library containing modules for optimization, linear algebra, integration, interpolation, special functions, FFTs, signal and image processing, differential equation solvers, and other tasks common in science and engineering.

SageMath (previously Sage or SAGE, System for Algebra and Geometry Experimentation) is a computer algebra system covering many aspects of mathematics, including algebra, combinatorics, graph theory, numerical analysis, number theory, calculus and statistics. It builds on top of several other open-source Python packages that include SciPy and many more. It accesses them through a common, Python-based language or directly via interfaces or wrappers.

There are many other free math programs that aim a bit lower, computationally. But one called SpeQ includes the same support for units as programs like MathCad so users needn’t worry about entering the right conversion factors. All calculations are entered in a sheet UI. Users can define custom variables and functions and graph the results. The program can express calculations with arithmetic, conditional, logical and bitwise operators and includes around 100 built-in mathematical, physical and conditional constants. There are around 60 built-in functions for analysis, arithmetic, complex numbers, hyperbolic functions, statistics, trig, and others.

The Euler Math Toolbox was also inspired by Matlab, but the syntax is not exactly compatible. Like Matlab, Euler is a matrix language designed to handle vectors and matrices, in most cases without explicit loops. Euler does symbolic math with the help of another free program called Maxima. One good thing: Euler is still actively developed with two updates released earlier this year.

Another free program called Math Mechanixs lets users type in mathematical expressions as they might write them on a piece of paper. The software uses a multiple-document interface to permit working on multiple solutions simultaneously. There is a scientific calculator combined with an integrated variables and functions list window to simplify the tracking of defined variables and functions.Math Mechanixs also provides a library of over 280 embedded functions in general math, trig, chemistry, geometry, statistics, among others. A calculus utility contains a numerical integration module for single, double, and triple integration as well as a numerical differentiation module for single, double and triple differentials. DW

### You may also like:

Filed Under: TECHNOLOGIES + PRODUCTS, ALL INDUSTRIES, Product design, Software