# First Semester in Numerical Analysis with Python

Yaning Liu, University of Colorado Denver

Publisher: Auraria Institutional Repository

Language: English

## Formats Available

## Conditions of Use

Attribution-NonCommercial-ShareAlike

CC BY-NC-SA

## Reviews

The text covers fundamental topics (root-finding, interpolation, numerical quadrature and differentiation, approximation) to give students taking their first course in numerical analysis a good survey of the types of issues they will encounter.... read more

The text covers fundamental topics (root-finding, interpolation, numerical quadrature and differentiation, approximation) to give students taking their first course in numerical analysis a good survey of the types of issues they will encounter. While other useful and common topics could have been included, the selection provided keeps the length of the text appropriate for a one-semester introductory course. Each topic has good coverage, providing theory/background as well as motivating examples with solutions and, when applicable, Python code. A good number of additional exercises are provided, which a teacher could assign. This text could work well as the supporting text for a first semester course in numerical analysis with Python.

I did not find inaccuracies.

The text provides example code written in Python 3.8 and makes use of the NumPy, pandas, SciPy, and Matplotlib libraries. Code and outputs as they would appear within a Jupyter notebook environment, including plots and screenshots, are provided. These can be followed and applied even if the reader does not choose to install Anaconda or code within Jupyter notebooks.

For the topics and example applications covered, it seems unlikely that updates to Python would significantly affect the code shown. If these libraries and especially the Jupyter notebook interface are updated, larger edits might be required to keep the text relevant. The structure of the text would allow for new code, plots, and screenshots to replace older examples, although this could be a time-consuming process depending on the updates.

The topics covered in the text likely will remain relevant, as will the use of Python and these scientific libraries. Jupyter notebooks currently are a commonly used educational tool. If another tool reaches similar levels of popularity, the text might need significant updates.

The text is written in a straightforward manner and includes many mathematical and coding examples to support understanding and learning. Students can compare their code to the provided examples.

Some theorems include proofs, while others refer to external sources for proofs. Others are not proved within the text, which might be frustrating to a reader, but in general this seems like an appropriate choice since (1) this is not a math textbook and (2) the proofs can be found elsewhere.

The text assumes the reader has taken all or nearly the full sequence of calculus and is familiar with Python.

The text's organization and format are consistent, and appropriate labels for sections/subsections make it easy to follow and navigate. The adventures of a college student (Arya) are used to introduce and motivate topics, which adds some fun as well as provides continuity.

A reader can skip to their chapter of choice and find understandable, relevant information that is well-introduced and does not require referring back to previous chapters of the text. In general, definitions and theorems are provided as needed so the reader does not need to scroll back to find them. Sections and sub-sections are labeled in a logical way, and their number is appropriate, so the reader can find and jump to their topic of choice. In general, a teacher could rearrange the way they present the topics and still be supported by this text.

The organization of the text is clear and logical. The text starts with a review of basic calculus and Python concepts that are used throughout the book, which nicely prep the reader for the bulk of the text. Topics approximately are presented in increasing order of difficulty, which could help teachers organize their semester.

I am able to navigate the table of contents within the PDF. Example code and plots are integrated effectively, and plots are sized and scaled appropriately and simple. Equations also are integrated clearly. The index is useful, while I did not try every topic, seems to link back to the appropriate portions of the text correctly.

I did not find noticeable grammatical errors.

I did not find such issues.

I think this would work well as the text for a first semester course in numerical analysis, and Python lends itself well to the tasks and to advanced beginner and intermediate learners.

If a reader has little experience with Python, that they will need to supplement their learning with other tutorials. Since the book assumes the reader is familiar with Python, the reader would have to go beyond the subsection on Python basics to get up to speed.

The topics covered by the book are overall appropriate and presented at a reasonable level for undergraduate students with a background in calculus, linear algebra, and programming. It gives a brief introduction to python, which would be... read more

