Example: confidence

Introduction to Numerical Methods and Matlab …

Introduction to Numerical MethodsandMatlabProgramming for EngineersTodd Young and Martin J. MohlenkampDepartment of MathematicsOhio UniversityAthens, OH 29, 2021iiCopyright 2008, 2009, 2011, 2014, 2016, 2017, 2018, 2020, 2021 Todd R. Young andMartin J. edition 2004, by Todd R. go to many students who have pointed out typos and mistakes. Thank you toDr. Yaqin Feng for suggestions to improve the work is licensed under the Creative Commons International License. To view a copy of this license, notes were developed by the first author in the process of teaching a course on appliednumerical Methods for Civil Engineering majors during 2002-2004 and was modified to includeMechanical Engineering in 2005. The materials have been periodically updated since then andunderwent a major revision by the second author in main goals of these lectures are to introduce concepts of Numerical Methods and introduceMatlabin an Engineering framework.

Matrices and Matrix Operations in Matlab 34 Lecture 9. Introduction to Linear Systems 39 Lecture 10. Some Facts About Linear Systems 43 Lecture 11. Accuracy, Condition Numbers and Pivoting 46 Lecture 12. LU Decomposition 50 Lecture 13. Nonlinear Systems - …

Tags:

  Introduction, Methods, Numerical, Matlab, Introduction to numerical methods and matlab

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Transcription of Introduction to Numerical Methods and Matlab …

1 Introduction to Numerical MethodsandMatlabProgramming for EngineersTodd Young and Martin J. MohlenkampDepartment of MathematicsOhio UniversityAthens, OH 29, 2021iiCopyright 2008, 2009, 2011, 2014, 2016, 2017, 2018, 2020, 2021 Todd R. Young andMartin J. edition 2004, by Todd R. go to many students who have pointed out typos and mistakes. Thank you toDr. Yaqin Feng for suggestions to improve the work is licensed under the Creative Commons International License. To view a copy of this license, notes were developed by the first author in the process of teaching a course on appliednumerical Methods for Civil Engineering majors during 2002-2004 and was modified to includeMechanical Engineering in 2005. The materials have been periodically updated since then andunderwent a major revision by the second author in main goals of these lectures are to introduce concepts of Numerical Methods and introduceMatlabin an Engineering framework.

2 By this we do not mean that every problem is a real life engineering application, but more that the engineering way of thinking is emphasized throughoutthe philosophy of this book was formed over the course of many years. My father was a CivilEngineer and surveyor, and he introduced me to engineering ideas from an early age. At the Uni-versity of Kentucky I took most of the basic Engineering courses while getting a Bachelor s degreein Mathematics. Immediately afterward, I completed a degree in Engineering Mechanics working on my in Mathematics at Georgia Tech I taught all of the introductorymath courses for engineers. During my education, I observed that incorporation of computation incoursework had been extremely unfocused and poor.

3 For instance during my college career I had tolearn 8 different programming and markup languages on 4 different platforms plus numerous othersoftware applications. There was almost no technical help provided in the courses and I wastedinnumerable hours figuring out software on my own. A typical, but useless, inclusion of softwarehas been (and still is in most calculus books) to set up a difficult applied problem and then addthe line write a program to solve or use a computer algebra system to solve .At Ohio University we have tried to take a much more disciplined and focused approach. The RussCollege of Engineering and Technology decided thatMatlabshould be the primary computationalsoftware for undergraduates. At about the same time members of the Department of Mathematicsproposed an 1804 project to bringMatlabinto the calculus sequence and provide access to theprogram at nearly all computers on campus, including in the dorm rooms.

4 The stated goal of thisproject was to makeMatlabthe universal language for computation on campus. That projectwas approved and implemented in the 2001-2002 academic these lecture notes, instruction on usingMatlabis dispersed through the material on numericalmethods. In these lectures details about how to useMatlabare detailed (but not verbose) andexplicit. To teach programming, students are usually given examples of working programs and areasked to make lectures are designed to be used in a computer classroom with students workingMatlabiiiivPREFACE examples during the lecture or with students reading the notes and working the examples after abrief Introduction . At Ohio University we have had good success with this Lecture/Lab lectures are divided into four Parts with a summary provided at the end of each Part.

5 Typicallywe will given an exam covering each of Parts I, II, and III and a comprehensive final exercises grow in complexity as the students build their programming skills. At Ohio Universitywe ask students to complete the exercises in groups of 2-3 students and this accounts for a significantportion of the grade ( 30%.).Todd YoungIntroduction to Numerical Methods .. by Young and Mohlenkamp 2021vDependenciesBelow we give the dependencies between Lectures. Almost everything depends on Lectures 1 4, sothose links are omitted to reduce clutter. Some lectures, marked with * in the table of contents,have not yet been IPart IIPart IIIPart IV1-45-67 Everything inParts II,III,IV8910121311141819-20281516-17212 22426252327333541-423438-3936-3729-32 ContentsPrefaceiiiI Matlab and Solving Equations1 Lecture 1.

