ebook img

Numerical Methods in Engineering With MATLAB PDF

435 Pages·2005·2.24 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 Numerical Methods in Engineering With MATLAB

Numerical Methods in Engineering with MATLAB® NumericalMethodsinEngineeringwithMATLAB®isatextforengineer- ingstudentsandareferenceforpracticingengineers,especiallythose whowishtoexplorethepowerandefficiencyofMATLAB.Thechoiceof numericalmethodswasbasedontheirrelevancetoengineeringprob- lems.Everymethodisdiscussedthoroughlyandillustratedwithprob- lems involving both hand computation and programming. MATLAB M-files accompany each method and are available on the book web site.Thiscodeismadesimpleandeasytounderstandbyavoidingcom- plexbook-keepingschemes,whilemaintainingtheessentialfeaturesof themethod.MATLAB,waschosenastheexamplelanguagebecauseof its ubiquitous use in engineering studies and practice. Moreover, it is widelyavailabletostudentsonschoolnetworksandthroughinexpen- siveeducationalversions.MATLABapopulartoolforteachingscientific computation. JaanKiusalaasisaProfessorEmeritusintheDepartmentofEngineering Science and Mechanics at the Pennsylvania State University. He has taughtnumericalmethods,includingfiniteelementandboundaryel- ement methods for over 30 years. He is also the co-author of four other Books—Engineering Mechanics: Statics, Engineering Mechanics: Dynamics,MechanicsofMaterials,andanalternateversionofthiswork withPythoncode. NUMERICAL METHODS IN ENGINEERING WITH MATLAB® Jaan Kiusalaas ThePennsylvaniaStateUniversity cambridge university press Cambridge, New York, Melbourne, Madrid, Cape Town, Singapore, São Paulo Cambridge University Press The Edinburgh Building, Cambridge cb2 2ru, UK Published in the United States of America by Cambridge University Press, New York www.cambridge.org Information on this title: www.cambridge.org/9780521852883 ©JaanKiusalaas2005 This publication is in copyright. Subject to statutory exception and to the provision of relevant collective licensing agreements, no reproduction of any part may take place without the written permission of Cambridge University Press. First published in print format 2005 isbn-13 978-0-511-12811-0 eBook (NetLibrary) isbn-10 0-511-12811-8 eBook (NetLibrary) isbn-13 978-0-521-85288-3 hardback isbn-10 0-521-85288-9 hardback Cambridge University Press has no responsibility for the persistence or accuracy of urls for external or third-party internet websites referred to in this publication, and does not guaranteethatanycontentonsuchwebsitesis,orwillremain,accurateorappropriate. Contents Preface.........vii 1.IntroductiontoMATLAB ............................. 1 2.SystemsofLinearAlgebraicEquations ............. 28 3.InterpolationandCurveFitting ..................... 103 4.RootsofEquations ...................................143 5.NumericalDifferentiation ........................... 182 6.NumericalIntegration ............................... 200 7.InitialValueProblems ............................... 251 8.Two-PointBoundaryValueProblems ............... 297 9.SymmetricMatrixEigenvalueProblems ............ 326 10.IntroductiontoOptimization ....................... 382 Appendices....411 Index...........421 v Preface This book is targeted primarily toward engineers and engineering students of ad- vanced standing (sophomores, seniors and graduate students). Familiarity with a computerlanguageisrequired;knowledgeofbasicengineeringsubjectsisuseful,but notessential. Thetextattemptstoplaceemphasisonnumericalmethods,notprogramming. Mostengineersarenotprogrammers,butproblemsolvers.Theywanttoknowwhat methodscanbeappliedtoagivenproblem,whataretheirstrengthsandpitfallsand howtoimplementthem.Engineersarenotexpectedtowritecomputercodeforbasic tasksfromscratch;theyaremorelikelytoutilizefunctionsandsubroutinesthathave beenalreadywrittenandtested.Thusprogrammingbyengineersislargelyconfined toassemblingexistingpiecesofcodeintoacoherentpackagethatsolvestheproblem athand. The“piece”ofcodeisusuallyafunctionthatimplementsaspecifictask.Forthe userthedetailsofthecodeareunimportant.Whatmattersistheinterface(whatgoes inandwhatcomesout)andanunderstandingofthemethodonwhichthealgorithm isbased.Sincenonumericalalgorithmisinfallible,theimportanceofunderstanding theunderlyingmethodcannotbeoveremphasized;itis,infact,therationalebehind learningnumericalmethods. This book attempts to conform to the views outlined above. Each numerical method is explained in detail and its shortcomings are pointed out. The examples thatfollowindividualtopicsfallintotwocategories:handcomputationsthatillustrate theinnerworkingsofthemethod,andsmallprogramsthatshowhowthecomputer codeisutilizedinsolvingaproblem.Problemsthatrequireprogrammingaremarked with(cid:1). The material consists of the usual topics covered in an engineering course on numericalmethods:solutionofequations,interpolationanddatafitting,numerical differentiationandintegration,solutionofordinarydifferentialequationsandeigen- valueproblems.Thechoiceofmethodswithineachtopicistiltedtowardrelevance vii viii Preface toengineeringproblems.Forexample,thereisanextensivediscussionofsymmetric, sparsely populated coefficient matrices in the solution of simultaneous equations. Inthesamevein,thesolutionofeigenvalueproblemsconcentratesonmethodsthat efficientlyextractspecificeigenvaluesfrombandedmatrices. Animportantcriterionusedintheselectionofmethodswasclarity.Algorithms requiringoverlycomplexbookkeepingwererejectedregardlessoftheirefficiencyand robustness.Thisdecision,whichwastakenwithgreatreluctance,isinkeepingwith theintenttoavoidemphasisonprogramming. The selection of algorithms was also influenced by current practice. This dis- qualifiedseveralwell-knownhistoricalmethodsthathavebeenovertakenbymore recentdevelopments.Forexample,thesecantmethodforfindingrootsofequations wasomittedashavingnoadvantagesoverBrent’smethod.Forthesamereason,the multistepmethodsusedtosolvedifferentialequations(e.g.,MilneandAdamsmeth- ods)wereleftoutinfavoroftheadaptiveRunge–KuttaandBulirsch–Stoermethods. Notablyabsentisachapteronpartialdifferentialequations.Itwasfeltthatthis topicisbesttreatedbyfiniteelementorboundaryelementmethods,whichareoutside thescopeofthisbook.Thefinitedifferencemodel,whichiscommonlyintroduced in numerical methods texts, is just too impractical in handling multidimensional boundaryvalueproblems. Asusual,thebookcontainsmorematerialthancanbecoveredinathree-credit course.Thetopicsthatcanbeskippedwithoutlossofcontinuityaretaggedwithan asterisk(*). The programs listed in this book were tested with MATLAB® 6.5.0 and under Windows®XP.Thesourcecodecanbedownloadedfromthebook’swebsiteat www.cambridge.org/0521852889 The author wishes to express his gratitude to the anonymous reviewers and Professor Andrew Pytel for their suggestions for improving the manuscript. Credit isalsoduetotheauthorsofNumericalRecipes(CambridgeUniversityPress)whose presentationofnumericalmethodswasinspirationalinwritingthisbook. 1 Introduction to MATLAB 1.1 General Information Quick Overview (cid:1) R ThischapterisnotintendedtobeacomprehensivemanualofMATLAB .Oursole aimistoprovidesufficientinformationtogiveyouagoodstart.Ifyouarefamiliar withanothercomputerlanguage,andweassumethatyouare,itisnotdifficulttopick uptherestasyougo. MATLABisahigh-levelcomputerlanguageforscientificcomputinganddatavi- sualizationbuiltaroundaninteractiveprogrammingenvironment.Itisbecomingthe premiereplatformforscientificcomputingateducationalinstitutionsandresearch establishments.Thegreatadvantageofaninteractivesystemisthatprogramscanbe testedanddebuggedquickly,allowingtheusertoconcentratemoreontheprinciples behindtheprogramandlessonprogrammingitself.Sincethereisnoneedtocom- pile,linkandexecuteaftereachcorrection,MATLABprogramscanbedevelopedin muchshortertimethanequivalentFORTRANorCprograms.Onthenegativeside, MATLABdoesnotproducestand-aloneapplications—theprogramscanberunonly oncomputersthathaveMATLABinstalled. MATLAB has other advantages over mainstream languages that contribute to rapidprogramdevelopment: (cid:1) MATLABcontainsalargenumberoffunctionsthataccessprovennumericalli- braries,suchasLINPACKandEISPACK.Thismeansthatmanycommontasks(e.g., solutionofsimultaneousequations)canbeaccomplishedwithasinglefunction call. (cid:1) Thereisextensivegraphicssupportthatallowstheresultsofcomputationstobe plottedwithafewstatements. (cid:1) Allnumericalobjectsaretreatedasdouble-precisionarrays.Thusthereisnoneed todeclaredatatypesandcarryouttypeconversions. 1

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.