You are here


Paul J. Nahin
Princeton University Press
Publication Date: 
Number of Pages: 
[Reviewed by
David S. Mazel
, on

The purpose of computing is insight, not numbers.
Richard Hamming

How might computers and computing relate to mathematics? Is there a place for computing in the mathematical world? These are the sorts of questions that interest Paul Nahin, who has written many wonderful mathematics books, such as An Imaginary Tale, Dr. Euler’s Fabulous Formula, Chases and Escapes, and Dueling Idiots.

Some of Nahin’s books have been about particular types of equations (Dr. Euler’s Fabulous Formula) and some have been about computer simulations to explore probability problems (Dueling Idiots). They all have certain characteristic traits. Each is a tour de force of completeness, and they are all highly readable with clear explanations. Most have challenge problems for the reader, and answers for the impatient. In short, they are a delight. Number Crunching, his newest book, is all these things and more.

In Number Crunching, Nahin’s goal is to show you how to use computers to study and model intriguing mathematical problems. His tool is a personal computer and his software is, as it has always been, MATLAB.

Nahin, a retired electrical engineering professor, knows how to teach. His books reflect a lifetime of clear explanations. Number Crunching greets you with short description of a bit of mathematical physics and a gentle problem: How can you locate a break in electrical cable? Let’s make the cable long and under the sea.

Next, we see Richard Feynman’s unpublished probabilistic proof of Fermat’s Last Theorem. It’s not mathematically satisfying, but it does show that if the theorem was false, the probability of it being so is very small. Nahin uses this idea to introduce the reader to numerical computation. It’s a great beginning.

Nahin next explores some interesting electrical engineering circuit analyses. This seems to be a new topic, not discussed in his earlier books. As an electrical engineer myself, I must confess to feelings of nostalgia and fond memories of my undergraduate days.

The electrical engineering problems are not typical course work, however. They are more playful. There are infinite resistor ladders, for example, not uncommon but not something you’re likely to build. There are also R-L-C circuits (resistors, inductors, and capacitors) as in undergraduate circuit analysis, but it’s not the least bit boring because his examples are inventive and creative. Nahin guides the reader along and explains circuit analysis, in case you forgot it or never learned it. He shows you how to derive equations to model the circuits in terms of voltages and currents. When he can, he solves these equations in closed form.

What he also does, and this is part of the computer analysis, is introduce you the Electronic Work Bench (EWB). EWB is a software package that analyzes circuits for you and allows you to play with the circuit elements by topology and the values of components. As you play with the circuits, EWB can show you how the changed circuits behave. It’s an example of how computers can be used to for insight into (and solutions to) real-world systems. Nahin shows you how to build circuits with active elements (in this book, only operational amplifiers are used) and then how EWB will analyze the circuit.

If you are new to circuit analysis this may not seem like a big deal. But if you have been around a bit, you may remember when circuit analysis was difficult and laborious. I remember learning about Bode plots that would only approximate the frequency response of a system. Now, with a program like EWB, you can get an almost exact response for any circuit. That’s progress and that’s number crunching!

AliensI think my favorite part of the book is on the three-body problem. The problem is to use Newton’s law of gravitational attraction to find a closed form expression for three masses moving only under that force. It is astounding that a problem so simple to describe is impossible to solve. Nahin shows, however, how we can model multiple bodies with a computer simulation. I was so struck by the simplicity of the system from a programming viewpoint (certainly not mathematically) that I ran one example myself. The figure at the right is my quick approximation to Figure 5.5.2 from the book. (Some of the features discussed in the book do not appear in this figure. The point, however, is that it was a simple matter to replicate the result in the book. Then you can easily play with the code as much as you want.)

An interesting example is the Pythagorean three-body problem. In this case, place three planets on a (3, 4, 5)-triangle with value of the masses at each vertex the same as the opposite side length. For example, the mass opposite the side of length 4, is 4. Then, let the masses move under Newtonian mechanics. What happens? After complicated trajectories, one of the masses flies away from the system. The other two orbit about each other as a binary system and move away the original center of mass. Who could have thought such a thing could happen? It surprised me.

Another example, which Nahin calls “weird,” has a system of three planets orbiting together such that they move in a figure-8 shape with each planet trailing the others. It’s not clear how the initial conditions were found to generate this behavior, the text does not tell us, but seeing that it can exist is amazing.

Each chapter comes with challenge problems and solutions — always welcome. And the MATLAB code is provided for the text as well.

The cover of the book was designed by Dimitri Kartnikov. In the picture, there are twelve significant numbers hidden. A partial Fibonacci series is easy to find, and you should try to identify more. Click here for the Princeton site describing a contest to find all the numbers.

My only complaint about the book, and this holds for Nahin’s other books too, is that MATLAB is expensive. While MATLAB is easily found at engineering colleges, it could be cost-prohibitive for other readers. I wish he would use an open source product, like Octave. The Electronic Workbench product is also not open source. If a reader wanted to duplicate the circuit analyses, there again would be a substantial cost to purchasing the program. (I don’t have EWB and so I couldn’t play with the circuit analysis examples.)

Despite these issues, the book is a treat and a delight. I am sure anyone reading it will enjoy the examples, learn from the explanations, and find fun in the problems and solutions.

David S. Mazel received his Ph. D. from Georgia Tech in electrical engineering and is a practicing engineer in Washington, DC. His research interests are in the dynamics of billiards, signal processing, and cellular automata.

The table of contents is not available.