Programming for Computations: Python: A Gentle Introduction to Numerical Simulations with Python

This document was uploaded by one of our users. The uploader already confirmed that they had the permission to publish it. If you are author/publisher or own the copyright of this documents, please report to us by using this DMCA report form.

Simply click on the Download Book button.

Yes, Book downloads on Ebookily are 100% Free.

Sometimes the book is free on Amazon As well, so go ahead and hit "Search on Amazon"

This book presents computer programming as a key method for solving mathematical problems. There are two versions of the book, one for MATLAB and one for Python. The book was inspired by the Springer book TCSE 6: A Primer on Scientific Programming with Python (by Langtangen), but the style is more accessible and concise, in keeping with the needs of engineering students. The book outlines the shortest possible path from no previous experience with programming to a set of skills that allows the students to write simple programs for solving common mathematical problems with numerical methods in engineering and science courses. The emphasis is on generic algorithms, clean design of programs, use of functions, and automatic tests for verification.

Author(s): Svein Linge; Hans Petter Langtangen
Publisher: Springer
Year: 2016

Language: English
Pages: 232

Preface
Contents
List of Exercises
1 The First Few Steps
1.1 What Is a Program? And What Is Programming?
1.2 A Python Program with Variables
1.3 A Python Program with a Library Function
1.4 A Python Program with Vectorization and Plotting
1.5 More Basic Concepts
1.6 Exercises
2 Basic Constructions
2.1 If Tests, Colon and Indentation
2.2 Functions
2.3 For Loops
2.4 While Loops
2.5 Lists and Tuples – Alternatives to Arrays
2.6 Reading from and Writing to Files
2.7 Exercises
3 Computing Integrals
3.1 Basic Ideas of Numerical Integration
3.2 The Composite Trapezoidal Rule
3.3 The Composite Midpoint Method
3.4 Testing
3.5 Vectorization
3.6 Measuring Computational Speed
3.7 Double and Triple Integrals
3.8 Exercises
4 Solving Ordinary Differential Equations
4.1 Population Growth
4.2 Spreading of Diseases
4.3 Oscillating One-Dimensional Systems
4.4 Exercises
5 Solving Partial Differential Equations
5.1 Finite Difference Methods
5.2 Exercises
6 Solving Nonlinear Algebraic Equations
6.1 Brute Force Methods
6.2 Newton's Method
6.3 The Secant Method
6.4 The Bisection Method
6.5 Rate of Convergence
6.6 Solving Multiple Nonlinear Algebraic Equations
6.7 Exercises
A Getting Access to Python
A.1 Required Software
A.2 Anaconda and Spyder
A.3 How to Write and Run a Python Program
A.4 The SageMathCloud and Wakari Web Services
A.5 Writing IPython Notebooks
References
Index