Numerical Methods with MATLAB

Similar documents
NUMERICAL MATHEMATICS AND COMPUTING

NUMERICAL METHODS FOR ENGINEERING APPLICATION

Applied Numerical Analysis

Numerical Analysis. A Comprehensive Introduction. H. R. Schwarz University of Zürich Switzerland. with a contribution by

Contents. Preface to the Third Edition (2007) Preface to the Second Edition (1992) Preface to the First Edition (1985) License and Legal Information

NUMERICAL METHODS USING MATLAB

MATHEMATICAL METHODS INTERPOLATION

Introduction to Numerical Analysis

PARTIAL DIFFERENTIAL EQUATIONS

Preface. 2 Linear Equations and Eigenvalue Problem 22

Review. Numerical Methods Lecture 22. Prof. Jinbo Bi CSE, UConn

ITERATIVE METHODS FOR SPARSE LINEAR SYSTEMS

Numerical Methods for Engineers. and Scientists. Applications using MATLAB. An Introduction with. Vish- Subramaniam. Third Edition. Amos Gilat.

MATLAB for Engineers

NUMERICAL COMPUTATION IN SCIENCE AND ENGINEERING

Computational Methods

A THEORETICAL INTRODUCTION TO NUMERICAL ANALYSIS

Numerical Methods for Engineers

MATHEMATICS. Course Syllabus. Section A: Linear Algebra. Subject Code: MA. Course Structure. Ordinary Differential Equations

Numerical Methods. Scientists. Engineers

TABLE OF CONTENTS INTRODUCTION, APPROXIMATION & ERRORS 1. Chapter Introduction to numerical methods 1 Multiple-choice test 7 Problem set 9

Third Edition. William H. Press. Raymer Chair in Computer Sciences and Integrative Biology The University of Texas at Austin. Saul A.

FINITE-DIMENSIONAL LINEAR ALGEBRA

INTRODUCTION TO THE CALCULUS OF VARIATIONS AND ITS APPLICATIONS

Numerical Methods for Engineers and Scientists

Introduction to Numerical Analysis

CAM Ph.D. Qualifying Exam in Numerical Analysis CONTENTS

Introduction to Applied Linear Algebra with MATLAB

GAME PHYSICS SECOND EDITION. дяййтаййг 1 *

Mathematics for Engineers and Scientists

ADVANCED ENGINEERING MATHEMATICS

LINEAR AND NONLINEAR PROGRAMMING

NUMERICAL METHODS. lor CHEMICAL ENGINEERS. Using Excel', VBA, and MATLAB* VICTOR J. LAW. CRC Press. Taylor & Francis Group

Numerical Mathematics

Boundary. DIFFERENTIAL EQUATIONS with Fourier Series and. Value Problems APPLIED PARTIAL. Fifth Edition. Richard Haberman PEARSON

Excel for Scientists and Engineers Numerical Method s. E. Joseph Billo

1 Number Systems and Errors 1

Contents. I Basic Methods 13

x x2 2 + x3 3 x4 3. Use the divided-difference method to find a polynomial of least degree that fits the values shown: (b)

Numerical Analysis for Statisticians

Dynamic Systems. Modeling and Analysis. Hung V. Vu. Ramin S. Esfandiari. THE McGRAW-HILL COMPANIES, INC. California State University, Long Beach

Integrated Arithmetic and Basic Algebra

Mathematics for Chemists

MATHEMATICAL FORMULAS AND INTEGRALS

(Linear equations) Applied Linear Algebra in Geoscience Using MATLAB

Table 1 Principle Matlab operators and functions Name Description Page reference

MULTIVARIABLE CALCULUS, LINEAR ALGEBRA, AND DIFFERENTIAL EQUATIONS

Differential Equations with Mathematica

Preface to Second Edition... vii. Preface to First Edition...

Review for Exam 2 Ben Wang and Mark Styczynski

Fundamental Numerical Methods for Electrical Engineering

Applied Linear Algebra

Advanced. Engineering Mathematics

