Mathematica upgrade simplifies design tasks

Jan. 1, 1997
For those unfamiliar with Mathematica, it is one of those rare software packages that actually get better with age. Mathematica frees scientist-engineers to concentrate on their problems by providing tools to handle the associated mathematics. Since the initial release of this integrated mathematical program in 1988, a tremendous development environment has emerged. Having been a Mathematica user since 1989 for such tasks as laser-radar rangefinder development (see Laser Focus World, Sept. 1996,

Mathematica upgrade simplifies design tasks

Timothy D. Cole

For those unfamiliar with Mathematica, it is one of those rare software packages that actually get better with age. Mathematica frees scientist-engineers to concentrate on their problems by providing tools to handle the associated mathematics. Since the initial release of this integrated mathematical program in 1988, a tremendous development environment has emerged. Having been a Mathematica user since 1989 for such tasks as laser-radar rangefinder development (see Laser Focus World, Sept. 1996, p. 77), I happily explored a beta version of the newly released version 3.0.

Overview of upgrade

Several computation capabilities were added to the software kernel, including the addition of 250 built-in special functions. Graphing control and formatting were enhanced, execution speed was increased, and the system interface was improved. Even the emergence of the World Wide Web was not ignored. Notebooks, which represent the environment where users input and edit commands, can be saved directly in HTML, and the notebooks themselves support hyperlinks.

One of the most significant revisions made to Mathematica was to the notebook`s input and output commands. High-quality WYSIWYG two-dimensional mathematical typesetting, such as xy, is now possible as is availability of predefined characters via palettes. Palettes offer the user an array of software buttons that represent a sequence of keystrokes or commands (palettes can also be user-defined). With palettes, you can quickly enter your expressions into a notebook.

Typesetting provides an easily readable format directly executable by the kernel and includes access to text within plots (see Fig. 1). This change required developer Stephen Wolfram of Wolfram Research (Champaign, IL) to alter the nature of the notebook entity--the entire notebook itself is now an executable expression. As such, notebooks can support diverse front-end operations including use of buttons to execute Mathematica commands, implement hyperlinks, and produce publication-quality documentation.

Version 3.0 supports two new expression formats, TraditionalForm for traditional textbook formatting of equations and StandardForm. Although its appearance is more in line with textbook and article typesetting, TraditionalForm requires Mathematica to perform heuristic interpretation. For example, with the expression, cos-1(x), Mathematica must interpret it to mean arccos(x), not 1/cos(x). StandardForm, however, is unambiguous.

One difficulty is that Undo, from the Edit menu, is not available to return to the original format if you dislike the results of a Format manipulation. Instead, you have to go back to the Format menu to deselect or reselect a particular format. This extra ste¥slows work until you become sufficiently familiar with the different notebook displays to know what to expect when trying them out.

Computational capabilities

The software internal compiler has undergone significant revision; improvements include list operations, direct compilation of functions, streamlining the InterpolatingFunction smoothing function, control of floating-number representation, adding three methods for evaluating integrals, interval arithmetic, adding special functions, expanded trigonometric operations, matrix decomposition, and power series commands. InterpolatingFunction objects provide approximate numerical solutions to functions f(x) over a range of the independent variable x using smooth interpolation. The implemented smoothing approach forms divided differences of the function to define LaGrange or Hermite interpolating polynomials. The differential equation solver, NDSolve, works with boundary values given ordinary differential equations, and partial differential equations can now be solved if there are no mixed derivatives of two independent variables (see Fig. 2).

The NDSolve memory requirement in version 3.0 for a PowerPC Macintosh requires a minimum of 15 Mbyte with 17 Mbyte recommended. (Versions 1.2 and 2.2 require 2.5 and 4 Mbyte, respectively.) To be fair, there are optimization steps available, but they involve bookkeeping that re quires closing un used notebooks, clearing the clipboard, setting the monitor to fewer colors, or saving notebooks after significant calculations have been completed.

The review Mathematica Beta 2 edition software was installed on a Power Macintosh 8100/80AV (with RAM totaling 65 Mbyte with a 500-Mbyte disk) running MacOS 7.5.3 (System 7.5 Update 2.0). For the Loren¥calculations of Fig. 2, memory was set to 7 Mbyte (front end) and 11 Mbyte (math kernel). It took two tries to get ample memory for the math kernel to do the task ending with 15 Mbyte. Watching the memory meter for the kernel indicated that during the NDSolve operation, 14 Mbyte was required, but for the most part the recommended 11 Mbyte sufficed.

Such memory consumption became a problem while trying to run Mathematica on the road with version 3.0 gobbling more memory than the Macintosh PowerBook 180C could muster. Minimum memory requirement is 7 to 9 Mbyte for such 680 ¥ 0-based systems, and the maximum RAM for a 180C is 14 Mbyte.

Graphing control and format

Graphing control has been enhanced, kernel control of notebook animation is available, and graphic primitives can accept absolute offsets. Final graph characteristics, such as size and resolution, are now directly controllable. Formatting version 3.0 graphic output supports automatic conversion to EPS, TIFF, GIF, Adobe Illustrator, Bitma¥(MGF), PICT, and Quicktime files. File saving and editing benefit from multiple format selections for use with other applications such as word processors.

I originally selected Mathematica to provide graphs with attributes I could manipulate. In designing laser rangefinders, radiometric questions arise that require selection of various system parameters. One plot compares range performance for various values of laser energy (or power). The original notebook was created using version 2.2. Opening this notebook in version 3.0 was painless. There were no user-symbol name conflicts with version 3.0, and no commands employed in the original notebook were superceded (these being cited as difficulties in converting the older notebook to version 3.0). Recalculation of the notebook using version 3.0 provided identical results as that obtained under version 2.2 (see Fig. 3).

However, problems occurred copying and printing graphics with the beta version both from Mathematica itself and when pasting version 3.0 graphics in Word 6.0 documents. Using Bitma¥copy, I got the transfer, but the resolution was quite inferior. I tried for the "PICT with embedded Postscript," and, although my monitor showed me that I had a wonderful graphic, at times nothing printed and at other times a mirror image came out. The solution was to use screen dumps and the Insert Picture command within Word to transfer the image.

Notwithstanding, this newest version of Mathematica lives u¥to its release announcement. Wolfram Research has listened to its users and has incorporated significant improvements to its software. o

Click here to enlarge image

FIGURE 1. Mathematica 3.0 front-end takes the StandardForm typed input (top, shown with the resulting plot) and manipulates it through menu selections to produce the more readable version. TraditionalForm (bottom). Plot of Hermite polynomials, used to describe quantum mechanical wave functions for harmonic oscillators, illustrates the state for an excited harmonic-oscillator whose average represents the classical representation.

Click here to enlarge image

FIGURE 2. Solution to the Loren¥equations illustrates use of NDSolve with initial conditions (top). InterpolatingFunction presents itself in the resulting output with extraneous information suppressed. Plot of Loren¥equation solution presents the plotting command (bottom).

Click here to enlarge image

FIGURE 3. Conversion routine in front end of version 3.0 performs calculations contained within an earlier notebook composed under version 2.2, such as an output plot of signal to noise ratio (SNR) as a function of laser power and range, then generates a plot.

Sponsored Recommendations

On demand webinar: Meet BMF’s first hybrid resolution printer, the microArch D1025

July 26, 2024
Join us in this webinar to explore our newest product release - the microArch D1025 - our first dual-resolution printer. Learn more!

Meet the microArch D1025: Hybrid Resolution 3D Printing Technology

July 26, 2024
Meet BMF's newest release, our first dual-resolution printer for the prototyping and production of parts requiring micron-level precision.

Optical Power Meters for Diverse Applications

April 30, 2024
Bench-top single channel to multichannel power meters, Santec has the power measurement platforms to meet your requirements.

Request a quote: Micro 3D Printed Part or microArch micro-precision 3D printers

April 11, 2024
See the results for yourself! We'll print a benchmark part so that you can assess our quality. Just send us your file and we'll get to work.

Voice your opinion!

To join the conversation, and become an exclusive member of Laser Focus World, create an account today!