David Bakin’s programming blog.

Review of "An Introduction to Modern Mathematical Computing with Mathematica" (Borwein, Skerritt)

An Introduction to Modern Mathematical Computing with Mathematica by Borwein and Skerritt, aims to show how you can improve your understanding of mathematics by experimenting in a Computer Algebra System (CAS). It uses Mathematica (there’s a Maple version available). The book picks three areas of (lower division college) math to work with – Elementary number theory (including tastes of the Fibonacci sequence, perfect numbers and amicable pairs, continued fractions, and the sieve of Eratosthenes), Calculus (with tastes of limits, differentiation, integration, differential equations, and surfaces and volumes of rotation), and linear algebra – and uses a tutorial style to demonstrate how to use a CAS to perform experiments, to compute things in multiple ways to enhance your understanding of the relationships between different mathematical ideas, and to discover edge cases where theorems – or your intuitions – might not work.

Along the way it teaches the minimum you need to know about Mathematica to make progress. The goal isn’t to teach Mathematica as a programming language but as an adjunct to mathematical study. What is covered includes basic syntax, defining functions, conditionals and loops, and some Mathematica-specific features (not common in mainstream programming languages) like pattern matching. Different kinds of basic plotting functions are also described and used. At all times the reader is encouraged to look for more information in the Mathematica documentation – and given search terms to help with that.

The section on elementary number theory is where the Mathematica syntax and semantics is introduced, including loops, functions, and numerical versus symbolic evaluation. The calculus section emphasizes the Mathematica plotting functions. Finally, the linear algebra section adds matrices and more on symbolic evaluation (and could really have used some plotting examples: plotting (or better, animation) would have been very effective to show what eigenvalues and eigenvectors are and how they really work).

Each section ends with a number of (simple) exercises to help ensure that you’ve learned both the math and the Mathematica covered in the section. And, each section also has a set of “Further Explorations” which are related mathematical questions that are intended to be used as a launching point to learn something using the techniques explained in the book (though the further explorations in the linear algebra section are rather slim).

There’s a final section on “visualization” and geometry: A few more Mathematica features related to plotting, and a suggestion that you can use other software tools – besides a CAS – for the same purposes: to visualize mathematics and gain understanding. They use the dynamic geometry program Cinderella as the example software here, providing two simple and short investigations in plane geometry. (I appreciated this as Cinderella happens to be my dynamic geometry program of choice – having excellent built-in support for non-Euclidean geometry, also affine and projective geometry, also simple physics simulations, and is fully programmable besides.)

This book really meets its objective of showing the reader how to explore mathematics using a computer algebra system, while at the same time giving a brief introduction to a specific CAS, Mathematica. It is well written. I highly recommend it as an introduction to this great modern way of learning mathematics. To further your practice in both Mathematica itself and in using Mathematica to explore mathematics, I also highly recommend Mathematica in Action, 3rd edition, by Stan Wagon. It has much more mathematics, and much more Mathematica.

(I do have to point out that the book has a lot of typos. In fact, I should stop here. The typos (largely in Mathematica code) are easily fixed by the reader and don’t detract from the contents of the book. That’s why I give this book 5 stars even though it has typos. So you can stop reading here unless you’d like to help me work off my pique.

When I say this book has typos: I mean, it has plenty of typos. I marked 50 in the first 100 pages then gave up. Most are trivial errors in Mathematica code, e.g., missing commas or misplaced braces, that are easily seen by the reader or discovered as soon as you type the code into Mathematica, and in these cases the fixes are obvious so there’s no problem. In some places the typo isn’t so obvious but you can tell from context what’s wrong. Elsewhere there are copy-and-paste errors where two Mathematica examples, supposedly different ways to do something, are in fact identical. Two of the plots, if you actually execute their code, produce slightly different results from the (correct, intended) picture in the book. Several times an equation being discussed has different variables in the text (e.g., “a”) than in the code sample (e.g., “x”), or even in two consecutive sentences in the text! In a couple of places in the text , the variable is in one place in a sentence the Greek letter $\theta$ and in another place in the same sentence the word “theta”.

In one remarkable type (page 101) the discussion in the book, having previously encouraged the use of the online Inverse Symbolic Calculator, wants to make the point that you shouldn’t rely on the results from the ISC: you use them as a suggestion, and validate them some other way. This is a good point, but the example it gives is totally bollixed up. The authors show a calculation of a particular integral giving a specific 10-digit numerical value. Then they look it up using the ISC and get a suggestion for a formula for this value that matches to 10 digits. Then they say that if you actually calculated the integral beyond 10 digits it becomes obvious that the value of the integral is not the value of the formula. The problem is: The numerical value they give for the integral has its last two digits transposed. And THAT transposed value is the one they looked up in the ISC (which I determined by plugging the formula into Mathematica and getting its numeric value to 10 digits). So no wonder it didn’t match! The point of the paragraph is still valid; the example was broken, because of a bad copy of the value from Mathematica into the text!

Why am I harping on these typos so much when I say they don’t really affect the content of the book, which his still excellent? Pique! It is hard to write a book, I know. So hard, that even though I’d like to sometime write a technical book of my own I haven’t done it yet and doubt I ever will. I have a lot of respect for book authors for writing books. One of the authors of this book, Borwein, has written 10 books (and hundreds of papers). What is so difficult for me to do is apparently so easy for him that he can just write ’em and publish ’em and get on to the next thing, without even worrying about the details. Couldn’t he have found an undergraduate who would have proofread the book, typing the expressions into Mathematica, for $100, or even just brownie points? Where’s the pride? See: it is just my pique getting scratched in these last 4 paragraphs. Don’t let it stop you from learning from this very good book.)