BASIC EXAM ADVANCED CALCULUS/LINEAR ALGEBRA

Mathematical Methods for Engineers and Scientists 1

Numerical Recipes. in Fortran 77. The Art of Scientific Computing Second Edition. Volume 1 of Fortran Numerical Recipes. William H.

Differential Equations

APPLIED PARTIAL DIFFERENTIAL EQUATIONS

GATE Engineering Mathematics SAMPLE STUDY MATERIAL. Postal Correspondence Course GATE. Engineering. Mathematics GATE ENGINEERING MATHEMATICS

Numerical Methods in Matrix Computations

College Algebra. Third Edition. Concepts Through Functions. Michael Sullivan. Michael Sullivan, III. Chicago State University. Joliet Junior College

KINGS COLLEGE OF ENGINEERING DEPARTMENT OF MATHEMATICS ACADEMIC YEAR / EVEN SEMESTER QUESTION BANK

GEOPHYSICAL INVERSE THEORY AND REGULARIZATION PROBLEMS

ENGINEERING MATHEMATICS I. CODE: 10 MAT 11 IA Marks: 25 Hrs/Week: 04 Exam Hrs: 03 PART-A

AN INTRODUCTION TO NUMERICAL METHODS USING MATHCAD. Mathcad Release 14. Khyruddin Akbar Ansari, Ph.D., P.E.

Applied Linear Algebra in Geoscience Using MATLAB

MA1023-Methods of Mathematics-15S2 Tutorial 1

Numerical Analysis. Introduction to. Rostam K. Saeed Karwan H.F. Jwamer Faraidun K. Hamasalh

Numerical Analysis for Engineers and Scientists

Numerical Recipes in C visit

(Mathematical Operations with Arrays) Applied Linear Algebra in Geoscience Using MATLAB

(f(x) P 3 (x)) dx. (a) The Lagrange formula for the error is given by

Math 411 Preliminaries

MATHEMATICAL HANDBOOK. Formulas and Tables

Kernel-based Approximation. Methods using MATLAB. Gregory Fasshauer. Interdisciplinary Mathematical Sciences. Michael McCourt.

Principles of Electron Optics

Numerical Integra/on

Numerical Methods for Engineers

Engineering. Mathematics. GATE 2019 and ESE 2019 Prelims. For. Comprehensive Theory with Solved Examples

Problem 1: Toolbox (25 pts) For all of the parts of this problem, you are limited to the following sets of tools:

MATHEMATICAL FORMULAS AND INTEGRALS

Math 307 Learning Goals. March 23, 2010

F I F T H E D I T I O N. Introductory Methods of Numerical Analysis. S.S. Sastry

ALGEBRA AND ALGEBRAIC COMPUTING ELEMENTS OF. John D. Lipson. Addison-Wesley Publishing Company, Inc.

WILEY. Differential Equations with MATLAB (Third Edition) Brian R. Hunt Ronald L. Lipsman John E. Osborn Jonathan M. Rosenberg

APPLIED NUMERICAL LINEAR ALGEBRA

MATRIX AND LINEAR ALGEBR A Aided with MATLAB

Engineering Mathematics

Preface to the Second Edition. Preface to the First Edition

Contents. Preface for the Instructor. Preface for the Student. xvii. Acknowledgments. 1 Vector Spaces 1 1.A R n and C n 2

Contents. Preface... xi. Introduction...

EAD 115. Numerical Solution of Engineering and Scientific Problems. David M. Rocke Department of Applied Science

Jim Lambers MAT 460/560 Fall Semester Practice Final Exam

BASIC MATRIX ALGEBRA WITH ALGORITHMS AND APPLICATIONS ROBERT A. LIEBLER CHAPMAN & HALL/CRC

Geophysical Data Analysis: Discrete Inverse Theory

MATHEMATICS COMPREHENSIVE EXAM: IN-CLASS COMPONENT

Exploring Monte Carlo Methods

Virtual University of Pakistan

Partial Differential Equations with Numerical Methods

