LIMITED OFFER

## Save 50% on book bundles

Immediately download your ebook while waiting for your print delivery. No promo code is needed.

Skip to main content# Python Programming and Numerical Methods

## A Guide for Engineers and Scientists

## Purchase options

## Save 50% on book bundles

## Institutional subscription on ScienceDirect

Request a sales quote*Python Programming and Numerical Methods: A Guide for Engineers and Scientists* introduces programming tools and numerical methods to engineering and science students, with the goal of helping the students to develop good computational problem-solving techniques through the use of numerical methods and the Python programming language. Part One introduces fundamental programming concepts, using simple examples to put new concepts quickly into practice. Part Two covers the fundamentals of algorithms and numerical analysis at a level that allows students to quickly apply results in practical settings.** **** **** **** **** **** **** **** **** **** **** **

**2.7 **Introducing Numpy Arrays ** **** **** **

**3.3 **Nested Functions ** **

**3.5 **Functions as Arguments to Functions ** **** **

**4.2 **Ternary Operators

**4.3 **Summary and Problems ** **

**5.2 **While Loops ** **** **** **** **** **** **** **** **** **

**CHAPTER 8 Complexity **

8.1Complexity and Big-ONotation ** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **

**12.2 **3D Plotting

**12.3 **Working With Maps ** **** **** **** **** **** **** **** **** **

**14.4 **Solutions to Systems of Linear Equations ** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **

**17.2 **Linear Interpolation ** **** **** **** **** **

**18.2 **Approximations Using Taylor Series ** **** **** **** **** **** **

**19.5 **Root Finding in Python

**19.6 **Summary and Problems ** **** **** **** **** **** **** **

**21.3 **Trapezoid Rule

**21.4 **Simpson’s Rule ** **

**21.6 **Summary and Problems ** **** **

**22.3 **The Euler Method

**22.4 **Numerical Error and Instability

**22.5 **Predictor–Corrector and Runge–Kutta Methods ** **** **** **** **** **** **** **** **** **** **** **** **** **** **### Qingkai Kong

### Timmy Siauw

### Alexandre Bayen

Save up to 30% on Elsevier print and eBooks with free shipping. No promo code needed.

Save up to 30% on print and eBooks.

- 1st Edition - November 27, 2020
- Authors: Qingkai Kong, Timmy Siauw, Alexandre Bayen
- Language: English
- Paperback ISBN:9 7 8 - 0 - 1 2 - 8 1 9 5 4 9 - 9
- eBook ISBN:9 7 8 - 0 - 1 2 - 8 1 9 5 5 0 - 5

Python Programming and Numerical Methods: A Guide for Engineers and Scientists introduces programming tools and numerical methods to engineering and science students, with the go… Read more

LIMITED OFFER

Immediately download your ebook while waiting for your print delivery. No promo code is needed.

- Includes tips, warnings and "try this" features within each chapter to help the reader develop good programming practice
- Summaries at the end of each chapter allow for quick access to important information
- Includes code in Jupyter notebook format that can be directly run online

PART 1 INTRODUCTION TO PYTHON PROGRAMMING

CHAPTER 1 Python Basics

1.1 Getting Started With Python

1.2

Python as a Calculator1.3

Managing Packages1.4

Introduction to Jupyter Notebook1.5

Logical Expressions and Operators1.6

Summary and ProblemsCHAPTER 2 Variables and Basic Data Structures

2.1

Variables and Assignment2.2

Data Structure – String2.3

Data Structure – List2.4

Data Structure – Tuple2.5

Data Structure – Set2.6

Data Structure – Dictionary2.8

Summary and ProblemsCHAPTER 3 Functions

3.1

Function Basics3.2

Local Variables and Global Variables3.4

Lambda Functions3.6

Summary and ProblemsCHAPTER 4 Branching Statements

4.1

If-Else StatementsCHAPTER 5 Iteration

5.1

For-Loops5.3

Comprehensions5.4

Summary and ProblemsCHAPTER 6 Recursion

6.1

Recursive Functions6.2

Divide-and-Conquer6.3

Summary and ProblemsCHAPTER 7 Object-Oriented Programming

7.1

Introduction to OOP7.2

Class and Object7.3

Inheritance, Encapsulation, and Polymorphism7.4

Summary and Problems8.1

8.2

Complexity Matters8.3

The Profiler8.4

Summary and ProblemsCHAPTER 9 Representation of Numbers

9.1

Base-N and Binary9.2

Floating Point Numbers9.3

Round-Off Errors9.4

Summary and ProblemsCHAPTER 10 Errors, Good Programming Practices, and Debugging

10.1

Error Types10.2

Avoiding Errors10.3

Try/Except10.4

Type Checking10.5

Debugging10.6

Summary and ProblemsCHAPTER 11 Reading and Writing Data

11.1

TXT Files11.2

CSVFiles11.3

Pickle Files11.4

JSONFiles11.5

HDF5 Files11.6

Summary and ProblemsCHAPTER 12 Visualization and Plotting

12.1

2D Plotting12.4

Animations and Movies12.5

Summary and ProblemsCHAPTER 13 Parallelize Your Python

13.1

Parallel Computing Basics13.2

Multiprocessing13.3

Using Joblib13.4

Summary and ProblemsPART 2 INTRODUCTION TO NUMERICAL METHODS

