Mathematica Cookbook: Not a tutorial, but a Useful Guide
Concentrating on the useful, versus the abstract
The latest effort to help those new to Mathematica comes from the O’Reilly folks, known for their programming texts with the zoological covers. This one has the shell of a marine snail, for those of you into zoology. For those not, let’s take a look at the pedagogical value of this book.
As readers of this column probably know, Mathematica is software that does mathematics. Its symbolic code offers not only math, modeling and simulation, but a complete documentation and deployment tool. This cookbook assumes a basic knowledge of the program and is not a beginner’s guide. Rather it ‘jumps right in’ with code and examples. Lots of them!
To give you an overview, the chapter titles from the Table of Contents appear below:
2: Functional Programming
3: Data Structures
4: Patterns and Rule-Based Programming
5: String and Text Processing
6: Two-Dimensional Graphics and Plots
7: Three-Dimensional Plots and Graphics
8: Image Processing
9: Audio and Music Processing
11: Calculus: Continuous and Discrete
12: Statistics and Data Analysis
13: Science and Engineering
14: Financial Engineering
16: Parallel Mathematica
17: Interfacing Mathematica
18: Tricks of the Trade
19: Debugging and Testing
Two thoughts come to mind in perusing the above list: it is heavy on programming and also on applications other than strictly math and science. As a bumbling programmer, your editor is not too bothered, as Mathematica is actually coded for most problems, actually crossing over into the sophistication of programming for more advanced applications. The emphasis of the book on a lot of non-math areas is a bit more bothersome, but the inclusion of much code for many problems is the saving grace. For those interested in applications in special areas, go to www.wolfram.com/books to see a complete listing.
The first chapter on numerics was fascinating, and I learned quite a few interesting facts and techniques (e.g., approximations, precision and accuracy, numeric types, working with intervals). For reasons of personal interest, I then very quickly glossed over chapters 2 through 9 to get right into the all-to-brief chapters on math.
The chapter on algebra quickly separates the two main classes, i.e., elementary algebra and abstract algebra. The former is our good friend from high school where we manipulate and solve equations, while the latter is concerned with the description and behavior of groups, rings and fields. The author serves up many recipes for solving algebraic equations that are both lucid and powerful. Their big advantages are, of course, to relieve the drudgery of tedious hand calculations. With only 11 pages, this left me begging for more. However, as previously implied, this is not a beginner’s guide, but rather a cookbook for the intermediate types.
The chapter on calculus manages, in 29 pages, to cover the more important topics met in an undergraduate course in this area. Here, we not only get recipes for the more common operations (calculating limits, differentiation, integration, max/min problems, vectors and, very briefly, differential equations) but also clear explanations of the use of nomenclature, symbols and algorithms by Mathematica.
The chapter on statistics and data analysis was most interesting to me, due to long years in the field. Here, the book charmed your editor by mentioning that, while most of us use statistical software such as SAS, SPSS and R, Mathematica has greatly beefed up this feature in version 7. It also directs us to another O’Reilly book that I had previously reviewed and highly regard (Boslaugh and Watters’ Statistics in a Nutshell).
While beautifully walking us through the various techniques, and demonstrating the most useful and frequently used descriptors, graphics and texts, it leaves the applied statistician wondering why we are doing all that typing! For the mathematical statistician, the available tools in the areas of probability and distributions are superior to those available in most menu-driven programs, and the author delves into this with several useful recipes.
This book is not recommended for the new user. However, for anyone with cursory knowledge of the software, it supplies a number of very nice examples with which to extend user expertise. Also, it serves as a very nice overview of Mathematica’s capabilities and concentrates heavily on the useful, versus the abstract.
Mathematica Cookbook, O’Reilly Media. Sebastopol, CA. 832pp. (2010) $64.99. www.oreilly.com
John Wass is a statistician based in Chicago, IL. He may be reached at editor@ScientificComputing.com.