MATH 685/CSI 700 Lecture Notes Lecture 1. Intro to Scientific Computing.

Slides:



Advertisements
Similar presentations
Roundoff and truncation errors
Advertisements

2009 Spring Errors & Source of Errors SpringBIL108E Errors in Computing Several causes for malfunction in computer systems. –Hardware fails –Critical.
Numerical Analysis 1 EE, NCKU Tien-Hao Chang (Darby Chang)
CS 351/ IT 351 Modeling and Simulation Technologies Errors In Models Dr. Jim Holten.
MATH 685/ CSI 700/ OR 682 Lecture Notes
Asymptotic error expansion Example 1: Numerical differentiation –Truncation error via Taylor expansion.
Engineering Computation
Introduction to Scientific Computing ICE / ICE 508 Prof. Hyuckjae Lee KAIST- ICC
ECIV 201 Computational Methods for Civil Engineers Richard P. Ray, Ph.D., P.E. Error Analysis.
Approximations and Errors
Round-Off and Truncation Errors
1 Part 3 Truncation Errors (Supplement). 2 Error Propagation How errors in numbers can propagate through mathematical functions? That is, what's the effect.
Lecture 2: Numerical Differentiation. Derivative as a gradient
The Islamic University of Gaza Faculty of Engineering Civil Engineering Department Numerical Analysis ECIV 3306 Chapter 3 Approximations and Errors.
1 Error Analysis Part 1 The Basics. 2 Key Concepts Analytical vs. numerical Methods Representation of floating-point numbers Concept of significant digits.
CISE-301: Numerical Methods Topic 1: Introduction to Numerical Methods and Taylor Series Lectures 1-4: KFUPM.
Scientific Computing Algorithm Convergence and Root Finding Methods.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. by Lale Yurttas, Texas A&M University Chapter 31.
Ch 8.1 Numerical Methods: The Euler or Tangent Line Method
Introduction and Analysis of Error Pertemuan 1
Numerical Computations in Linear Algebra. Mathematically posed problems that are to be solved, or whose solution is to be confirmed on a digital computer.
Information Representation (Level ISA3) Floating point numbers.
Chapter 1 Scientific Computing Approximation in Scientific Computing (1.2) January 12, 2010.
MMJ 1113 Computational Methods for Engineers Mohsin Mohd Sies Fakulti Kejuruteraan Mekanikal, Universiti Teknologi Malaysia.
Lecture 2 Number Representation and accuracy
CISE-301: Numerical Methods Topic 1: Introduction to Numerical Methods and Taylor Series Lectures 1-4: KFUPM CISE301_Topic1.
CISE301_Topic11 CISE-301: Numerical Methods Topic 1: Introduction to Numerical Methods and Taylor Series Lectures 1-4:
EE 3561_Unit_1(c)Al-Dhaifallah EE 3561 : - Computational Methods in Electrical Engineering Unit 1: Introduction to Computational Methods and Taylor.
ENGR Introduction to Engineering1 ENGR 107 – Introduction to Engineering Estimation, Accuracy and Precision, and Significant Figures (Lecture #3)
Data Representation in Computer Systems
ME 142 Engineering Computation I Computer Precision & Round-Off Error.
Computational Physics Introduction 3/30/11. Goals  Calculate solutions to physics problems  All physics problems can be formulated mathematically. 
Round-off Errors.
Villanova University Dept. of Civil & Environmental Engineering CEE 3704 Statistical and Numerical Analysis 1 CEE 3704 Statistical and Numerical Analysis.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. by Lale Yurttas, Texas A&M University 1 Chapter 1 Mathematical.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Chapter.
NUMERICAL ERROR Student Notes ENGR 351 Numerical Methods for Engineers Southern Illinois University Carbondale College of Engineering Dr. L.R. Chevalier.
Floating Point Arithmetic
MECN 3500 Inter - Bayamon Lecture 3 Numerical Methods for Engineering MECN 3500 Professor: Dr. Omar E. Meza Castillo
Engineering Analysis ENG 3420 Fall 2009 Dan C. Marinescu Office: HEC 439 B Office hours: Tu-Th 11:00-12:00.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Chapter 3.
Sensitivity derivatives Can obtain sensitivity derivatives of structural response at several levels Finite difference sensitivity (section 7.1) Analytical.
Numerical Analysis Intro to Scientific Computing.
Lecture 4 - Numerical Errors CVEN 302 June 10, 2002.
Numerical Analysis CC413 Propagation of Errors.
Numerical Analysis – Differential Equation
Numerical Analysis. Numerical Analysis or Scientific Computing Concerned with design and analysis of algorithms for solving mathematical problems that.
Errors in Numerical Methods
Numerical Analysis Intro to Scientific Computing.
Numerical Analysis CC413 Propagation of Errors. 2 In numerical methods, the calculations are not made with exact numbers. How do these inaccuracies propagate.
1 Approximations and Round-Off Errors Lecture Notes Dr. Rakhmad Arief Siregar Universiti Malaysia Perlis Applied Numerical Method for Engineers Chapter.
Cosc 2150: Computer Organization Chapter 9, Part 3 Floating point numbers.
Chapter 2 Errors in Numerical Methods and Their Impacts.
NUMERICAL ANALYSIS I. Introduction Numerical analysis is concerned with the process by which mathematical problems are solved by the operations.
Introduction to Numerical Analysis I
Machine arithmetic and associated errors Introduction to error analysis Class II.
ME 142 Engineering Computation I
Chapter 2 ERROR ANALYSIS
Recall our hypothetical computer Marc-32
Errors in Numerical Methods
Class Notes 18: Numerical Methods (1/2)
Roundoff and Truncation Errors
Errors in Numerical Methods
Approximations and Round-Off Errors Chapter 3
SKTN 2393 Numerical Methods for Nuclear Engineers
Roundoff and Truncation Errors
Errors and Error Analysis Lecture 2
CISE-301: Numerical Methods Topic 1: Introduction to Numerical Methods and Taylor Series Lectures 1-4: KFUPM CISE301_Topic1.
Numerical Modeling Ramaz Botchorishvili
Presentation transcript:

MATH 685/CSI 700 Lecture Notes Lecture 1. Intro to Scientific Computing

Useful info Course website: MATLAB instructions: Mathworks, the creator of MATLAB: OCTAVE = free MATLAB clone Available for download at

Scientific computing Design and analysis of algorithms for numerically solving mathematical problems in science and engineering Deals with continuous quantities vs. discrete (as, say, computer science) Considers the effect of approximations and performs error analysis Is ubiquitous in modern simulations and algorithms modeling natural phenomena and in engineering applications Closely related to numerical analysis

Develop mathematical model (usually requires a combination of math skills and some a priori knowledge of the system) Come up with numerical algorithm (numerical analysis skills) Implement the algorithm (software skills) Run, debug, test the software Visualize the results Interpret and validate the results Computational problems: attack strategy Mathematical modeling

Computational problems: well-posedness The problem is well-posed, if (a) solution exists (b) it is unique (c) it depends continuously on problem data The problem can be well-posed, but still sensitive to perturbations. The algorithm should attempt to simplify the problem, but not make sensitivity worse than it already is. Simplification strategies: Infinite finite Nonlinear linear High-order low-order Only approximate solution can be obtained this way!

Sources of numerical errors Before computation modeling approximations empirical measurements, human errors previous computations During computation truncation or discretization Rounding errors Accuracy depends on both, but we can only control the second part Uncertainty in input may be amplified by problem Perturbations during computation may be amplified by algorithm Abs_error = approx_value – true_value Rel_error = abs_error/true_value Approx_value = (true_value)x(1+rel_error) Can be controlled through error analysis Cannot be controlled

Sources of numerical errors Propagated vs. computational error x = exact value, y = approx. value F = exact function, G = its approximation G(y) – F(x) = [G(y) - F(y)] + [F(y) - F(x)] Rounding vs. truncation error Rounding error: introduced by finite precision calculations in the computer arithmetic Truncation error: introduced by algorithm via problem simplification, e.g. series truncation, iterative process truncation etc. Total error = Computational error: affected by algorithm Propagated data error: not affected by algorithm + Computational error = Truncation error + rounding error

Backward vs. forward errors

Backward error analysis How much must original problem change to give result actually obtained? How much data error in input would explain all error in computed result? Approximate solution is good if it is the exact solution to a nearby problem Backward error is often easier to estimate than forward error

Backward vs. forward errors

Conditioning Well-conditioned (insensitive) problem: small relative change in input gives commensurate relative change in the solution Ill-conditioned (sensitive): relative change in output is much larger than that in the input data Condition number = measure of sensitivity Condition number = |rel. forward error| / |rel. backward error| = amplification factor

Conditioning

Stability Algorithm is stable if result produced is relatively insensitive to perturbations during computation Stability of algorithms is analogous to conditioning of problems From point of view of backward error analysis, algorithm is stable if result produced is exact solution to nearby problem For stable algorithm, effect of computational error is no worse than effect of small data error in input

Accuracy Accuracy : closeness of computed solution to true solution of problem Stability alone does not guarantee accurate results Accuracy depends on conditioning of problem as well as stability of algorithm Inaccuracy can result from applying stable algorithm to ill-conditioned problem or unstable algorithm to well-conditioned problem Applying stable algorithm to well-conditioned problem yields accurate solution

Floating point representation

Floating point systems

Normalized representation Not all numbers can be represented this way, those that can are called machine numbers

Rounding rules If real number x is not exactly representable, then it is approximated by “nearby” floating-point number fl(x) This process is called rounding, and error introduced is called rounding error Two commonly used rounding rules chop: truncate base- expansion of x after (p − 1)st digit; also called round toward zero round to nearest : fl(x) is nearest floating-point number to x, using floating- point number whose last stored digit is even in case of tie; also called round to even Round to nearest is most accurate, and is default rounding rule in IEEE systems

Floating point arithmetic

Machine precision

Floating point operations

Summing series in floating- point arithmetic

Loss of significance