Introduction. Finite and Spectral Element Methods Using MATLAB. Second Edition. C. Pozrikidis. University of Massachusetts Amherst, USA

Transcription:

Numerical Methods with MATLAB A Resource for Scientists and Engineers G. J. BÖRSE Lehigh University PWS Publishing Company I(T)P AN!NTERNATIONAL THOMSON PUBLISHING COMPANY Boston Albany Bonn Cincinnati Detroit London Madrid Melbourne Mexico City New York Paris San Francisco Singapore Tokyo Toronto Washington

Preface ix Notes to the Instructor xii Part I Linear Analysis and Matrices Preview 1 Introduction 1 1 Fundamental Definitions 3 Classification of Equations 3 Linear Simultaneous Equations 4 Gaussian Elimination 8 Potential Problems in Gaussian Elimination 11 Matrix Notation and Multiplication 13 Arithmetic of Matrices 18 Multiplication of Row and Column Vector Matrices 19 ( ) Applications of Matrix Multiplication* 23 ( ) Markov Matrices 24 ( ) Rotation of Coordinate Systems 25 ( ) Gram-Schmidt Orthogonalization 29 ( ) Reciprocal Basis 32 2 Solution of the Matrix Equation Ax = b 52 Existence and Uniqueness of Solutions to Ax = b 53 LU Factorization of a Matrix 60 The Inverse Matrix 64 The Accuracy of a Solution 71 Iterative Solutions to Matrix Equations 75 MATLAB Functions Related to Matrix Inversion 78 3 Matrix Eigenvalue Equations 90 Geometrical Transformations on Vectors in Two Dimensions 90 The Characteristic Equation and the Cayley-Hamilton Theorem 100 Reducing a Symmetric Matrix to Diagonal Form by Jacobi Rotations 102 'Sections and chapters marked with ( ) may be omitted without loss of continuity. iii

IV MATLAB Functions for Eigenvalue Problems 106 Perspective on Eigenvalue Equations 107 ( ) Spectral Decomposition 112 ( ) Singular Value Decomposition 115 Bibliography for Part I 129 Part II MATLAB Applied to Functions of a Single Variable Preview 131 Introduction 132 4 Series Expansions for Functions 133 Radius of Convergence of a Power Series 133 Acceleration of Convergence 135 Taylor Series 139 Pade Approximations 142 M-File Functions 145 5 Roots of Functions of a Single Variable 151 Roots of Polynomials 152 Searching for Roots 154 Refining an Interval by Interval-Halving 156 Newton's Method for Finding Roots 158 The Secant Method 162 6 Minimum or Maximum of a Function 169 General Prescription for Finding a Minimum 170 Stepping Search for an Interval Containing a Minimum 171 Refining the Interval Containing a Minimum 172 7 Numerical Integration Techniques 181 The Trapezoidal Rule for Integration 182 Simpson's Rule 185 Romberg Integration 191 The MATLAB Toolbox Functions quad and quad8 192 Gaussian Quadrature 194 Improper Integrals 198 Bibliography for Part II 205

Part III Functions of Two or More Variables Preview 207 Introduction 208 8 Derivatives of Multivariable Functions 209 Partial Derivatives 209 The Gradient 212 Taylor Series in Two Dimensions 218 9 Roots of Multivariable Functions 224 Zero Contours of a Function of Two Variables 224 Simultaneous Nonlinear Functions 227 10 ( ) Minimization of a Multivariable Function 235 Simplex Methods for Finding Minima 235 Minimization Using Directional Methods 239 Quasi-Newton Method for Minimization of Multivariable Functions 242 11 Multiple Integrals 255 MATLAB Code for Iterated Integrals 255 Romberg Techniques for Double Integrals 260 Special Considerations Regarding Multidimensional Integrals 264 12 ( ) Monte Carlo Integration 268 Integrals as an Average of a Function 268 Monte Carlo Integration Using Random SampUng 270 Monte Carlo Methods for Integrals with Complex Boundaries 274 Summary of the Monte Carlo Integration Method 279 Bibliography for Part III 282 Part IV ( ) Data Analysis and Modeling Preview 285 13 Statistical Description of Data 287 Moments of a Distribution 287 Modes of a Distribution 290

