You are here

Mathematica® in Action: Problem Solving Through Visualization and Computation

Stan Wagon
Publisher: 
Springer
Publication Date: 
2010
Number of Pages: 
578
Format: 
Paperback with CDROM
Edition: 
3
Price: 
84.95
ISBN: 
9780387753669
Category: 
Textbook
[Reviewed by
Allen Stenger
, on
08/2/2010
]

This book is a pleasing potpourri of Mathematica showpieces, picked to show the value of Mathematica for mathematics teaching and investigation. All the Mathematica code is provided on the included CD-ROM. Although there is an introductory chapter explaining Mathematica, it is just enough to get you oriented and the examples go far beyond anything in this introduction. This book may motivate you to learn Mathematica but it won’t teach it to you.

The book is full of interesting things. The first half focuses on visualization and the math is relatively elementary (nothing beyond multivariable calculus). The second half works on much harder problems. Here are some of the more interesting examples covered:

  • The “icing on the cake” problem successively cuts contiguous sectors of x radians from a cake and flips them over in place. If x divides 2π evenly, then clearly after a finite number of steps all pieces will have the icing up again. If x does not divide 2π evenly, our intuition is that we will never return to the all-icing-up state, but in fact we do return after finitely many steps. For example, for 1-radian slices, it takes 84 steps. The book quotes the formula for this problem (without proof) and gives an animation that demonstrates the truth of the formula.
  • The Bailey-Borwein-Plouffe infinite series for π gets very thorough coverage. This series is the 1995 result that allows the calculation of any desired digit in the (base 16) expansion of π using single-precision arithmetic and without calculating the earlier digits. The book shows how to calculate any desired digit and proves that the infinite series is correct, and discusses how the series was discovered. The series is one of those results that are hard to think of but easy to prove once you have it.
  • Three of the problems from the book The SIAM 100-Digit Challenge: A Study in High-Accuracy Numerical Computing are covered here, although in less detail and with programs that produce less precision than in that competition. (That book makes extensive use of Mathematica and other math programs and is a good source for readers interested specifically in numerical analysis applications of these programs.)

One weakness of this book is that it says very little about the accuracy and reliability of numerical results from Mathematica. On p. 507 we ask for the fraction with the smallest denominator that is within 10-20000 of ζ(5)/π5, and Mathematica gives us an answer after one line of code and a few seconds of calculation. Is Mathematica’s answer correct? Can Mathematica really calculate (or look up) these constants to enough thousands of digits of precision and then make a delicate determination regarding the nearest fraction that has many thousands of digits in the numerator and denominator? Well, probably, but there’s no obvious way to check such a result and it seems to require a lot of faith.

In the other direction, on p. 524 we ask Mathematica for the numeric value of a much simpler problem, namely the integral from 0 to 1 of x20 ex, and we get the obviously wrong answer 0. The moral of this second story, according to the book, is to be wary of cancellation error (the culprit in this case) and to investigate alternative methods of calculation. But in many cases the error would not be so obvious, and in the ζ(5) example we have no idea how the values are determined and no way to know when we should worry.

The book also says almost nothing about experimental mathematics, that is today a very important application of symbolic calculation programs such as Mathematica. There are whole books on this subject, for example Experimental Mathematics in Action, but because this is an important use of Mathematica it would have been nice to have some coverage here.


Allen Stenger is a math hobbyist and retired software developer. He is webmaster and newsletter editor for the MAA Southwestern Section and is an editor of the Missouri Journal of Mathematical Sciences. His mathematical interests are number theory and classical analysis. He volunteers in his spare time at MathNerds.org, a math help site that fosters inquiry learning.