6 Vectors, Functions, and Plots inMatlab2 Lecture 3. Newton s Method and Loops10 Lecture 4. Controlling Error and Conditional Statements14 Lecture 5. The Bisection Method and Locating Roots18 Lecture 6. Secant Methods22 Lecture 7. Symbolic Computations25 Review of Part I29II Linear Algebra33 Lecture 8. Matrices and Matrix Operations in Matlab34 Lecture 9. Introduction to Linear Systems39 Lecture 10. Some Facts About Linear Systems43 Lecture 11. Accuracy, Condition Numbers and Pivoting46 Lecture 12. LU Decomposition50 Lecture 13. Nonlinear Systems - Newton s Method53 Lecture 14. Eigenvalues and Eigenvectors57 Lecture 15. Vibrational Modes and Frequencies60 Lecture 16. Numerical Methods for Eigenvalues62 Lecture 17. The QR Method*66viCONTENTSviiLecture 18.

7 Iterative solution of linear systems*68 Review of Part II69 III Functions and Data73 Lecture 19. Polynomial and Spline Interpolation74 Lecture 20. Least Squares Fitting: Noisy Data78 Lecture 21. Integration: Left, Right and Trapezoid Rules82 Lecture 22. Integration: Midpoint and Simpson s Rules87 Lecture 23. Plotting Functions of Two Variables91 Lecture 24. Double Integrals for Rectangles94 Lecture 25. Double Integrals for Non-rectangles98 Lecture 26. Gaussian Quadrature*101 Lecture 27. Numerical Differentiation102 Lecture 28. The Main Sources of Error106 Review of Part III110IV Differential Equations117 Lecture 29. Reduction of Higher Order Equations to Systems118 Lecture 30. Euler Methods122 Lecture 31. Higher Order Methods126 Lecture 32. Multi-step Methods *129 Lecture 33.

8 ODE Boundary Value Problems and Finite Differences130 Lecture 34. Finite Difference Method Nonlinear ODE134 Lecture 35. Parabolic PDEs - Explicit Method137 Lecture 36. Solution Instability for the Explicit Method142 Lecture 37. Implicit Methods145viiiCONTENTSL ecture 38. Insulated Boundary Conditions149 Lecture 39. Finite Difference Method for Elliptic PDEs154 Lecture 40. Convection-Diffusion Equations*157 Lecture 41. Finite Elements158 Lecture 42. Determining Internal Node Values162 Review of Part IV165V Appendices169 Lecture A. Glossary of Matlab Commands170 Part IMatlab and Solving Equations Copyright, Todd Young and Martin Mohlenkamp, Department of Mathematics, Ohio University, 2021 Lecture 1 Vectors, Functions, and Plots inMatlabIn these notes will indicate commands to be entered at theMatlabprompt in the command window.

9 You do not typethe symbol .Entering vectorsInMatlab, the basic objects are matrices, arrays of numbers. Vectors can be thought of as specialmatrices. A row vector is recorded as a 1 nmatrix and a column vector is recorded as am 1 matrix. Toenter a row vector in Matlab , type the following in the command window: v = [0 1 2 3]and press print out the row vector. To enter a column vector type u = [9; 10; 11; 12; 13]You can access an entry in a vector with u(2)and change the value of that entry with u(2)=47 You can extract asliceout of a vector with u(2:4)You can change a row vector into a column vector, and vice versa, easily in Matlab using w = v (This is calledtransposingthe vector and we call the transpose operator.) There are also useful shortcutsto make vectors such as x = -1.

10 1:1 y = linspace (0,1,11)2 Introduction to Numerical Methods .. by Young and Mohlenkamp 20213 Basic FormattingTo makeMatlabput fewer blank lines in its output, enter format compact pi xTo makeMatlabdisplay more digits, enter format long piNote that this does not change the number of digitsMatlabis using in its calculations; it only changeswhat is DataConsider the data in Table can enter this data intoMatlabwith the following commands enteredT (C )520305055 : Viscosity of a liquid as a function of the command window: x = [ 5 20 30 50 55 ] y = [ ]Entering the name of the variable retrieves its current values. For instance x yWe can plot data in the form of vectors using the plot command: plot(x,y)This will produce a graph with the data points connected by lines.


Related search queries