Download and install Sage, and learn how to use the command-line and notebook interface Learn the basics of Python programming Solve problems in linear algebra with vectors and matrices Visualize functions and data sets with publication-quality graphics Define, re-arrange, and simplify symbolic expressions Calculate integrals, derivatives, and transforms symbolically and numerically Solve ordinary differential equations (ODEs) and systems of ODEs Fit functions to data using unconstrained and constrained numerical optimization Apply object-oriented principles to simplify your code Speed up calculations with Numpy arrays Learn to use Sage as a toolbox for writing Python programs
The book under review is a book on Sage, an open source mathematical software package started by William Stein, a mathematician at the University of Washington. It is very carefully written (either that, or very carefully reviewed by the Technical Reviewers!) and aimed, as the title suggests, at the beginner. However, it is assumed that the reader knows some undergraduate mathematics, say the level one obtains from getting an engineering degree. In fact, it has a bit of an applied slant with many examples from physics and engineering mathematics. This is a welcome contrast to the excellent Sage Tutorial (available free from the Sage website, sagemath.org) which has a more of a pure slant. It's nice to see a publisher like Packt Publishing take the risk of publishing a book like this on an open source software program which already has free documentation (in pdf or html form).There are 10 chapters and it's about 350 pages. Although Sage of course has color plotting, all figures in this book are in black and white, so the reader really must try out the Sage code given in the book to get the full effect. Each chapter features many "Time for action" Sage code examples (also conveniently listed in the table of contents at the front of the book), followed by a "What just happened?" section explaining in detail (and without computer code) what the example did. These make the book more useful to the beginner as well as for someone wanting a quick reference for one of the examples. All these examples use the command-line version of Sage (typing your commands into a terminal window at a sage: prompt) but there are several sections explaining the GUI version of Sage (typing your commands into a Mathematica-like "notebook cell") as well.Here is a chapter-by-chapter summary:The first chapter, "What can you do with Sage?", is a survey of some of Sage`s most commonly used capabilities. Examples such as solving a differential equations, plotting experimental data, and some simple example matrix computations are presented.The second chapter is "Installing Sage". This covers the steps you go though for a Mac OS, Windows, and Linux installation of Sage. Since this is scary for a number of users who are not very computer-savvy, it is nice an entire chapter is devoted to this.The third chapter, "Getting started with Sage", introduces the new Sage user to the user interface, basic Sage syntax, user-defined functions, and some of the available data types (such as strings and real number types)."Introducing Python and Sage", the fourth chapter, introduces syntax for Python lists, dictionaries, for loops, if-then statements, and also reading and writing to files. Sage is based on Python, a popular language used extensively in industry (at google among other places). This chapter introduces some very useful stuff, but is pretty basic if you know Python already.The 5th chapter is "Vectors, matrices and linear algebra". Sage has very wide functionality in linear algebra, with specialized packages for numerical computations for real and complex matrices, matrices over a finite field, or matrices having symbolic coefficients, such as functions of a variable x.Sage`s functionality in two-dimensional and three-dimensional plotting is described in the 6th chapter, "Plotting with Sage". There is 3-d "live-view" (i.e., you can use the mouse to rotate a plot of a surface or solid in 3-space), histogram plots, as well as simpler plots using Sage`s 2-d plotting package, matplotlib.Chapter 7 is "Making symbolic mathematics easy". Various topics are covered, from various calculus operations, such as limits, derivatives, integrals, and Laplace transforms, to exactsolutions to equations with variable coefficients, to infinite sums such as power series, to solving ordinary differential equations."Solving problems numerically" is the next chapter. This is the meat-and-potatoes for an applied mathematician. Sage includes many packages which have been developed to solve optimization problems, linear programming problems, numerical solutions of ordinary differential equations, numerical integration, and probability and statistics. These are introduced briefly in this chapter.The 9th chapter is "Learning advanced python programming". Here object-oriented programming is introduced by means of examples, and it is shown how Python handles errors and imports.The last chapter "Where to go from here" discusses selected miscellaneous advanced topics.Topics covered include: LaTeX, interactive plotting using the Sage notebook, as well as a fairly detailed example of analyzing colliding spheres in Sage from several different approaches.The book has a very good index and, overall I believe is a very welcomed addition to the literature of Sage books. Maybe it's just my generation, but to me it is a little expensive for a paperback. Because of that, and the fact that it is not as well-rounded as it could be, I'd rate it as 4.5 stars.
Amazon Verified review
Matthieu BrucherJul 06, 2011
5
I heard about Sage when I started learning Python, but I never quite gotten in the bandwagon. Now, this Beginner's Guide seems a good place to start.As with a lot of (all?) Packt Publishing Beginner's Guide, the book with a small introduction of what you can expect of the piece of software and its installation process on the three major platforms. Although for Windows the process is more complicated, the author gives the whole explanation, even on why the process is so complicated for this platform.Sage consists of several layers, Python being one of them, but there are many others. The book tries to dig a little bit further each time. The first "real" (i.e. outside the introductory and installation) chapter tackles the two main ways of using Sage, the interactive shell and the notebook. The different options and the basic usage are explained and illustrated with a lot of examples. The next step is mastering basic Python, which also done with the same efficiency as before.As Sage is mostly about math stuff, the book spends several chapters on the different APIs it offers to handle data. First, linear algebra and the different vectors and matrices are introduced, with a final reference to Numpy and its special arrays. Here is perhaps something lacking in this book: a reference to scipy. Indeed, scipy has a lot to offer in terms of linear algebgra, and it works with Numpy arrays. That being said, the common linear algebra issues will be solved by the Sage interface directly.A huge topic is graphics and scientific plots. The book exposes the different aspects of graphical Sage and also its main support package matplotlib. 3D graphics are also tackled, also they are only very recent in their current form in Matplotlib. It's a good surprise to see some examples here.From my point of view, the purpose of the whole book is the seventh chapter with the subject of symbolic math. The mathematical kernel can handle a lot of different input, rational numbers, trignometric expression, algebraic expressions, derivatives, integrals... Everything the Sage framework can handle is exposed. Also, if there is something it cannot directly handle, Sage can use numerical expressions to solve the issue (the eightth and final math chapter).The last two chapters are not on Sage directly, but more on Python and scientific publications. The Python programming chapter uses a war metaphor, and I guess there might have been another better and more adequate subject for Python programming. If you are used to Python, you may skip this one. The last one is about scientific publication, and eventually the optimization. This last topic is only touched, but it is given the necessary attention given the depth of Sage capabilities.Sometimes the book feels like a giant dictionnary of all the things you can do with Sage, and it actually is. And to find something, you may only have to browse the table of contents and get to the part you sought.Sage is an extraordinary beast, with pieces coming from a lot of different projects, and it's always difficult to know which project you are actually using. Sage acts like a wrapper for most applications, but once you need more, you can tap into the power of each subpackage. The book helps this process, with a good overview of Sage and a lot of real examples. There are some typos inside the book, but they are easily spotted if you mastered the previous chapter.
Amazon Verified review
Jerry L. KrepsMar 03, 2012
5
The latest release of the SAGE Math Engine was Jan 30, 2012, version 4.8.0. It has 11 PDF files documenting various aspects, but the primary documentation, "Reference.PDF" is 7,084 pages long. Composed of more than 100 Open Source math tools Integrated together seamlessly with a smooth and uniform user interface, written in Python, it is a dream to use. Its power and functionality is enhanced because it is free and freely updated. Although I've never used it, it has been reported that the user support community is pretty good as well.If you have FireFox running when you start SAGE FireFox will show a SAGE Notebook() tab, ready to create a new Notebook, or open an old one. There are plenty of video and graphical examples at the SAGE site that will give you examples of the power of the tool, and its ease of use.
Amazon Verified review
Marshall HamptonJul 29, 2011
4
I was asked by the publisher to review this book. They sent me a free copy; I have no other conflicts of interest. I am generally biased towards Sage itself ([...]), as an avid user and minor developer.Here on Amazon you can browse the table of contents, which gives a pretty good idea of the strengths of the book, namely basic computation and plotting, numerical calculations, and data analysis. The focus was an excellent choice considering what is already available. The current free Sage Tutorial ([...]) is oriented much more towards pure mathematicians. There is a Numerical Computing With Sage ([...]) as part of the standard documentation ([...]), but at the moment its quite short and nowhere near as helpful as Finch's book.I liked the style of the book a lot. There are many code examples that illustrate how to accomplish concrete tasks, along with good explanations of what they are doing. Many of these are things that are unfortunately far from obvious to a beginner (or even intermediate) Sage user. Despite using Sage heavily for the last five years, I learned some new things. The book is particularly strong in showing how to use Numpy, Scipy, and Matplotlib. Sage wraps a lot of the functionality of these projects, but if you want to do something that isn't included in the standard interfaces it can be quite mystifying.Chapter 9, "Learning Advanced Python Programming", might have been a little ambitious. There's nothing wrong with it, but its too short to provide enough. Fortunately there are a lot of good books, some of them free, that cover Python programming in much more depth. I would have preferred some of this space and effort to be devoted to using Cython and the @interact command, which are covered very briefly in Chapter 10.I teach several classes using Sage and I will definitely advertise this text as a useful optional supplement (I consider it a little too expensive to add on as a mandatory second text). It would be nice if some institutions considered using Sage instead of its commercial competitors such as Maple, Matlab, and Mathematica - you could probably give every student a copy of this book for the money saved from license fees!The only thing I disliked about the book was the quality of the illustrations. Sage output that was in LaTeX was not typeset, but instead looks as if a PNG was copied from a screenshot. Some of the examples would have benefited from being in color. The quality of the plots is also somewhat poor. This is not too big a deal if one is following along with Sage, since you can reproduce the figures. None of them are bad enough to obscure the content.Overall this is a very impressive and useful introduction to Sage that should help any beginning user a great deal.