This preview shows page 1. Sign up to view the full content.
Unformatted text preview: Course Organization MASE201 Numerical Methods and Matrix Analysis
Ruth Okamoto January 13, 2009 Pick up a syllabus/notes packet at the front Lectures here every Tuesday 10:00 11:30 (except next week, when we will meet in the
CEC computer lab) Lectures will begin with a short quiz (23 minutes) every two to three weeks Labs in CEC computer lab (Sever 201/202) every Thursday Final exam on May 1, 5:30-7:30 pm
1 1/13/2009 MASE201 Notes 2 1/13/2009 MASE201 Notes Required Text
MATLAB: An Introduction with Applications, 3rd edition
by Amos Gilat John Wiley, 2008, ISBN 978-0-470-10877-2, list price: $70.95 Telesis Telesis will be used heavily in this course View Syllabus/Calendar Download : Lab Handouts Lecture Notes Homework Electronic submission of labs and homework View Gradebook Check the news Make sure you check Telesis regularly
1/13/2009 MASE201 Notes 3 1/13/2009 MASE201 Notes 4 Grading Policies
Component Homework Assignments (5) Value Notes 10% (2% each) Due Fridays at 5 pm before quizzes are given. You may collaborate on homework, but each student must write their own solutions, MATLAB m-files and plots. Late homework accepted until the following Monday at 10 am, with a 20% late penalty. 25% (5% each) Hand-written. Given on Tuesdays during first 30 minutes of class as shown on calendar. Notify instructor in advance if you will miss a quiz. Every week, plus today and Tue 1/2. Notify instructor in advance if you will miss lab. Lowest lab grade will be dropped. Combined written/computer-based exam
MASE201 Notes 5 1/13/2009 Numerical Methods Since ancient times, there has been a need to "compute" Methods to compute quantities such as pi, logarithms, trig functions etc. relied on lengthy hand calculations The development of modern computing after World War II allowed for existing methods to be broadly applied and new methods to be developed
MASE201 Notes 6 In class quizzes (5) In class 45% computer labs (best 15 of 16) Final Exam
1/13/2009 20% Early Developments
1946-1950 Electronic Numerical Integrator and Computer (ENIAC)
(http://ftp.arl.mil/~mike/comphist/96summary/) Scientific Computing Enablers Development of high-level languages such as Fortran Provided libraries of numerical methods (e.g LINpack, EISpack, NAG) Army sponsored project to speed up calculations of how far ordnance should travel used in Army firing and bombing tables The ENIAC, in BRL building 328 ,
http://ftp.arl.army.mil/ftp/historiccomputers/gif/eniac1.gif Hardware developments (solid-state memory, random-access magnetic storage, graphics displays) making computers smaller and less expensive "micro-computing" and UNIX operating system
1/13/2009 MASE201 Notes 8 1/13/2009 MASE201 Notes 7 MATLAB software MATrix LABoratory First released in 1984 Operates on matrices to provide easy, interactive access to algorithms in: LINpack (a collection of Fortran subroutines that analyze and solve linear equations and linear least-squares problems) EISpack (eigenvalue solver) Caution!
"A little learning is a dangerous thing; drink deep, or taste not the Pierian spring: there shallow draughts intoxicate the brain, and drinking largely sobers us again."
Alexander Pope (1688 - 1744) in An Essay on Criticism, 1709 Now uses algorithms in: LAPACK (Linear Algebra) BLAS (Basic Linear Algebra Subprograms)
1/13/2009 MASE201 Notes 9 More recently, with regard to computer programs: "Garbage In, Garbage Out" if the input data is bad, the answers will be bad as well Or even more recently, "Garbage In, Gospel Out" answers from computers must be right?
1/13/2009 MASE201 Notes 10 Problem Solving
Physical Problem Problems with Problem Solving
Physical Problem Engineering Science Courses Am I solving the right problem? Does my model describe the problem well? Did I derive the equation(s) correctly? Can my method find the solution(s)? Is my solution accurate enough? Model Model Equation http://www.adventureconsultants.co.nz/content/images/422/400x400nor mal/South_Pole.jpg Eng'g Math / Numerical Methods Solution Solution Method Solution Method? F = mg cos + sin Equation Solution Did I solve the problem?
11 1/13/2009 MASE201 Notes 12 1/13/2009 MASE201 Notes MASE 201 Objectives Learn a variety of numerical methods and their application for solving engineering problems Learn programming skills using the MATLAB environment to implement these methods Develop an appreciation for these methods AND an understanding of their limitations
1/13/2009 MASE201 Notes 13 Example
g For a given applied F, coefficient of friction , and mass m, find at which the block will start to move Solution method: Guess Calculate F using equation Compare to applied F Adjust to reduce error between calculated and applied F The sliding block
F= mg cos + sin Requires repeated calculation of cos and sin functions
MASE201 Notes 14 1/13/2009 Problem Solution Method?
F= Problem Approach (cont'd) We can plot solution at specific values of The shape of the F- curve changes for each value of There may be 0, 1, or 2 solutions for depending upon the ratio F/(mg) and F= mg cos + sin mg cos + sin What's a good starting guess for ? Divide F by mg Consider limiting cases: = 0 or 90 deg F = = m g cos + sin = 0o
= = 1 cos + sin = 90o
MASE201 Notes 15 1/13/2009 1/13/2009 MASE201 Notes 16 How do we find those solutions?
Bisection method Implementing the algorithm
Implement using hand calculations? using Excel? using MATLAB? using Java? We need an algorithm (or procedure) to find the zero of a non-linear function f()
f ( ) = Fapp - mg cos + sin The numerical method algorithm is separate from the method implementation, BUT some algorithms are better suited to certain implementations than others
17 1/13/2009 MASE201 Notes 18 Good enough?
1/13/2009 MASE201 Notes What is good enough? So how do we know when our estimate for (we'll call it NS) is good enough?
| f( NS) f() | < tolerance Where do numerical errors come from? Two types of error: Round-off error Due to calculating with limited digits 10.01 9.99 = 0.02 10.0 10.0 = 0 We have to choose a tolerance If I chose a tolerance of zero, would I be able to get an exact solution? NO! Numerical solutions have errors
1/13/2009 MASE201 Notes 19 Truncation error Due to approximations in mathematical procedures Function approximated by terms in an infinite series, e.g. a Taylor series expansion: sin(x) = x - x3/3! + x5/5! -x7/7! + ...
1/13/2009 MASE201 Notes 20 Floating Point Numbers Round-off error depends upon the implementation Modern computers do calculations with "floating point numbers" according to the IEEE-754 standard All numbers are stored in binary format Each number is allocated a certain number of bits (64 for "double" precision) 1.bbbbb x 2bbb ; (bbb are binary digits) 50 = 1.5625 x 25 = 1.1001 x 2101 What's the smallest FP number
+/- 1.0 x 2-1022 = +/- 2.225073858507201e-308 Largest:
+/- (2 2-52) x 21024 = +/- 1.797693134862112e+308 Thus double precision is generally more than sufficient for our calculations 1/13/2009 MASE201 Notes 21 1/13/2009 MASE201 Notes 22 Getting started with MATLAB When you arrive Login to CEC computer Start web browser Go to Telesis https://telesis.wustl.edu and find our course Download Lab 1 from Files/Shared_files/Handouts Off we go to the computer lab (Sever 201/202) 1/13/2009 MASE201 Notes 23 1/13/2009 MASE201 Notes 24 ...
View Full Document
This document was uploaded on 05/05/2010.
- Spring '10