Introduction to the Tools of Scientific Computing 3030608077, 9783030608071

The book provides an introduction to common programming tools and methods in numerical mathematics and scientific comput

304 25 4MB

English Pages 344 [343] Year 2021

Report DMCA / Copyright

DOWNLOAD PDF FILE

Table of contents :
Preface
Acknowledgments
Contents
Chapter 1 Introduction
Background
Pitfalls and Limitations
Programming Languages
The C Language
Program Packages Matlab, Maple, Mathematica
The Golden Middle Course: Python
Organization of the Book
Part I Background
Chapter 2 Mathematical Foundations of Programming
2.1 A Simple Machine Model
Machine Language and Higher-Level Programming Languages
Church’s Thesis
The Turing Machine
Limits of Computability
Repercussions in Mathematics
Extended Number Ranges
2.2 Digital Computers
Number Representation
Natural Numbers
Whole Numbers
Real Numbers, Floating Point Numbers
Higher-Level Programming Languages
Part II Core Languages
Chapter 3 Python, the Fundamentals
3.1 Python Interpreter
A First Example
Interactive Mode
3.2 Elementary Data Types
Numbers and Arithmetic
Whole Numbers, Integers
Real Numbers, Floating Point Numbers
Arithmetical Operations
Error Propagation float Computations
The Types complex and bool
Complex Numbers
Boolean Operators, Comparisons
3.3 Variables and Value Assignments
Basic Rule
3.4 Control Structures
Loops
While Loops
For Loops
Interlude: the range Function
The break and continue Statements
Conditional Statements
Floating Point Precision Revisited: Machine Epsilon
3.5 Collection Types: Lists, Tuples, Dictionaries and Sets
list is a Reference Type
Sieve of Eratosthenes
Sublists
Concatenation
List Comprehensions
Tuples
Dictionaries
Sets
3.6 Functions
Anonymous Functions, Lambda Expressions
Functions as Arguments
Functions as Return Values
Recursion
The Quicksort Algorithm
3.7 String Formatting
3.8 Writing and Reading Files
Writing Strings
Interlude: Access Paths
Reading
Numbers
Binary Files and pickle
3.9 Object-Oriented Programming and Classes
Polynomials
Inheritance
3.10 Exercises
Machine Epsilon
Polynomial Class
Linear Algebra
Numerical Integration with the Trapezoidal Rule
The Taylor Series
The Newton Method
Chapter 4 Python in Scientific Computation
4.1 NumPy
NumPy Arrays
Vectors and Matrices
Vectors
Matrices
Access to Matrix Components
Flatten and Reshape
Standard Matrices
Advanced Construction Methods
The Methods diag and kron, the Poisson Matrix
4.2 Conjugate Gradient
The Quadratic Form
The Method
4.3 SciPy
4.4 Linear Algebra
Matrix Algorithms
Linear Equations
LU Decomposition
Cholesky Decomposition
Application: Method of Least Squares
QR Decomposition
QR Decomposition in Rectangular Matrices
The Gaussian Normal Equation
Eigenvectors and Eigenvalues
Sparse Matrices
Eigenvalues
The Methods diags and kron
Conversion Between Full and Sparse Matrices
4.5 Graphics with Matplotlib
4.6 Nonlinear Equations, Optimization
Single Equations
Equation Systems
Minimization
4.7 Numerical Integration, Ordinary Differential Equations
Integration
Ordinary Differential Equations ODEs
Initial Value Problems, solve_ivp
The Solver solve_ivp
Lotka–Volterra Equations
Pendulum
Boundary Value Problems,
4.8 Partial Differential Equations
Discretization
Solution Program
Sparse Poisson Matrix
Non-homogeneous Boundary Conditions
The SciPy Program
Verification
4.9 Round off: Random Numbers
Monte Carlo Method for the Computation of
4.10 Exercises
Linear Equations
Nonlinear Equations
Newton’s Method in ℝ?
Integration
Optimization
Ordinary Differential Equations, Initial Value Problems
Ordinary Differential Equations, Boundary Value Problems
Partial Differential Equations
Chapter 5 Python in Computer Algebra
5.1 Symbolic Calculation, Numbers
Number Types
Symbolic Expressions
Value Assignments
Advanced Transformations
Functions
5.2 Equation Systems
solveset and linsolve
solveset
linsolve
5.3 Linear Algebra
Matrices and Vectors
Vector Space Bases
Eigenvectors and Eigenvalues
? × ? Matrices with ? ≥ 5
5.4 Calculus
Limits
Differential Calculus
Integration
Series Expansion
5.5 Ordinary Differential Equations
5.6 Galerkin Method
The Model Equation
The Variational Problem
The Method
The SymPy Program
Exact Solution
5.7 Exercises
Linear Equations
Eigenvalues
Nonlinear Equations
Differential Equations
Function Spaces
Chapter 6 The C Language
Integrated Development Environment
Command Line Compiler
6.1 Basics
Numbers and Arithmetic Operations
Number Representations
Arithmetic Operators
Output
Variables and Assignments
6.2 Control Structures: Branches, Loops
Conditional Execution
Loops
6.3 Functions
Functions as Arguments
6.4 Arrays
Arrays as Function Arguments
Matrices
6.5 Pointers
Arrays and Pointers
Pointers as Arrays
6.6 Structures
Sparse Matrices
6.7 Files, Input and Output
6.8 Conclusion
Chapter 7 The C++ Language
7.1 Transfer from C
7.2 Basics
The Output Operator

Introduction to the Tools of Scientific Computing
 3030608077, 9783030608071

  • 0 0 0
  • Like this paper and download? You can publish your own PDF file online for free in a few minutes! Sign Up
File loading please wait...
Recommend Papers