vi Higher Moments of a Distribution: The Skewness and the Kurtosis 292 Distribution Functions 294 Properties of Distribution Functions 298 Combinations of Distribution Functions 299 Comparison of Distributions 302 14 Linear Least Squares Analysis 313 Systematic versus Random Errors 314 Least Squares Fitting of a Straight Line 316 Linear Least Squares Fitting of Polynomials 321 General Linear Least Squares 323 Fitting with Legendre Polynomials 324 15 Nonlinear Least Squares 336 Pseudolinear Least Squares 336 Elementary Nonlinear Methods 338 Use of the Toolbox Function f mins to Find the Optimum x 2 339 More Sophisticated Nonlinear Methods 344 16 Interpolation and Spline Fits 351 Lagrange Interpolation 351 Neville's Iterative Construction of the Lagrange Polynomial 354 Bulirsch-Stoer Interpolation and Extrapolation 359 Cubic Spline Interpolation 363 17 Fourier Analysis 372 The Fourier Series 372 A Complex Version of the Fourier Expansion 374 The Fourier Transform 375 The Discrete Fourier Transform 382 Fast Fourier Transforms (FFTs) 385 Bibliography for Part IV 396 Part V Differential Equations Preview 399 18 Elementary Concepts 401 First-Order Differential Equations 401 Second-Order Differential Equations 404

vii Replacing an nth-order Equation by n Coupled First-Order Equations 405 19 Initial Value Differential Equations 408 Elementary Stepping Procedures for First-Order Equations 409 Improvements to Euler's Method 413 The Method of Runge-Kutta 417 MATLAB Implementation of Runge-Kutta Algorithms 419 ( ) The Bulirsch-Stoer Extrapolation Method 424 20 ( ) Two-Point Boundary Value Problems 434 Shooting Methods for Boundary Value Problems 436 Relaxation Methods 442 The Finite Element Method 451 21 ( ) The Method of Superposition 463 Theoretical Properties of Linear Boundary Value Problems 463 The Superposition Method 466 Variation of Parameters 469 22 ( ) Introduction to Partial Differential Equations 475 Preliminary Concepts 476 Initial Value Type Methods 482 Boundary Value Problems Elliptic Equations 495 Beyond This Chapter 501 Bibliography for Part V 508 Appendix Programming in MATLAB A.i Matrix Algebra in MATLAB 513 Basic Arithmetic Operators 513 Entering Matrices and Vectors 514 Mathematical Functions Available in MATLAB 515 Referencing Elements of a Matrix 516 Special Matrices in MATLAB 518 Special MATLAB Functions for Constructing Large Matrices 519 The Colon for Characterizing Parts of a Matrix 520 Some Cautions When Entering Matrices in MATLAB 521

viii A.ii Polynomials and Other Functions 526 Evaluation of Polynomials 526 Loop Structures in MATLAB 527 Vectorized Arithmetic Operations 530 Multiplication and Division of Polynomials 532 Elementary MATLAB M-Files and Polynomials 534 Writing M-files with an Editor 537 A.iii MATLAB Logical Structures 545 MATLAB Logical Structures 545 MATLAB if Structures 550 Use of the MATLAB Function f eval 552 A.iv Two-Dimensional Plotting 558 The MATLAB Plotting Function plot (x, у) 558 Printing a Graph 561 MATLAB Functions 565 A.v Constructing and Plotting Multivariable Functions 567 Establishing a Grid of x, у Values 567 Three-Dimensional Perspective Graphs 570 Contour Graphs 577 Non-Cartesian Coordinates 578 Plotting Three-Dimensional Trajectories 582 Four-Dimensional Plots 583 A.vi Elementary Input/Output in MATLAB 590 Connecting a Data File to MATLAB: The f open Statement 591 Reading Data from an Existing File: The f scanf Statement 591 Output from MATLAB Using fprintf 593 Problems MATLAB Functions Used Answers 597 Index 629