# Applied Numerical Methods Using MATLAB, 2nd Edition

Hardcover

Pre-order

€136.80

*VAT

## Evaluation Copy

Request an Evaluation Copy

# Applied Numerical Methods Using MATLAB, 2nd Edition

ISBN: 978-1-119-62680-0 March 2020

Hardcover
Pre-order
€136.80
Editions Next

## Description

This book makes use of MATLAB software to teach the fundamental concepts using the software to solve practical engineering and/or science problems. The programs are presented in a complete form so that readers can run them instantly with no programming skill, allowing them to focus on understanding the mathematical manipulation process and making interpretations of the results. The book targets students who do not like and/or do not have time to derive and prove mathematical results, helping them develop their problem-solving capability without being involved in details about the MATLAB codes. It also targets students who want to delve into details, helping them understand underlying algorithms and equations as deeply as they want.

Preface ix

Chapter 1: MATLAB Usage and Computational Errors 1

1.1 Basic Operations of MATLAB 1

1.1.1 Input/Output of Data from MATLAB Command Window 2

1.1.2 Input/Output of Data through Files 2

1.1.3 Input/Output of Data using Keyboard 3

1.1.4 2-D Graphic Input/Output 5

1.1.5 3-D Graphic Output 10

1.1.6 Mathematical Functions 11

1.1.7 Operations on Vectors and Matrices 13

1.1.8 Random Number Generators 22

1.1.9 Flow Control 24

1.2 Computer Errors vs. Human Mistakes 27

1.2.1 IEEE 64-bit Floating-Point Number Representation 27

1.2.2 Various Kinds of Computing Errors 30

1.2.3 Absolute/Relative Computing Errors 32

1.2.4 Error Propagation 32

1.2.5 Tips for Avoiding Large Errors 33

1.3 Toward Good Program 36

1.3.1 Nested Computing for Computational Efficiency 36

1.3.2 Vector Operation vs. Loop Iteration 38

1.3.3 Iterative Routine vs. Recursive Routine 39

1.3.4 To Avoid Runtime Error 39

1.3.5 Parameter Sharing via Global Variables 42

1.3.6 Parameter Passing through VARARGIN 43

1.3.7 Adaptive Input Argument List 44

Problems 45

Chapter 2: System of Linear Equations 67

2.1 Solution for a System of Linear Equations 68

2.1.1 The Nonsingular Case of M=N 68

2.1.2 The Underdetermined Case - Minimum-Norm Solution 68

2.1.3 The Overdetermined Case - Least-Squares Error Solution 71

2.1.4 RLSE (Recursive Least Square Estimation) 72

2.2 Solving a System of Linear Equations 74

2.2.1 Gauss Elimination 74

2.2.2 Partial Pivoting 76

2.2.3 Gauss-Jordan Elimination 83

2.3 Inverse Matrix 86

2.4 Decomposition (Factorization) 86

2.4.1 LU Decomposition (Factorization) - Triangularization 86

2.4.2 Other Decomposition (Factorization) - Cholesky, QR and SVD 90

2.5 Iterative Methods to Solve Equations 93

2.5.1 Jacobi Iteration 93

2.5.2 Gauss-Seidel Iteration 96

2.5.3 Convergence of Jacobi and Gauss-Seidel Iteration 98

Problems 101

Chapter 3: Interpolation and Curve Fitting 113

3.1 Interpolation by Lagrange Polynomial 113

3.2 Interpolation by Newton Polynomial 115

3.3 Approximation by Chebyshev Polynomial 120

3.4 Pade Approximation by Rational Function 124

3.5 Interpolation by Cubic Spline 127

3.6 Hermite Interpolating Polynomial 132

3.7 Two-Dimensional Interpolation 134

3.8 Curve Fitting 136

3.8.1 Straight Line Fit - A Polynomial Function of Degree 1 137

3.8.2 Polynomial Curve Fit - A Polynomial Function of Higher Degree 138

3.8.3 Exponential Curve Fit and Other Functions 142

3.9 Fourier Transform 144

3.9.1 FFT vs. DFT 144

3.9.2 Physical Meaning of DFT 146

3.9.3 Interpolation by Using DFS 148

Problems 151

Chapter 4: Nonlinear Equations 171

4.1 Iterative Method toward Fixed Point 171

4.2 Bisection Method 174

4.3 False Position or Regula Falsi Method 176

4.4 Newton(-Raphson) Method 177

4.5 Secant Method 180

