You are here

Numerical Analysis Using Sage

George A. Anastassiou and Razvan A. Mezei
Publication Date: 
Number of Pages: 
Springer Undergraduate Texts in Mathematics and Technology
BLL Rating: 

The Basic Library List Committee suggests that undergraduate mathematics libraries consider this book for acquisition.

[Reviewed by
Jason M. Graham
, on

As the title indicates, Numerical Analysis Using Sage by George A. Anastassiou and Razvan A. Mezei covers topics from numerical analysis utilizing the open-source mathematics software system Sage to implement algorithms and carry out computer examples. The book covers the basics of nonlinear root finding, numerical differentiation and integration, interpolation, and the numerical solution of initial value problems for ordinary differential equations. Since this book only considers problems involving functions of a single variable, it should be accessible to any student with a background in single-variable calculus. Moreover, the book begins with a chapter covering the fundamentals of computing with Sage so that it is not necessary for the reader to have a background in programming or mathematics software to study from this text.

First, I will consider Numerical Analysis Using Sage as a textbook on numerical analysis. In terms of mathematical content, it covers more or less the topics covered in the first five chapters of the widely used text Numerical Analysis 10th ed. by Burden, Faires and Burden (see the MAA Review of the 9th edition), or chapters 3, 6, 7, and 8 of Numerical Analysis: Mathematics of Scientific Computing 3rd Revised ed. by Cheney and Kincaid.

In my view, there is less theory, e.g. fewer proofs of theorems, in Numerical Analysis Using Sage than in either of the books by Burden, Faires and Burden, or Cheney and Kincaid. For example, Theorem 87 on page 151 states without proof the error bound for Lagrange interpolation; proofs for this are given in the other two books. Those books also contain many more exercises of a theoretical nature. This is not to suggest that Numerical Analysis Using Sage does not develop the theory of the numerical methods it covers. Some proofs are given, and when proofs are not written out in full they are either sketched or a detailed reference where the proof of a theorem may be found is provided.

Another point to note is that this book does not cover numerical methods for solutions to systems of linear equations or optimization. It seems fairly common for a first course on numerical analysis for students of mathematics or applied mathematics to discuss some numerical linear algebra.

Nevertheless, there is a tradeoff. It can take significant time for beginning students to learn how to program or use mathematical software. Rather than opting to cover the greatest amount of mathematical content possible, Numerical Analysis Using Sage seamlessly weaves together the mathematics and the computing. This, in my opinion, makes both topics more accessible to a wider audience. In fact, throughout most of the text, the authors discussion of a topic proceeds as follows: First the method to be discussed is introduced. This often involves plotting in Sage to develop intuition. Second, the authors describe the algorithm for the method mathematically. Third, both psuedocode and Sage code are provided for the algorithm under discussion. Fourth, there is a discussion of some details of the algorithm such as error bounds, when is the algorithm suitable to use, etc. Last, the authors show how to employ a numerical method using Sage, not by programming the algorithm directly, but by calling a basic routine already implemented in Sage, usually through a scipy package. This is a very exciting feature of this text and I will say more on this in the following.

Perhaps another way to view Numerical Analysis Using Sage is as a textbook on Sage computing but applied to numerical analysis. That is, maybe the book could equally well have been titled “Sage Using Numerical Analysis.” Viewed as such, it is an excellent introduction to the Sage software system, a python-based open-source software package for mathematical computing.

The authors of Numerical Analysis Using Sage explain in detail their choice of Sage for mathematical computing. Two points are worth repeating here. First, Sage is free and does not have to be downloaded to be run since anyone can utilize the Sage cell server to run code online. Second, by learning to use Sage from this book, the reader is simultaneously learning python by accident. This is due to two facts. One is that Sage syntax is very similar to that of python. The other is that in addition to implementing algorithms by programming them in Sage the authors of Numerical Analysis Using Sage also explain to the reader how to call powerful scipy routines in the built-in Sage library.

The authors provide all of the Sage code they use. Furthermore, they also provide Sage code for reproducing any figure that appears in the book. The first chapter of the text covers the essentials of using Sage, so that knowledge of Sage is not a prerequisite for reading the text. The authors do not explain their Sage code line by line but they do provide comments and present their code in a very clear manner so that it should be easy for even beginners to follow. There are many computing examples and exercises so that students get to use Sage enough to learn it reasonably well. As a note, another textbook that may be of interest to readers of Numerical Analysis Using Sage is Sage for Undergraduates by Gregory V. Bard.

In summary, Numerical Analysis Using Sage is a clearly written, accessible introduction to numerical analysis that seamlessly weaves together the mathematics and computer implementation of the numerical methods it covers. While this text may not be ideal for use in all introductory numerical analysis courses, it certainly has many features that make it distinct from most if not all other texts on the subject. I hope that the authors will write a sequel to this text covering numerical linear algebra and optimization using Sage. Even if they do not, the diligent reader of their book should gain enough experience with python syntax and using scipy to easily proceed to a book such as Mastering SciPy by Francisco J. Blanco-Silva for learning sophisticated scientific computing in the python language.

Jason M. Graham is an assistant professor in the department of mathematics at the University of Scranton, Scranton, Pennsylvania. His current professional interests are in teaching applied mathematics and mathematical biology, and collaborating with biologists specializing in the collective behavior of groups of organisms.

See the interactive table of contents on the publisher's web page.