The topics covered by the book are overall appropriate and presented at a reasonable level for undergraduate students with a background in calculus, linear algebra, and programming. It gives a brief introduction to python, which would be sufficient for a student with some programming experience. The numerical analysis concepts are often explained through worked (and narrated) examples implemented in python. This pragmatic approach generally works well, though there are times where specific implementation issues crowd out the fundamental idea at issue. On the spectrum between an implementation-focused numerical methods course and a theorem-proof numerical analysis course, this text is definitely more on the methods end.

The range of topics is limited for a typical robust undergraduate course in numerical analysis. There is no coverage of numerical methods for differential equations or numerical linear algebra. There are some exercises given throughout the text, and these are often implementation/computation focused. An instructor using the text for a course will likely want to supplement the text with additional exercises, assignments, and/or projects.

The text of the main body of the book is generally clear and error-free. The index has references to code in Julia, where it should be to python. (This seems to be an artifact of the conversion of the original text that used the programming language Julia).

The general subject matter is very relevant to a wide range of disciplines and is unlikely to lose relevance soon. The design of the text incorporates python code throughout the text, so the shelf-life of the book is closely tied to how the language evolves. It will certainly be possible to update examples, code implementations, etc., though not trivially.

The tone of the presentation is generally straightforward and uses typical, concise mathematical conventions. As a stand-alone reference for a student working alone, it is light on providing motivation and context for the subject. As such, this book is better suited as a course text, where the experienced instructor can provide some of this additional framing.

The book gives several extended example applications posed with the recurring fictional student Arya. These sections do add some levity to the narrative, but can also be a little distracting. Sometimes they are used as motivation to introduce a new topic, and in other places as a way to illustrate a specific problem. The overall readability of the text would be more clear if these sections were delineated more consistently (... are we still helping Arya understand her problem now, or have we moved on to a new topic?)

Overall the text uses consistent and appropriate terminology throughout. However, it could do a better job of distinguishing between rate and order of convergence. It uses big-O notation somewhat inconsistently throughout.

For the subject matter it is reasonably modular. Much of the material is inherently hierarchical, so there would be little motivation for wanting to rearrange sections. That said, there are a few sections that can be skipped, which is quite appropriate for an advanced undergraduate text. As noted above, it would be helpful to have chapters on numerical ODEs and/or numerical linear algebra.

The organization of the text is appropriate for the subject and the depth of coverage.

There is appropriate use of hypertext links in the pdf version, and these work well. The typesetting, images, and referencing are all done well. Switching between the main text and imbedded python code could be improved if the code were more visually offset (perhaps a light gray background?).

No grammar or copy edit issues were noted.

There is nothing in this book that can be considered culturally insensitive.

There are many forms that a first course in numerical analysis can take, with relative emphasis on different aspects of the field (implementation, empirical testing, applications, theory, etc.). This book could be a good component of a course that wishes to focus on implementation in python and doesn't need to cover topics beyond rootfinding, interpolation and numerical integration/differentiation.

## Table of Contents

- 1 Introduction
- 2 Solutions of equations: Root-finding
- 3 Interpolation
- 4 Numerical Quadrature and Differentiation
- 5 Approximation Theory

## Ancillary Material

## About the Book

The book is based on “First semester in Numerical Analysis with Julia”, written by Giray Ökten. The contents of the original book are retained, while all the algorithms are implemented in Python (Version 3.8.0). Python is an open source (under OSI), interpreted, general-purpose programming language that has a large number of users around the world. Python is ranked the third in August 2020 by the TIOBE programming community index, a measure of popularity of programming languages, and is the top-ranked interpreted language. We hope this book will better serve readers who are interested in a first course in Numerical Analysis, but are more familiar with Python for the implementation of the algorithms.

The first chapter of the book has a self-contained tutorial for Python, including how to set up the computer environment. Anaconda, the open-source individual edition, is recommended for an easy installation of Python and effortless management of Python packages, and the Jupyter environment, a web-based interactive development environment for Python as well as many other programming languages, was used throughout the book and is recommended to the readers for easy code development, graph visualization and reproducibility.

## About the Contributors

### Author

**Yaning Liu**, Department of Mathematical and Statistical Sciences - University of Colorado Denver