Sage for undergraduates Bard G., American Mathematical Society, Boston, MA, 2015. 362 pp. Type: Book (978-1-470411-11-4)

Date Reviewed: Aug 24 2015

The website www.SageMath.org defines its mission as the creation of “a viable free open-source alternative to Magma, Maple, Mathematica, and MATLAB.” Furthermore, Sage is built “on top of many existing open-source packages: NumPy, SciPy, matplotlib, Sympy, Maxima, GAP, FLINT, R and many more.” (The suffix “Py” refers, as you probably know, to the Python language, with which Sage can be strongly coupled or not, at the user’s option.)

Although I don’t recall being “beloved” as a student of mathematics, the following 1614 quotation [1] of John Napier was an inspiration in my youth, in that (unlike the case with, for example, Latin grammar) the separation of the tedious from the glorious in mathematics could be construed as objective:

Seeing there is nothing (right well-beloved students of the mathematics) that is so troublesome to mathematical practice, nor that doth more molest and hinder calculators, than the multiplications, divisions, square and cubical extractions of great numbers, which besides the tedious expense of time are for the most part subject to many slippery errors, I began therefore to consider in my mind by what certain and ready art I might remove those hindrances.

I was, in contrast, secretly put off (again, many decades ago) by the title of Lancelot Hogben’s Mathematics for the million [2], the annoyance obviously having been engendered by a properly shameful conceit that asked, “What’s so special about math if a million can do it?” I did not, of course, “do the math [that is, the arithmetic],” as a million (or ten) out of the three billion that populated the earth in those days was still “special.” I claim, however, no longer to care about (indeed to deprecate) such sociological, or even tabloid, statistics, and now view conceit at any age as “unlovely,” to use an understatement (regarding mathematical conceit) in Norbert Wiener’s [3] quaint language.

But my real point, which I’m sure can be made less tortuously, is that such latter-day open-source software as Sage (R [4] is another example) has the concept, scope, ease of use, and robustness that bring unmatched mathematical power to us millions, this power far transcending numerical computation and limited algebraic manipulation, and being a force-multiplier with respect to “theoretical” mathematics as well. The open-source attribute is also essential to the successful democratization to which I’m alluding, given that a largely sight-unseen expenditure on, for example, a Mathematica license and maintenance agreement on an individual’s part is in general a financial show-stopper. (I hasten to wish continued presence and prosperity on the makers of Mathematica, MATLAB, Maple, Magma, and so on.)

This excellent Sage book itself is “open” in both the spirit and letter senses: Its realizations include an online, web-based version; color and black-and-white, downloadable PDF versions; and ancillary material, including two excellent Sage-informed algebra texts (linear [5], abstract [6]), running the gamut of Sage applications and examples. Although I continue to use and enjoy the free color PDF version that I downloaded, I see the added value that its hard-copy counterpart provides; this added value results in large part from the high quality of production, that is, printing of text and illustrations, packaging, and binding.

The book’s content is well written, well organized, and keeps the reader (more accurately and fortuitously, user) constantly attentive and engaged. Its six-chapter, six-appendix scope covers: (1) welcome, including functions, some graphs, matrices, polynomials and non-linear systems, numerical solutions, integrals, and derivatives; (2) Sage projects, including microeconomics, biology, industrial engineering, chemistry, classical physics, cryptology, and vector-field plots; (3) advanced plotting, including gradients and contours; (4) advanced Sage features, including multivariate functions, partial derivatives, advanced matrix algebra, number theory and modular arithmetic, the Sage-LaTeX interface, eigenvectors and eigenvalues, Lagrange multipliers, Laplace transforms, and vector calculus; (5) programming in Sage and Python, including a subsection titled “Verbosity Control”; and (6) building interactive web pages, including designing a Sage subroutine and converting it to a web-interactive subroutine. The appendices include (B) the SageMathCloud, (C) other Sage resources, (D) linear systems with infinitely many solutions, (E) installing Sage on a personal computer, and (F) an index of Sage commands. (See below for Appendix A.)

The how-to-use-this-book preface is refreshing in its casual style of guiding the reader. The chapter summaries are efficient, and the author

personally recommend[s] just [to] read chapter 1, and then start playing around on your own ... . If you get flummoxed at any point, be sure to check out Appendix A, “What to Do When Frustrated.”

Here, on page xvii, before chapter 1, is this author’s Sage equivalent of “Hello, World,” accomplished by addressing https://sagecell.sagemath.org, typing solve (x^2 – 16 == 0, x), and clicking Evaluate, to yield [x == -4, x== 4]. Lest the light-sounding tenor of this book give an impression that Sage is less than industrial-strength, page 158 reveals that limit(cos(x)^{(1/x2)}, x = 0) yields the correct, and amazing answer: e^{(-1/2)}.

This jewel of a book-cum-infrastructure is not just “for undergraduates,” but will be of great benefit to all.