Complex Number Cruncher

Mathematica 5.1's much improved data acquisition and other enhancements gainsthe edge for high-end numerical users.

Mathematica 5.1's much improved data acquisition and other enhancements gainsthe edge for high-end numerical users.

By Barry Simon

Technical professionals often live in their mathematics package.Because of this, the release of the new version of Mathematica is animportant event. While this major thrust of Mathematica 5.1 providesmore and better ways to bring external data into the program, there arenumerous other enhancements to Mathematica, which carries an $1,880price tag.

Mathematica 5.1 has it all: symbolics, numerics and superb graphics.

Overview of the Program
From the start, Wolfram Research billed Mathematica as “a system fordoing mathematics,” indicating it had ambitions of doing it all. It didstart with superb graphics, a clean user interface, and a symbolicmathematics engine (though the engine had problems in the initialrelease). But the program has now met and exceeded its promises. Theengine is solid and the number of built-in functions is legion. Theinterface is much friendlier, with symbol palettes you can use insteadof remembering obscure syntax. And with version 5.0, the speed of thenumerical processor—always able to do complex calculations—was beefedup to handle large calculations.
At its core, there remains a symbolic engine that allows computeralgebra and calculus, exact rational arithmetic, and arbitraryprecision real manipulation. As a result, not only can the programcompute integrals numerically, but it can do so symbolically as well.Arbitrary precision real manipulation allows the numeric calculation ofmany functions where even quadruple precision would produce subtleround-off buildup.
Many simple mathematical tasks can be accomplished using Mathematica’scommand line interface, but for more involved projects you can use theproprietary programming language, which has numerous features specialto mathematical needs. For example, functions can be definedrecursively without the need for programming explicit loops. Andmathematical objects like sets and polynomials are built-in primitives.
The third leg of the traditional Mathematica triad is superbgraphics—lots of 2D and 3D functions as well as animation tools forstudying dynamical objects graphically.
The last major upgrade—version 5.0—addressed Mathematica’s numericalshortcoming. The program had long had many numeric functions and wasable to perform involved numeric calculations, but speed was often alimiter. So for version 5.0, the numeric algorithms were revamped andoptimized to improve speed. And the change was so dramatic that for onecalculation I needed in my own research, what once took five minutesdropped to 15 seconds. In addition, programmers introduced newalgorithms to deal with sparse matrices.

Data Acquisition in The New Version

Version 5.0 improved the numeric data analysis tools, so it was naturalfor version 5.1 to focus on improving the ways data can be brought intothe program. For many technical users, the most important change is arevamping of binary data I/O to improve speed by factors of 50 or more.Now, many large data acquisitions can be done in real time. This isespecially important when using the many image-processing functionsbuilt into Mathematica.
Mathematica has also implemented JDBC, a Java-based API that allowsaccess to external databases. Drivers include ODBC and MySQL withexplicit support for Oracle and Access databases. At one end of thespectrum, SQL can be used to interface the data, while at the otherend, a GUI database explorer allows direct control from withinMathematica.
The program now includes its own lightweight database to allow thosewithout a heavyweight data manipulator to make simple databasesdirectly. And there are a number of new file import types, includingMatlab binary files (.mat), TeX files (.tex), and the ability todirectly import Excel tables (.xls) into Mathematica matrices.

Mathematica 5.1 can performcomplex integrals and sophisticated graphical explorations. With newenhancements, developers can now produce state-of-the-art end-userprograms.

Improved Algorithms: Event Handling

One of the most fascinating new mathematical devices in version 5.1 isthe ability for event handling in the numeric differential equationsolver, NDSolve. For example, the user can now tell the solver tocontinue its solution for as long as necessary to meet a particularcondition or threshold.
One kind of output that event handling allows will produce functionswith different analytic forms over different regions. One can also usea new explicit function “piecewise” to define such functions. Thesymbolic engine has been modified to do things like differentiate andintegrate such functions. Closely related to this is the ability toperform multiple integrals either symbolically or numerically overimplicitly defined nonrectilinear regions.
Programming Enhancements
Like most environments that allow custom programs, Mathematica has beenused as a development tool where modules are written by one person tobe used by others. But, until now, user interface tools have beenlacking, so end users were told to invoke a function with the neededparameters as variables with an arbitrary syntax. The new Mathematicahas a GUIkit, tools so developers can now produce state-of-the-artend-user programs.
Mathematica itself has made good use of these tools to provide GUIinterfaces to a number of mathematical objects. A good example isEquation Trekker, an interactive tool for exploring ordinarydifferential equations.

The Bottom Line

The improved numerical speeds of version 5.0 and the data I/O of itsupdate mean Mathematica has an edge over its most direct competitor,Maple, for users shopping for a math program. But these areas are somature that most technical professionals made their choices long ago,and unless they have heavy numeric needs, it’s unlikely most Mapleusers will feel a need to switch.
The other two main competitors are Matlab and Mathcad; both with somelevel of symbolics licensed from Maple, but with strengths lyingelsewhere. Matlab, of course, is the number cruncher extraordinaire, sothe recent upgrades of Mathematica are aimed at its territory. Butagain, while it’s doubtful that many who use Matlab exclusively willwant to switch, it is likely that the many users of both products willfind themselves turning to Mathematica more often than in the past. Onthe other hand, Mathcad remains the product of choice for those whodon’t need the numeric power of Matlab or Mathematica, nor the symbolicpower of Maple or Mathematica. For the high-end user with multipleneeds, Mathematica has become the preferred program.

Contributing Editor Barry Simon is chairman of the math department atthe California Institute of Technology. You can send him your thoughtsabout this article via e-mail to [email protected].

Product Information:

Wolfram Research
Champaign, IL
wolfram.com

Requirements
500MB disk space, 128MB RAM,
Windows 98 or higher

Price
$1,880


Share This Article

Subscribe to our FREE magazine, FREE email newsletters or both!

Join over 90,000 engineering professionals who get fresh engineering news as soon as it is published.


About the Author

DE Editors's avatar
DE Editors

DE’s editors contribute news and new product announcements to Digital Engineering.
Press releases may be sent to them via [email protected].

Follow DE

Related Topics

Simulate   All topics
#11168