Numerical Methods
Using MATLAB
Fourth Edition
John. H. Mathews
California State University, Fullerton
Kurtis D. Fink
Northwest Missouri State University
Upper Saddle River, New Jersey 07458
Library of Congress Cataloging-in-Publication Data
Numerical methods using MATLAB/John H. Mathews,
Kurtis D. Fink—4th ed.
p. cm.
Includes index
ISBN 0-13-065248-2
1. Numerical analysis–Data processing. 2. MATLAB. I. Fink, Kurtis D.
II. Title.
QA297.M39 2004
518–dc22 2003061022
Editor-in-Chief: Sally Yagan
Acquisitions Editor: George Lobell
Production Editor: Lynn Savino Wendel
Vice President/Director of Production and Manufacturing: David W. Riccardi
Senior Managing Editor: Linda Mihatov Behrens
Assistant Managing Editor: Bayani Mendoza de Leon
Executive Managing Editor: Kathleen Schiaparelli
Assisant Manufacturing Manager/Buyer: Michael Bell
Manufacturing Manager: Trudy Pisciotti
Marketing Manager: Halee Dinsey
Marketing Assistant: Rachael Beckman
Art Director: Jayne Conte
Editorial Assistant: Jennifer Brady
Cover Designer: Bruce Kenselaar
Cover Photo Credits: Fans Quilt, Quiltmaker unidentified, initialed “PM” Indiana 1925–1935
Cotton, wool, and rayon, with cotton embroidery 82 × 71 1/2”
Collection American Folk Art Museum, New York Gift of David Pottinger 1980.37.86
c
2004, 1999 by Pearson Education, Inc.
Pearson Prentice Hall
Pearson Education, Inc.
Upper Saddle River, New Jersey 07458
Formerly published under the title Numerical Methods for Mathematics,
Science, and Engineering,
c
1992, 1987 by John H. Mathews.
All rights reserved. No part of this book may
be reproduced, in any form or by any means,
without permission in writing from the publisher.
Pearson Prentice Hall
R
is a trademark of Pearson Education, Inc.
Printed in the United States of America
10987654321
ISBN 0-13-065248-2
Pearson Education LTD., London
Pearson Education Australia PTY, Limited, Sydney
Pearson Education Singapore, Pte. Ltd
Pearson Education North Asia Ltd, Hong Kong
Pearson Education Canada, Ltd., Toronto
Pearson Educacion de Mexico, S.A. de C.V.
Pearson Education - Japan, Tokyo
Pearson Education Malaysia, Pte. Ltd
Contents
Preface vii
1 Preliminaries 1
1.1 Review of Calculus 2
1.2 Binary Numbers 13
1.3 Error Analysis 24
2 Solution of Nonlinear Equations
f (x) = 0 40
2.1 Iteration for Solving x = g(x) 41
2.2 Bracketing Methods for Locating a Root 51
2.3 Initial Approximation and Convergence Criteria 62
2.4 Newton-Raphson and Secant Methods 70
2.5 Aitken’s Process and Steffensen’s and
Muller’s Methods (Optional) 90
3 Solution of Linear Systems AX = B 101
3.1 Introduction to Vectors and Matrices 101
3.2 Properties of Vectors and Matrices 109
3.3 Upper-Triangular Linear Systems 120
iii
iv CONTENTS
3.4 Gaussian Elimination and Pivoting 125
3.5 Triangular Factorization 141
3.6 Iterative Methods for Linear Systems 156
3.7 Iteration for Nonlinear Systems: Seidel and
Newton’s Methods (Optional) 167
4 Interpolation and Polynomial
Approximation 186
4.1 Taylor Series and Calculation of Functions 187
4.2 Introduction to Interpolation 199
4.3 Lagrange Approximation 206
4.4 Newton Polynomials 220
4.5 Chebyshev Polynomials (Optional) 230
4.6 Pad
´
e Approximations 242
5 Curve Fitting 252
5.1 Least-Squares Line 253
5.2 Methods of Curve Fitting 263
5.3 Interpolation by Spline Functions 279
5.4 Fourier Series and Trigonometric Polynomials 297
5.5 B
´
ezier Curves 310
6 Numerical Differentiation 320
6.1 Approximating the Derivative 321
6.2 Numerical Differentiation Formulas 339
7 Numerical Integration 352
7.1 Introduction to Quadrature 353
7.2 Composite Trapezoidal and Simpson’s Rule 364
7.3 Recursive Rules and Romberg Integration 378
7.4 Adaptive Quadrature 392
7.5 Gauss-Legendre Integration (Optional) 399