You are here

Programming for Computations - Python

Svein Linge and Hans Petter Langtangen
Publication Date: 
Number of Pages: 
Texts in Computational Science and Engineering
[Reviewed by
Kyle Riley
, on
The careers of engineers and scientists increasingly rely on good programming skills. The authors of this text have declared an intent to provide a resource for: students, teachers, engineers, and scientists to develop programming skills in Python and also learn some basics of numerical methods. The desired target audience does not have to have any prior experience in programming or in using numerical methods. Python is a very popular programming language that is generally more accessible than what can be found among the usual suspects: C, C++, java, and other programming intensive languages. I am not sure the book is entirely successful in meeting the desired goal, but it still has much to offer.
I have never used Python before so I followed the book’s path in downloading the Anaconda version of Python and making use of the Spyder editor. I found both selections to be wise choices and easy to implement. I do wonder if someone that has never worked with a programming language would easily navigate the setup and be able to master the beginning material that is presented. The level of material seems, to me, to rely on some basic understanding of programming prior to opening the text. If one were to attempt this type of work with zero background in programming then I would anticipate that more examples would be needed in the text or provided in an appendix. For someone with some prior programming experience, the introduction is very helpful in learning Python and picking up the syntax of the language. A similar concern can also be considered for the coverage of numerical methods. If a student has an exceptionally strong background in calculus and differential equations then the content covered for numerical methods would be accessible. However, I suspect a typical member of the target audience would be significantly challenged with the level of mathematics that is expected.
The book does a good job of discussing and handling round off error and it also makes an approachable presentation of convergence. The book manages to cover a great deal of mathematical content that includes: numerical integration, solving nonlinear equations, ordinary differential equations, and a brief discussion of partial differential equations. The book also mentions applications for these mathematical topics and uses them to illustrate many of the concepts that would be covered in a numerical analysis text. A unique emphasis for this book is the focus on programming and algorithmic thinking. I agree that developing programming skill and algorithmic thinking is a valuable pursuit and the text discusses testing in a way that is a bit deeper than what can be found in most textbooks of this nature. The book also spends a bit of time on modular programming and breaking programs down into components that can be tested and used. It seems that more discussion on best practices for commenting code, unit testing, and version control would have also aligned well with this emphasis.
This book incorporates some creative ideas and the choice of Python does make it an attractive resource given the contemporary interest in this programming language. It is well organized and includes a stronger emphasis on programming skill than what is typically found in a numerical methods book. It should also be of special note that this book is published in the SpringerOpen series and so the book is open source, which is a major benefit to the community.


Kyle Riley teaches at the South Dakota School of Mines and Technology and has taught several semesters of Introduction to Numerical Analysis to students in engineering and science.