4.6 Newton Method for a System of Nonlinear Equations 181

4.7 Bairstow's Method for a Polynomial Equation 184

4.8 Symbolic Solutions for Equations 186

4.9 Real-World Problems 187

Problems 193

Chapter 5: Numerical Differentiation/Integration 211

5.1 Difference Approximation for the First Derivative 211

5.2 Approximation Error of the First Derivative 213

5.3 Difference Approximation for Second and Higher Derivative 217

5.4 Interpolating Polynomial and Numerical Differential 221

5.5 Numerical Integration and Quadrature 222

5.6 Trapezoidal Method and Simpson Method 225

5.7 Recursive Rule and Romberg Integration 226

5.9.1 Gauss-Legendre Integration 232

5.9.2 Gauss-Hermite Integration 235

5.9.2 Gauss-Laguerre Integration 236

5.9.4 Gauss-Chebyshev Integration 237

5.10 Double Integral 237

5.11 Integration Involving PWL Function 240

Problems 243

Chapter 6: Ordinary Differential Equations 259

6.1 Euler method 259

6.2 Heun method 262

6.3 Runge-kutta method 263

6.4 Predictor-corrector method 265

6.4.2 Hamming Method 268

6.4.3 Comparison of Methods 269

6.5 Vector differential equationS 272

6.5.1 State Equation 272

6.5.2 Discretization of LTI State Equation 275

6.5.3 High-order Differential Equations to State Equations 277

6.5.4 Stiff Equations 278

6.6 Boundary value problem (BVP) 283

6.6.1 Shooting Method 283

6.6.2 Finite Difference Method 287

Problems 289

Chapter 7: Optimization 319

7.1 Unconstrained Optimization 319

7.1.1 Golden Search Method 319

7.1.4 Steepest Descent Method 325

7.1.5 Newton Method 327

7.1.7 Simulated Annealing Method 331

7.1.8 Genetic Algorithm 334

7.2 Constrained Optimization 339

7.2.1 Lagrange Multiplier Method 339

7.2.2 Penalty Function Method 344

7.3 MATLAB Built-in Functions for Optimization 346

7.3.1 Unconstrained Optimization 347

7.3.2 Constrained Optimization 349

7.3.3 Linear Programing (LP) 352

7.3.4 Mixed Integer Linear Programing (MILP) 357

7.4 Neural Network 365

7.6 Recursive Least Square Estimation (RLSE) 373

Problems 377

Chapter 8: Matrices and Eigenvalues 393

8.1 Eigenvalues and Eigenvectors 393

8.2 Similarity Transformation and Diagonalization 395

8.3 Power Method 399

8.3.1 Scaled Power Method 399

8.3.2 Inverse Power Method 400

8.3.3 Shifted Inverse Power Method 400

8.4 Jacobi Method 402

8.5 Gram-Schmidt Orthonormalization and QR Decomposition 405

8.6 Physical Meaning of Eigenvalue/Eigenvectors 408

8.7 Differential Equations with Eigenvectors 411

8.8 DOA Estimation with Eigenvectors 415

Problems 419

Chapter 9: Partial Differential Equations 427

9.1 Elliptic PDE 428

9.2 Parabolic PDE 431

9.2.1 The Explicit Forward Euler Method 432

9.2.2 The Implicit Backward Euler Method 433

9.2.3 The Crank-Nicholson Method 434

9.2.4 Using the MATLAB function 'pdepe()' 436

9.2.5 Two Dimensional Parabolic PDE 438

9.3 Hyperbolic PDE 440

9.3.1 The Explicit Central Difference Method 441

9.3.2 Two Dimensional Hyperbolic PDE 443

9.4 Finite Element Method (FEM) for Solving PDE 446

9.5 GUI of MATLAB for solving PDEs - PDETTOOL 455

9.5.1 Basic PEDs Solvable by PDETOOL 455

9.5.2 The Usage of PDETOOL 456

9.5.3 Examples of Using PDETOOL to Solve PDEs 459

Problems 469

Appendicies 483

Appendix A: Mean Value Theorem 483

Appendix B: Matrix Operations/Properties 483

Appendix C: Differentiation w.r.t. a Vector 489

Appendix D: Laplace Trasnform 490

Appendix E: Fourier Trasnform 491

Appendix F: Useful Formulas 493

Appendix G: Symbolic Computation 495

Appendix H: Sparse Matrices 502

Appendix I: MATLAB 504

References 509

Index 511