ebook img

Finite Difference Methods for Ordinary and Partial Differential Equations: Steady-State and Time-Dependent Problems (Classics in Applied Mathematics) PDF

356 Pages·2007·22.43 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Finite Difference Methods for Ordinary and Partial Differential Equations: Steady-State and Time-Dependent Problems (Classics in Applied Mathematics)

OT98_LevequeFM2.qxp 6/4/2007 10:20 AM Page 1 Finite Difference Methods for Ordinary and Partial Differential Equations OT98_LevequeFM2.qxp 6/4/2007 10:20 AM Page 2 OT98_LevequeFM2.qxp 6/4/2007 10:20 AM Page 3 Finite Difference Methods for Ordinary and Partial Differential Equations Steady-State and Time-Dependent Problems Randall J. LeVeque University of Washington Seattle, Washington Society for Industrial and Applied Mathematics • Philadelphia OT98_LevequeFM2.qxp 6/4/2007 10:20 AM Page 4 Copyright © 2007 by the Society for Industrial and Applied Mathematics. 10 9 8 7 6 5 4 3 2 1 All rights reserved. Printed in the United States of America. No part of this book may be reproduced, stored, or transmitted in any manner without the written permission of the publisher. For information, write to the Society for Industrial and Applied Mathematics, 3600 University City Science Center, Philadelphia, PA 19104-2688. Trademarked names may be used in this book without the inclusion of a trademark symbol. These names are used in an editorial context only; no infringement of trademark is intended. MATLAB is a registered trademark of The MathWorks, Inc. For MATLAB product information, please contact The MathWorks, Inc., 3 Apple Hill Drive, Natick, MA 01760-2098 USA, 508- 647-7000, Fax: 508-647-7101, [email protected], www.mathworks.com. Library of Congress Cataloging-in-Publication Data LeVeque, Randall J., 1955- Finite difference methods for ordinary and partial differential equations : steady-state and time-dependent problems / Randall J. LeVeque. p.cm. Includes bibliographical references and index. ISBN 978-0-898716-29-0 (alk. paper) 1. Finite differences. 2. Differential equations. I. Title. QA431.L548 2007 515’.35—dc22 2007061732 Partial royalties from the sale of this book are placed in a fund to help students attend SIAM meetings and other SIAM-related activities. This fund is administered by SIAM, and qualified individuals are encouraged to write directly to SIAM for guidelines. is a registered trademark. OT98_LevequeFM2.qxp 6/4/2007 10:20 AM Page 5 To my family, Loyce, Ben, Bill, and Ann “rjlfdm” 2007/6/1 i ipagevii i i Contents Preface xiii I BoundaryValueProblemsandIterativeMethods 1 1 FiniteDifferenceApproximations 3 1.1 Truncationerrors. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 1.2 Derivingfinitedifferenceapproximations . . . . . . . . . . . . . . . . 7 1.3 Secondorderderivatives . . . . . . . . . . . . . . . . . . . . . . . . . 8 1.4 Higherorderderivatives . . . . . . . . . . . . . . . . . . . . . . . . . 9 1.5 Ageneralapproachtoderivingthecoefficients . . . . . . . . . . . . . 10 2 SteadyStatesandBoundaryValueProblems 13 2.1 Theheatequation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 2.2 Boundaryconditions. . . . . . . . . . . . . . . . . . . . . . . . . . . 14 2.3 Thesteady-stateproblem . . . . . . . . . . . . . . . . . . . . . . . . 14 2.4 Asimplefinitedifferencemethod . . . . . . . . . . . . . . . . . . . . 15 2.5 Localtruncationerror . . . . . . . . . . . . . . . . . . . . . . . . . . 17 2.6 Globalerror . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 2.7 Stability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 2.8 Consistency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 2.9 Convergence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 2.10 Stabilityinthe2-norm . . . . . . . . . . . . . . . . . . . . . . . . . . 20 2.11 Green’sfunctionsandmax-normstability. . . . . . . . . . . . . . . . 22 2.12 Neumannboundaryconditions . . . . . . . . . . . . . . . . . . . . . 29 2.13 Existenceanduniqueness . . . . . . . . . . . . . . . . . . . . . . . . 32 2.14 Orderingtheunknownsandequations. . . . . . . . . . . . . . . . . . 34 2.15 Agenerallinearsecondorderequation . . . . . . . . . . . . . . . . . 35 2.16 Nonlinearequations . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 2.16.1 Discretizationofthenonlinearboundaryvalueproblem . 38 2.16.2 Nonuniqueness. . . . . . . . . . . . . . . . . . . . . . . 40 2.16.3 Accuracyonnonlinearequations . . . . . . . . . . . . . 41 2.17 Singularperturbationsandboundarylayers . . . . . . . . . . . . . . . 43 2.17.1 Interiorlayers . . . . . . . . . . . . . . . . . . . . . . . 46 vii i i i i “rjlfdm” 2007/6/1 i ipageviii i i viii Contents 2.18 Nonuniformgrids . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 2.18.1 Adaptivemeshselection . . . . . . . . . . . . . . . . . . 51 2.19 Continuationmethods . . . . . . . . . . . . . . . . . . . . . . . . . . 52 2.20 Higherordermethods . . . . . . . . . . . . . . . . . . . . . . . . . . 52 2.20.1 Fourthorderdifferencing . . . . . . . . . . . . . . . . . 52 2.20.2 Extrapolationmethods . . . . . . . . . . . . . . . . . . . 53 2.20.3 Deferredcorrections . . . . . . . . . . . . . . . . . . . . 54 2.21 Spectralmethods. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 3 EllipticEquations 59 3.1 Steady-stateheatconduction . . . . . . . . . . . . . . . . . . . . . . 59 3.2 The5-pointstencilfortheLaplacian . . . . . . . . . . . . . . . . . . 60 3.3 Orderingtheunknownsandequations. . . . . . . . . . . . . . . . . . 61 3.4 Accuracyandstability . . . . . . . . . . . . . . . . . . . . . . . . . . 63 3.5 The9-pointLaplacian . . . . . . . . . . . . . . . . . . . . . . . . . . 64 3.6 Otherellipticequations . . . . . . . . . . . . . . . . . . . . . . . . . 66 3.7 Solvingthelinearsystem . . . . . . . . . . . . . . . . . . . . . . . . 66 3.7.1 SparsestorageinMATLAB . . . . . . . . . . . . . . . . 68 4 IterativeMethodsforSparseLinearSystems 69 4.1 JacobiandGauss–Seidel. . . . . . . . . . . . . . . . . . . . . . . . . 69 4.2 Analysisofmatrixsplittingmethods . . . . . . . . . . . . . . . . . . 71 4.2.1 Rateofconvergence . . . . . . . . . . . . . . . . . . . . 74 4.2.2 Successiveoverrelaxation . . . . . . . . . . . . . . . . . 76 4.3 Descentmethodsandconjugategradients . . . . . . . . . . . . . . . . 78 4.3.1 Themethodofsteepestdescent . . . . . . . . . . . . . . 79 4.3.2 TheA-conjugatesearchdirection . . . . . . . . . . . . . 83 4.3.3 Theconjugate-gradientalgorithm . . . . . . . . . . . . . 86 4.3.4 Convergenceofconjugategradient . . . . . . . . . . . . 88 4.3.5 Preconditioners . . . . . . . . . . . . . . . . . . . . . . 93 4.3.6 IncompleteCholeskyandILUpreconditioners . . . . . . 96 4.4 TheArnoldiprocessandGMRESalgorithm . . . . . . . . . . . . . . 96 4.4.1 Krylovmethodsbasedonthreetermrecurrences . . . . . 99 4.4.2 OtherapplicationsofArnoldi . . . . . . . . . . . . . . . 100 4.5 Newton–Krylovmethodsfornonlinearproblems . . . . . . . . . . . . 101 4.6 Multigridmethods . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103 4.6.1 SlowconvergenceofJacobi . . . . . . . . . . . . . . . . 103 4.6.2 Themultigridapproach . . . . . . . . . . . . . . . . . . 106 II InitialValueProblems 111 5 TheInitialValueProblemforOrdinaryDifferentialEquations 113 5.1 Linearordinarydifferentialequations . . . . . . . . . . . . . . . . . . 114 5.1.1 Duhamel’sprinciple . . . . . . . . . . . . . . . . . . . . 115 5.2 Lipschitzcontinuity . . . . . . . . . . . . . . . . . . . . . . . . . . . 116 i i i i “rjlfdm” 2007/6/1 i ipageix i i Contents ix 5.2.1 Existenceanduniquenessofsolutions. . . . . . . . . . . 116 5.2.2 Systemsofequations . . . . . . . . . . . . . . . . . . . 117 5.2.3 SignificanceoftheLipschitzconstant . . . . . . . . . . . 118 5.2.4 Limitations . . . . . . . . . . . . . . . . . . . . . . . . . 119 5.3 Somebasicnumericalmethods . . . . . . . . . . . . . . . . . . . . . 120 5.4 Truncationerrors. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121 5.5 One-steperrors. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122 5.6 Taylorseriesmethods . . . . . . . . . . . . . . . . . . . . . . . . . . 123 5.7 Runge–Kuttamethods . . . . . . . . . . . . . . . . . . . . . . . . . . 124 5.7.1 Embeddedmethodsanderrorestimation . . . . . . . . . 128 5.8 One-stepversusmultistepmethods . . . . . . . . . . . . . . . . . . . 130 5.9 Linearmultistepmethods . . . . . . . . . . . . . . . . . . . . . . . . 131 5.9.1 Localtruncationerror . . . . . . . . . . . . . . . . . . . 132 5.9.2 Characteristicpolynomials. . . . . . . . . . . . . . . . . 133 5.9.3 Startingvalues . . . . . . . . . . . . . . . . . . . . . . . 134 5.9.4 Predictor-correctormethods . . . . . . . . . . . . . . . . 135 6 Zero-StabilityandConvergenceforInitialValueProblems 137 6.1 Convergence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137 6.2 Thetestproblem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138 6.3 One-stepmethods . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138 6.3.1 Euler’smethodonlinearproblems . . . . . . . . . . . . 138 6.3.2 Relationtostabilityforboundaryvalueproblems. . . . . 140 6.3.3 Euler’smethodonnonlinearproblems . . . . . . . . . . 141 6.3.4 Generalone-stepmethods . . . . . . . . . . . . . . . . . 142 6.4 Zero-stabilityoflinearmultistepmethods. . . . . . . . . . . . . . . . 143 6.4.1 Solvinglineardifferenceequations . . . . . . . . . . . . 144 7 AbsoluteStabilityforOrdinaryDifferentialEquations 149 7.1 Unstablecomputationswithazero-stablemethod . . . . . . . . . . . 149 7.2 Absolutestability . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151 7.3 Stabilityregionsforlinearmultistepmethods . . . . . . . . . . . . . . 153 7.4 Systemsofordinarydifferentialequations . . . . . . . . . . . . . . . 156 7.4.1 Chemicalkinetics . . . . . . . . . . . . . . . . . . . . . 157 7.4.2 Linearsystems . . . . . . . . . . . . . . . . . . . . . . . 158 7.4.3 Nonlinearsystems . . . . . . . . . . . . . . . . . . . . . 160 7.5 Practicalchoiceofstepsize . . . . . . . . . . . . . . . . . . . . . . . 161 7.6 Plottingstabilityregions . . . . . . . . . . . . . . . . . . . . . . . . . 162 7.6.1 Theboundarylocusmethodforlinearmultistepmethods. 162 7.6.2 Plottingstabilityregionsofone-stepmethods . . . . . . . 163 7.7 Relativestabilityregionsandorderstars . . . . . . . . . . . . . . . . 164 8 StiffOrdinaryDifferentialEquations 167 8.1 Numericaldifficulties . . . . . . . . . . . . . . . . . . . . . . . . . . 168 8.2 Characterizationsofstiffness . . . . . . . . . . . . . . . . . . . . . . 169 8.3 Numericalmethodsforstiffproblems . . . . . . . . . . . . . . . . . . 170 i i i i “rjlfdm” 2007/6/1 i ipagex i i x Contents 8.3.1 A-stabilityandA(˛)-stability . . . . . . . . . . . . . . . 171 8.3.2 L-stability . . . . . . . . . . . . . . . . . . . . . . . . . 171 8.4 BDFmethods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173 8.5 TheTR-BDF2method . . . . . . . . . . . . . . . . . . . . . . . . . . 175 8.6 Runge–Kutta–Chebyshevexplicitmethods . . . . . . . . . . . . . . . 175 9 DiffusionEquationsandParabolicProblems 181 9.1 Localtruncationerrorsandorderofaccuracy . . . . . . . . . . . . . . 183 9.2 Methodoflinesdiscretizations . . . . . . . . . . . . . . . . . . . . . 184 9.3 Stabilitytheory. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186 9.4 Stiffnessoftheheatequation . . . . . . . . . . . . . . . . . . . . . . 186 9.5 Convergence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189 9.5.1 PDEversusODEstabilitytheory . . . . . . . . . . . . . 191 9.6 VonNeumannanalysis . . . . . . . . . . . . . . . . . . . . . . . . . 192 9.7 Multidimensionalproblems . . . . . . . . . . . . . . . . . . . . . . . 195 9.8 Thelocallyone-dimensionalmethod . . . . . . . . . . . . . . . . . . 197 9.8.1 Boundaryconditions . . . . . . . . . . . . . . . . . . . . 198 9.8.2 Thealternatingdirectionimplicitmethod . . . . . . . . . 199 9.9 Otherdiscretizations . . . . . . . . . . . . . . . . . . . . . . . . . . . 200 10 AdvectionEquationsandHyperbolicSystems 201 10.1 Advection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201 10.2 Methodoflinesdiscretization . . . . . . . . . . . . . . . . . . . . . . 203 10.2.1 ForwardEulertimediscretization . . . . . . . . . . . . . 204 10.2.2 Leapfrog . . . . . . . . . . . . . . . . . . . . . . . . . . 205 10.2.3 Lax–Friedrichs . . . . . . . . . . . . . . . . . . . . . . . 206 10.3 TheLax–Wendroffmethod . . . . . . . . . . . . . . . . . . . . . . . 207 10.3.1 Stabilityanalysis . . . . . . . . . . . . . . . . . . . . . . 209 10.4 Upwindmethods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210 10.4.1 Stabilityanalysis . . . . . . . . . . . . . . . . . . . . . . 211 10.4.2 TheBeam–Warmingmethod . . . . . . . . . . . . . . . 212 10.5 VonNeumannanalysis . . . . . . . . . . . . . . . . . . . . . . . . . 212 10.6 Characteristictracingandinterpolation . . . . . . . . . . . . . . . . . 214 10.7 TheCourant–Friedrichs–Lewycondition . . . . . . . . . . . . . . . . 215 10.8 Somenumericalresults . . . . . . . . . . . . . . . . . . . . . . . . . 218 10.9 Modifiedequations . . . . . . . . . . . . . . . . . . . . . . . . . . . 218 10.10 Hyperbolicsystems . . . . . . . . . . . . . . . . . . . . . . . . . . . 224 10.10.1 Characteristicvariables . . . . . . . . . . . . . . . . . . 224 10.11 Numericalmethodsforhyperbolicsystems . . . . . . . . . . . . . . . 225 10.12 Initialboundaryvalueproblems . . . . . . . . . . . . . . . . . . . . . 226 10.12.1 Analysisofupwindontheinitialboundaryvalueproblem 226 10.12.2 Outflowboundaryconditions . . . . . . . . . . . . . . . 228 10.13 Otherdiscretizations . . . . . . . . . . . . . . . . . . . . . . . . . . . 230 11 MixedEquations 233 11.1 Someexamples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233 i i i i “rjlfdm” 2007/6/1 i ipagexi i i Contents xi 11.2 Fullycoupledmethodoflines . . . . . . . . . . . . . . . . . . . . . . 235 11.3 FullycoupledTaylorseriesmethods . . . . . . . . . . . . . . . . . . 236 11.4 Fractionalstepmethods . . . . . . . . . . . . . . . . . . . . . . . . . 237 11.5 Implicit-explicitmethods . . . . . . . . . . . . . . . . . . . . . . . . 239 11.6 Exponentialtimedifferencingmethods . . . . . . . . . . . . . . . . . 240 11.6.1 Implementingexponentialtimedifferencingmethods . . 241 III Appendices 243 A MeasuringErrors 245 A.1 Errorsinascalarvalue. . . . . . . . . . . . . . . . . . . . . . . . . . 245 A.1.1 Absoluteerror . . . . . . . . . . . . . . . . . . . . . . . 245 A.1.2 Relativeerror. . . . . . . . . . . . . . . . . . . . . . . . 246 A.2 “Big-oh”and“little-oh”notation . . . . . . . . . . . . . . . . . . . . 247 A.3 Errorsinvectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248 A.3.1 Normequivalence . . . . . . . . . . . . . . . . . . . . . 249 A.3.2 Matrixnorms. . . . . . . . . . . . . . . . . . . . . . . . 250 A.4 Errorsinfunctions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250 A.5 Errorsingridfunctions . . . . . . . . . . . . . . . . . . . . . . . . . 251 A.5.1 Normequivalence . . . . . . . . . . . . . . . . . . . . . 252 A.6 Estimatingerrorsinnumericalsolutions . . . . . . . . . . . . . . . . 254 A.6.1 Estimatesfromthetruesolution . . . . . . . . . . . . . . 255 A.6.2 Estimatesfromafine-gridsolution . . . . . . . . . . . . 256 A.6.3 Estimatesfromcoarsersolutions . . . . . . . . . . . . . 256 B PolynomialInterpolationandOrthogonalPolynomials 259 B.1 Thegeneralinterpolationproblem. . . . . . . . . . . . . . . . . . . . 259 B.2 Polynomialinterpolation . . . . . . . . . . . . . . . . . . . . . . . . 260 B.2.1 Monomialbasis . . . . . . . . . . . . . . . . . . . . . . 260 B.2.2 Lagrangebasis . . . . . . . . . . . . . . . . . . . . . . . 260 B.2.3 Newtonform . . . . . . . . . . . . . . . . . . . . . . . . 260 B.2.4 Errorinpolynomialinterpolation . . . . . . . . . . . . . 262 B.3 Orthogonalpolynomials . . . . . . . . . . . . . . . . . . . . . . . . . 262 B.3.1 Legendrepolynomials . . . . . . . . . . . . . . . . . . . 264 B.3.2 Chebyshevpolynomials . . . . . . . . . . . . . . . . . . 265 C EigenvaluesandInner-Product Norms 269 C.1 Similaritytransformations . . . . . . . . . . . . . . . . . . . . . . . . 270 C.2 Diagonalizablematrices . . . . . . . . . . . . . . . . . . . . . . . . . 271 C.3 TheJordancanonicalform . . . . . . . . . . . . . . . . . . . . . . . 271 C.4 SymmetricandHermitianmatrices . . . . . . . . . . . . . . . . . . . 273 C.5 Skew-symmetricandskew-Hermitianmatrices . . . . . . . . . . . . . 274 C.6 Normalmatrices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274 C.7 Toeplitzandcirculantmatrices . . . . . . . . . . . . . . . . . . . . . 275 C.8 TheGershgorintheorem . . . . . . . . . . . . . . . . . . . . . . . . . 277 i i i i

Description:
This book introduces finite difference methods for both ordinary differential equations (ODEs) and partial differential equations (PDEs) and discusses the similarities and differences between algorithm design and stability analysis for different types of equations. A unified view of stability theory
See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.