اسم المؤلف
C. Woodford, C. Phillips
التاريخ
5 فبراير 2023
المشاهدات
289
التقييم
(لا توجد تقييمات)

Numerical Methods with Worked Examples – Matlab Edition
Second Edition
C. Woodford C. Phillips
Contents
1 Basic Matlab . 1
1.1 Matlab – The History and the Product 1
1.2 Creating Variables and Using Basic Arithmetic . 2
1.3 Standard Functions . 2
1.4 Vectors and Matrices . 3
1.5 M-Files 5
1.6 The colon Notation and the for Loop 6
1.7 The if Construct . 7
1.8 The while Loop . 8
1.9 Simple Screen Output 9
1.10 Keyboard Input . 9
1.11 User Defined Functions . 10
1.12 Basic Statistics 11
1.13 Plotting 11
1.14 Formatted Screen Output 12
1.15 File Input and Output 14
1.15.1 Formatted Output to a File 14
1.15.2 Formatted Input from a File . 14
1.15.3 Unformatted Input and Output (Saving and Retrieving Data) 15
2 Linear Equations . 17
2.1 Introduction . 18
2.2 Linear Systems 19
2.3 Gaussian Elimination 22
2.3.1 Row Interchanges 24
2.3.2 Partial Pivoting 26
2.3.3 Multiple Right-Hand Sides . 30
2.4 Singular Systems . 32
2.5 Symmetric Positive Definite Systems 33
2.6 Iterative Refinement . 35
2.7 Ill-Conditioned Systems . 37
2.8 Gauss–Seidel Iteration 37
viiviii Contents
3 Nonlinear Equations . 47
3.1 Introduction . 48
3.2 Bisection Method 49
3.2.1 Finding an Interval Containing a Root . 50
3.3 Rule of False Position 51
3.4 The Secant Method . 52
3.5 Newton–Raphson Method 55
3.6 Comparison of Methods for a Single Equation . 58
3.7 Newton’s Method for Systems of Nonlinear Equations . 59
3.7.1 Higher Order Systems 63
4 Curve Fitting . 71
4.1 Introduction . 71
4.2 Linear Interpolation . 72
4.2.1 Differences 75
4.3 Polynomial Interpolation 77
4.3.1 Newton Interpolation 77
4.3.2 Neville Interpolation . 80
4.3.3 A Comparison of Newton and Neville Interpolation 81
4.3.4 Spline Interpolation . 83
4.4 Least Squares Approximation 86
4.4.1 Least Squares Straight Line Approximation . 86
4.4.2 Least Squares Polynomial Approximation . 89
5 Numerical Integration 97
5.1 Introduction . 98
5.2 Integration of Tabulated Functions . 98
5.2.1 The Trapezium Rule . 99
5.2.3 Simpson’s Rule . 101
5.2.4 Integration from Irregularly-Spaced Data 102
5.3 Integration of Functions . 104
5.3.1 Analytic vs. Numerical Integration . 104
5.3.2 The Trapezium Rule (Again) 104
5.3.3 Simpson’s Rule (Again) . 106
5.4 Higher Order Rules . 109
6 Numerical Differentiation 119
6.1 Introduction . 120
6.2 Two-Point Formula . 120
6.3 Three- and Five-Point Formulae . 122
6.4 Higher Order Derivatives 125
6.4.1 Error Analysis 126
6.5 Cauchy’s Theorem 128Contents ix
7 Linear Programming . 135
7.1 Introduction . 136
7.2 Forming a Linear Programming Problem 136
7.3 Standard Form 140
7.4 Canonical Form . 141
7.5 The Simplex Method . 142
7.5.1 Starting the Simplex Method 146
7.6 Integer Programming 149
7.6.1 The Branch and Bound Method . 151
7.7 Decision Problems 153
7.8 The Travelling Salesman Problem 155
7.9 The Machine Scheduling Problem 156
8 Optimisation . 169
8.1 Introduction . 170
8.2 Grid Searching Methods . 171
8.2.1 Simple Grid Search . 171
8.2.2 Golden Section Search 173
8.3 Unconstrained Optimisation . 175
8.3.1 The Method of Steepest Descent 176
8.3.2 A Rank-One Method . 178
8.3.3 Generalised Rank-One Method . 181
8.4 Constrained Optimisation 184
8.4.1 Minimisation by Use of a Simple Penalty Function . 185
8.4.2 Minimisation Using the Lagrangian . 187
8.4.3 The Multiplier Function Method 188
9 Ordinary Differential Equations 197
9.1 Introduction . 198
9.2 First-Order Equations 200
9.2.1 Euler’s Method 200
9.2.2 Runge–Kutta Methods 202
9.2.3 Fourth-Order Runge–Kutta . 204
9.2.4 Systems of First-Order Equations 206
9.2.5 Higher Order Equations . 207
9.3 Boundary Value Problems 208
9.3.1 Shooting Method 208
9.3.2 Difference Equations 209
10 Eigenvalues and Eigenvectors 215
10.1 Introduction . 215
10.2 The Characteristic Polynomial . 217
10.3 The Power Method 218
10.3.1 Power Method, Theory . 219
10.4 Eigenvalues of Special Matrices . 222
10.4.1 Eigenvalues, Diagonal Matrix 222
10.4.2 Eigenvalues, Upper Triangular Matrix . 223x Contents
10.5 A Simple QR Method 223
11 Statistics 231
11.1 Introduction . 232
11.2 Statistical Terms . 232
11.2.1 Random Variable 232
11.2.2 Frequency Distribution . 232
11.2.3 Expected Value, Average and Mean . 234
11.2.4 Variance and Standard Deviation 234
11.2.5 Covariance and Correlation . 236
11.3 Least Squares Analysis . 239
11.4 Random Numbers 241
11.4.1 Generating Random Numbers 242
11.5 Random Number Generators 243
11.5.1 Customising Random Numbers . 243
11.6 Monte Carlo Integration . 244
Matlab Index 249
Index 253
Index
B
Backward substitution, 21
Boundary-value problem
difference equations, 209
worked example, 210
shooting method, 207
worked example, 208
C
Cauchy’s theorem, 128
Chebyshev’s theorem, 235
Cotes, 110
Curve fitting, 71
D
Dependent variable, 18
Differences, 75
Differentiation
accuracy of methods, 126
Cauchy’s theorem, 128
worked example, 128, 129
comparison of methods, 123, 130
five-point formula, 122
worked example, 124
higher order derivative, 125
worked example, 127
second-order derivative
worked example, 125
three-point formula, 122
worked example, 123
two-point formula, 120
worked example, 120, 123
E
Eigenvalue, 216
characteristic polynomial, 217
worked example, 217
largest, 218
worked example, 218
power method, 218
simple QR method, 223
worked example, 223
smallest, 221
worked example, 221
upper triangular matrix
worked example, 223
Eigenvector, 216
normalised, 217
worked example, 216
Extrapolation, 73
F
Francis, 227
Frequency, 232
Frequency distribution, 232
G
Gauss–Seidel iteration, 37
worked example, 38
Gaussian elimination, 21
multiplier, 23
partial pivoting, 26
worked example, 26, 28
pivot, 26
pivotal equation, 26
row interchange, 24
worked example, 21, 22
Global minimum, 170
H
Hilbert, 43
Histogram, 232
I
IEEE standards, 26
Independent variable, 18
Initial-value problem
Euler’s method, 200
worked example, 200
Runge–Kutta, 202, 204, 206
worked example, 202, 205, 206
Integer programming, 136, 149
branch and bound, 150
worked example, 151
continuous problem, 150
decision problem, 153
decision variable, 154
worked example, 154
the machine scheduling problem, 156
worked example, 156
the travelling salesman problem, 155
worked example, 155
Integrand, 97
Integration
worked example, 112
comparison of methods, 109, 114
worked example, 111
higher order rules, 109
Monte Carlo, 244
worked example, 244
Newton Cotes, 109
three-eighths rule, 109
of analytic function, 104
worked example, 108
of irregularly tabulated function, 102
worked example, 102
of tabulated function, 98
worked example, 98
Simpson’s rule, 101, 106
worked example, 101
trapezium rule, 99, 101, 104
worked example, 99
Integration by parts, 98
Interpolating polynomial
comparison of methods, 81
Neville, 80
worked example, 80
Newton, 77
worked example, 78, 79
spline, 82
worked example, 84
Interpolation
inverse, 73
Lagrange, 108
linear, 72
piecewise, 84
worked example, 72
piecewise linear, 74
polynomial, 77
piecewise (spline), 84
Iterative refinement, 35
residual, 36
worked example, 35
J
Josephson junction, 198
L
Lagrangian, 187
Least squares approximation, 85
confidence interval, 240
linear, 86
worked example, 86
normal equations, 88
polynomial, 88, 91
worked example, 89
residual, 86
Legendre polynomial, 110
Linear approximation, 72
Linear dependence, 33
Linear equation
comparison of methods, 38
Linear programming, 135
basic variables, 144
canonical form, 140, 141
worked example, 141
constraints, 135
costs, 140
dual problem, 146
feasible region, 138
feasible vertex, 142
graphical method, 138
worked example, 138
objective, 135
optimal solution, 136
problem variables, 140
simplex method, see separate entry, 142
slack variables, 141
standard form, 141
worked example, 141
trivial constraints, 138
vertex, 140
Linear relation, 18
example
Hooke’s law, 18
Kirchoff’s law, 18
mercury thermometer, 18
Linear system, 18
as a model of physical processes, 20
banded, 211Index 255
Linear system (cont.)
example
portal frame, 20
ill-conditioned, 37
in matrix–vector form, 19
worked example, 19
infinity of solutions, 32
worked example, 32
multiple right hand sides, 30
worked example, 30
no solution, 32
worked example, 32
no unique solution, 32
worked example, 32
overdetermined, 86
singular, 33
sparse, 211
symmetric positive definite, 33
worked example, 33
upper triangular system, 20
worked example, 20
Local minimum, 170
comparison of methods, 174, 181
constrained variables, 184
golden section search, 172
worked example, 173
grid search, 171
worked example, 171
method of steepest descent, 176
worked example, 176
multiplier penalty function method, 186
worked example, 188
penalty function method, 185
worked example, 185
rank-one method, 178
worked example, 179
rank-two method, 184
single variable, 171
LU decomposition, 24
M
Matrix
coefficient matrix, 19
determinant, 217
diagonally dominant, 35
Jacobian, 63
permutation matrix, 28
singular, 33
sparse, 38
symmetric positive definite, 33
unitary, 229
upper triangular, 21
Mean value theorem, 60
Mixed integer programming, 136
N
Natural vibration, 216
Nonlinear equation
bisection method, 48
worked example, 49
comparison of methods, 58
example
Butler–Volmer, 48
Newton–Raphson method
problems, 58
worked example, 56
rule of false position, 51
worked example, 51
secant method, 52
breakdown, 54
worked example, 52
Nonlinear system, 58
example
metal plate, 59
turbine rotor, 63
Newton’s method, 58
worked example, 59, 63
Normal distribution, 233
O
Operations research, 159
Order of convergence, 58
Ordinary differential equation, 198
boundary-value problem, see separate
entry, 199
comparison of methods, 203
first-order, 198
higher order equations, 207
initial-value problem, see separate entry,
199
local truncation error, 205
nth-order, 199
second-order, 199
P
Pseudo-random number, 242
generator, 242
multiplicative congruential, 242
R
number, 241
Random variable, 232
average, 233
correlation, 236
worked example, 237
covariance, 236
dispersion, 234
expected value, 233256 Index
Random variable (cont.)
mean, 233
mean and standard deviation
worked example, 235
standard deviation, 234
variance, 234
Raphson, 47
Regression, 239
standard error estimate, 239
worked example, 239
Root, 47
Rounding error, 26
S
Similarity transformation, 223
Simplex method
all slack solution, 144
artificial variable, 148
basic feasible solution, 144
non-basic variables, 143
pseudo objective, 147
revised simplex method, 146
worked example, 142, 144, 147, 148
Stochastic variable, 232
T
Taylor series, 120, 179, 204
Z
Zero (of a function), 47

كلمة سر فك الضغط : books-world.net