CSE 3802 / ECE 3431 Numerical Methods in Scientific Computation Jinbo Bi Department of Computer Science & Engineering http://www.engr.uconn.edu/~jinbo 1 The Instructor • Ph.D in Mathematics • Previous professional experience: – Siemens Medical Solutions Inc. – Department of Defense, Bioanalysis • Research interests: biomedical informatics, machine learning, data mining, optimization, mathematical programming, • Apply machine learning techniques in biological data, medical image analysis, patient health records analysis • Homepage is at http://www.engr.uconn.edu/~jinbo 2 Class Meetings • • • Numerical Methods, Lecture 1 Lectures are Tuesday and Thursday, 12:30 –1:45 pm No specific lab time, but significant computer time expected. Computers are available in ITEB C25 and C27. 3 Prof. Jinbo Bi CSE, UConn Class Assignments • • • Homework will be assigned once every week or two and due usually the following week. You may collaborate on the homework, but your submissions should be your own work. Grading: • • • Numerical Methods Lecture 1 Homework Exam 1 and 2 Final Exam 30% 40% 30% 4 Prof. Jinbo Bi CSE, UConn Mathematical Background • MATH 2110Q Multivariate Calculus • Taylor series • MATH 2410Q Introduction to Differential Equations • Integration • MATH 2210 Linear Algebra • Equation systems Numerical Methods, Lecture 1 5 Prof. Jinbo Bi CSE, UConn Computer Background • Languages to be used: • • • Numerical Methods, Lecture 1 Matlab, C, C++ CSE 1100/1010 programming experience Any OS is acceptable 6 Prof. Jinbo Bi CSE, UConn Syllabus • Go over the course syllabus • Course website http://www.engr.uconn.edu/~jinbo/Fall2013_ Numerical_Methods.htm Numerical Methods, Lecture 1 7 Prof. Jinbo Bi CSE, UConn Today’s Class: • • • Numerical Methods, Lecture 1 Introduction to numerical methods Basic content of course and class expectations Mathematical modeling 8 Prof. Jinbo Bi CSE, UConn Introduction • What are numerical methods? • • What type of mathematical problems? • Numerical Methods, Lecture 1 “… techniques by which mathematical problems are formulated so that they can be solved with arithmetic operations.” (Chopra and Canale) Roots, Integration, Optimization, Curve Fitting, Differential Equations, and Linear Systems 9 Prof. Jinbo Bi CSE, UConn Introduction • • • How do you solve these difficult mathematical problems? Example: What are the roots of x27x+12? Three general non-computer methods • • • Numerical Methods, Lecture 1 Analytical Graphical Manual 10 Prof. Jinbo Bi CSE, UConn Analytical Solutions • • • This is what you learned in math class Gives exact solutions Example: x 2 7 x 12 ( x 3)( x 4 ) • • • Numerical Methods, Lecture 1 Roots at 3 and 4 Not always possible for all problems and usually restricted to simple problems with few variables or axes The real world is more complex than the simple problems in math class 11 Prof. Jinbo Bi CSE, UConn Graphical Solution Numerical Methods, Lecture 1 12 Prof. Jinbo Bi CSE, UConn Manual Solution • • • Numerical Methods, Lecture 1 Using pen and paper, slide rulers, etc. to solve an engineering problem Very time consuming Error-prone 13 Prof. Jinbo Bi CSE, UConn Numerical Methods • What are numerical methods? • • • Numerical Methods, Lecture 1 “… techniques by which mathematical problems are formulated so that they can be solved with arithmetic operations.” (Chopra and Canale) Arithmetic operations map into computer arithmetic instructions Numerical methods allow us to formulate mathematical problems so they can be solved numerically (e.g., by computer) 14 Prof. Jinbo Bi CSE, UConn Course Overview • What is this course about? • • Numerical Methods, Lecture 1 Using numerical methods to solve mathematical problems that arise in engineering Most of the focus will be on engineering problems 15 Prof. Jinbo Bi CSE, UConn Basic Materials • Introduction • • • • Mathematical Problems • Numerical Methods, Lecture 1 Programming Mathematical Modeling Error Analysis Roots, Linear Systems, Integration, Optimization, Curve Fitting, Differential Equations 16 Prof. Jinbo Bi CSE, UConn Mathematical Modeling A mathematical model is the formulation of a physical or engineering system in mathematical terms. • • Numerical Methods, Lecture 1 Empirical Theoretical 17 Prof. Jinbo Bi CSE, UConn Mathematical Modeling • A mathematical model is represented as a functional relationship of the form Dependent Variable =f independent forcing variables, parameters, functions • Dependent variable: Characteristic that usually reflects the state of the system • Independent variables: Dimensions such as time and space along which the systems behavior is being determined • Parameters: reflect the system’s properties or composition • Forcing functions: external influences acting upon the system Numerical Methods, Lecture 1 18 Prof. Jinbo Bi CSE, UConn Mathematical Modeling A simple example: • In an electrical circuit, I = V/R; The current, I, is dependent on resistance parameter, R, and forcing voltage function, V. Numerical Methods, Lecture 1 19 Prof. Jinbo Bi CSE, UConn Example 1 • Newton’s 2nd low of Motion states that “the time rate change of momentum of a body is equal to the resulting force acting on it.” • The model is formulated as F=ma F=net force acting on the body (N) m=mass of the object (kg) a=its acceleration (m/s2) Numerical Methods, Lecture 1 20 Prof. Jinbo Bi CSE, UConn Example 1 • What is the velocity of a falling object? • • First step is to model the system Newton’s second law F ma a F m • dv dt F m Total force is gravity and air resistance F FGravity F Air mg cv Numerical Methods, Lecture 1 21 Prof. Jinbo Bi CSE, UConn Example 1 dv dt • • F m mg cv m g c v m First order differential equation Analytical solution v (t ) gm c t m (1 e ) c Numerical Methods, Lecture 1 22 Prof. Jinbo Bi CSE, UConn Example 1 • Numerical Methods, Lecture 1 m=68.1kg, c=12.5 kg/s 23 Prof. Jinbo Bi CSE, UConn Example 1 • • • Numerical Methods, Lecture 1 What if we can’t find an analytical solution? How do you get a computer to solve the differential equation? Use numerical methods 24 Prof. Jinbo Bi CSE, UConn Euler’s Method • Use the finite divided difference approximation of the derivative dv dt • Numerical Methods, Lecture 1 v ( t i 1 ) v ( t i ) t i 1 t i The approximation becomes exact as Δt →0 25 Prof. Jinbo Bi CSE, UConn Euler’s Method • Using Euler’s method, we can approximate the velocity curve dv dt v ( t i 1 ) v ( t i ) t i 1 t i m v ( t i 1 ) v ( t i ) ( t i 1 Numerical Methods, Lecture 1 g c 26 v (ti ) c ti ) g v (ti ) m Prof. Jinbo Bi CSE, UConn Euler’s Method • Assume Δt=2 v (0) 0 c v ( 2 ) v ( 0 ) 2 g v ( 0 ) 19 . 6 m c v ( 4) v (2 ) 2 g v ( 2 ) 32 . 0 m …… Numerical Methods, Lecture 1 27 Prof. Jinbo Bi CSE, UConn Euler’s method Numerical Methods, Lecture 1 28 Prof. Jinbo Bi CSE, UConn Euler’s Method • • • • • Numerical Methods, Lecture 1 Avoids solving differential equation Not an exact formula of the function Gets more exact as Δt→0 How do we choose Δt? Dependent on the tolerance of error. How do we estimate the error? 29 Prof. Jinbo Bi CSE, UConn Overview of the problems Numerical Methods, Lecture 1 30 Prof. Jinbo Bi CSE, UConn Overview of the problems Numerical Methods, Lecture 1 31 Prof. Jinbo Bi CSE, UConn Next class • • Numerical Methods, Lecture 1 Programming and Software Read Chapters 1 & 2 32 Prof. Jinbo Bi CSE, UConn

Descargar
# Slide 1