CHAPTER 14 Linear Algebra and Systems of Linear Equations

14.1

Basics of Linear Algebra14.2

Linear Transformations14.3

Systems of Linear Equations14.5

Solving Systems of Linear Equations in Python14.6

Matrix Inversion14.7

Summary and ProblemsCHAPTER 15 Eigenvalues and Eigenvectors

15.1

Eigenvalues and Eigenvectors Problem Statement15.2

The Power Method15.3

The QR Method15.4

Eigenvalues and Eigenvectors in Python15.5

Summary and ProblemsCHAPTER 16 Least Squares Regression

16.1

Least Squares Regression Problem Statement16.2

Least Squares Regression Derivation (Linear Algebra)16.3

Least Squares Regression Derivation (Multivariate Calculus)16.4

Least Squares Regression in Python16.5

Least Squares Regression for Nonlinear Functions16.6

Summary and ProblemsCHAPTER 17 Interpolation

17.1

Interpolation Problem Statement17.3

Cubic Spline Interpolation17.4

Lagrange Polynomial Interpolation17.5

Newton’s Polynomial Interpolation17.6

Summary and ProblemsCHAPTER 18 Taylor Series

18.1

18.3

Discussion About Errors18.4

Summary and ProblemsCHAPTER 19 Root Finding

19.1

19.2

Tolerance19.3

Bisection Method19.4

Newton–Raphson MethodCHAPTER 20 Numerical Differentiation

20.1

Numerical Differentiation Problem Statement20.2

Using Finite Difference to Approximate Derivatives20.3

Approximating of Higher Order Derivatives20.4

Numerical Differentiation With Noise20.5

Summary and ProblemsCHAPTER 21 Numerical Integration

21.1

21.2

Riemann Integral21.5

Computing Integrals in PythonCHAPTER 22 Ordinary Differential Equations (ODEs) Initial-Value Problems

22.1

ODE Initial Value Problem Statement22.2

Reduction of Order22.6

Python ODE Solvers22.7

Advanced Topics22.8

Summary and ProblemsCHAPTER 23 Boundary-Value Problems for Ordinary Differential Equations (ODEs)

23.1

ODE Boundary Value Problem Statement23.2

The Shooting Method23.3

The Finite Difference Method23.4

Numerical Error and Instability23.5

Summary and ProblemsCHAPTER 24 Fourier Transform

24.1

24.2

Discrete Fourier Transform (DFT)24.3

Fast Fourier Transform (FFT)24.4

FFT in Python24.5

Summary and ProblemsAppendix A Getting Started With Python in Windows

Index

- No. of pages: 480
- Language: English
- Edition: 1
- Published: November 27, 2020
- Imprint: Academic Press
- Paperback ISBN: 9780128195499
- eBook ISBN: 9780128195505

QK

Qingkai Kong is an Assistant Data Science Researcher at the Berkeley Division of Data Sciences and Berkeley Seismology Lab. He has a Master’s degree in Structural Engineering and a PhD. in Earth Science. He is actively working on applying data science/machine learning to Earth science and engineering, especially using Python language.

Affiliations and expertise

Assistant Data Science Researcher, University of California, BerkeleyTS

Affiliations and expertise

University of California, Berkeley, USAAB

Alexandre Bayen is the Liao-Cho Professor of Engineering at UC Berkeley. He is a Professor of Electrical Engineering and Computer Science, and Civil and Environmental Engineering. He is currently the Director of the Institute of Transportation Studies (ITS). He is also a Faculty Scientist in Mechanical Engineering, at the Lawrence Berkeley National Laboratory (LBNL). He received the Engineering Degree in applied mathematics from the Ecole Polytechnique, France, in 1998, the M.S. and Ph.D. in aeronautics and astronautics from Stanford University in 1998 and 1999 respectively. He was a Visiting Researcher at NASA Ames Research Center from 2000 to 2003. Between January 2004 and December 2004, he worked as the Research Director of the Autonomous Navigation Laboratory at the Laboratoire de Recherches Balistiques et Aerodynamiques, (Ministere de la Defense, Vernon, France), where he holds the rank of Major. He has been on the faculty at UC Berkeley since 2005. Bayen has authored two books and over 200 articles in peer reviewed journals and conferences. He is the recipient of the Ballhaus Award from Stanford University, 2004, of the CAREER award from the National Science Foundation, 2009 and he is a NASA Top 10 Innovators on Water Sustainability, 2010. His projects Mobile Century and Mobile Millennium received the 2008 Best of ITS Award for ‘Best Innovative Practice’, at the ITS World Congress and a TRANNY Award from the California Transportation Foundation, 2009. Mobile Millennium has been featured more than 200 times in the media, including TV channels and radio stations (CBS, NBC, ABC, CNET, NPR, KGO, the BBC), and in the popular press (Wall Street Journal, Washington Post, LA Times). Bayen is the recipient of the Presidential Early Career Award for Scientists and Engineers (PECASE) award from the White House, 2010. He is also the recipient of the Okawa Research Grant Award, the Ruberti Prize from the IEEE, and the Huber Prize from the ASCE.

Affiliations and expertise

Associate Professor, Department of Electrical Engineering and Computer Sciences and the Department of Civil and Environmental Engineering, University of California, Berkeley, USARead *Python Programming and Numerical Methods* on ScienceDirect