Lecture 1 Introduction Slide Credit Dr. S. M. Lutful Kabir, Visiting Professor, BRAC University & Professor, BUET CSE 330: Numerical Methods.

Slides:



Advertisements
Similar presentations
3- 1 Chapter 3 Introduction to Numerical Methods Second-order polynomial equation: analytical solution (closed-form solution): For many types of problems,
Advertisements

Lecture 5 Newton-Raphson Method
Roundoff and truncation errors
2009 Spring Errors & Source of Errors SpringBIL108E Errors in Computing Several causes for malfunction in computer systems. –Hardware fails –Critical.
CSE 330: Numerical Methods
Algebraic, transcendental (i.e., involving trigonometric and exponential functions), ordinary differential equations, or partial differential equations...
Numerical Analysis 1 EE, NCKU Tien-Hao Chang (Darby Chang)
CSE 330: Numerical Methods
MATH 685/ CSI 700/ OR 682 Lecture Notes
ECIV 201 Computational Methods for Civil Engineers Richard P. Ray, Ph.D., P.E. Error Analysis.
Chapter 4 Roots of Equations
Approximations and Errors
Chapter 1 Introduction The solutions of engineering problems can be obtained using analytical methods or numerical methods. Analytical differentiation.
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.
Ch. 3.1 – Measurements and Their Uncertainty
CISE-301: Numerical Methods Topic 1: Introduction to Numerical Methods and Taylor Series Lectures 1-4: KFUPM.
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
Computer Engineering Majors Authors: Autar Kaw
9/7/ Gauss-Siedel Method Chemical Engineering Majors Authors: Autar Kaw Transforming.
Numerical Computations in Linear Algebra. Mathematically posed problems that are to be solved, or whose solution is to be confirmed on a digital computer.
Interpolation. Interpolation is important concept in numerical analysis. Quite often functions may not be available explicitly but only the values of.
Chapter 3 Scientific Measurement 3.1 Using and Expressing Measurements
MMJ 1113 Computational Methods for Engineers Mohsin Mohd Sies Fakulti Kejuruteraan Mekanikal, Universiti Teknologi Malaysia.
CISE-301: Numerical Methods Topic 1: Introduction to Numerical Methods and Taylor Series Lectures 1-4: KFUPM CISE301_Topic1.
Accuracy, Precision, and Error
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.
Measurement and Its Uncertainties.
ME 142 Engineering Computation I Computer Precision & Round-Off Error.
10/16/20151 Sources of Error Major: All Engineering Majors Authors: Autar Kaw, Luke Snyder Transforming Numerical Methods.
LECTURER PROF.Dr. DEMIR BAYKA AUTOMOTIVE ENGINEERING LABORATORY I.
Integrals  In Chapter 2, we used the tangent and velocity problems to introduce the derivative—the central idea in differential calculus.  In much the.
MECN 3500 Inter - Bayamon Lecture 3 Numerical Methods for Engineering MECN 3500 Professor: Dr. Omar E. Meza Castillo
Major objective of this course is: Design and analysis of modern algorithms Different variants Accuracy Efficiency Comparing efficiencies Motivation thinking.
10/26/ Gauss-Siedel Method Civil Engineering Majors Authors: Autar Kaw Transforming.
In section 11.9, we were able to find power series representations for a certain restricted class of functions. Here, we investigate more general problems.
Numerical Methods for Engineering MECN 3500
Numerical Methods.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Chapter 3.
Meeting 15 Introduction to Numerical Methods Error Analysis.
Scientific Measurement Measurements and their Uncertainty Dr. Yager Chapter 3.1.
Numerical Analysis CC413 Propagation of Errors.
Advanced Engineering Mathematics, 7 th Edition Peter V. O’Neil © 2012 Cengage Learning Engineering. All Rights Reserved. CHAPTER 4 Series Solutions.
Lecture 6 - Single Variable Problems & Systems of Equations CVEN 302 June 14, 2002.
Understanding the difference between an engineer and a scientist There are many similarities and differences.
Errors in Numerical Methods
3/6/ Gauss-Siedel Method Major: All Engineering Majors Author: دکتر ابوالفضل رنجبر نوعی
Numerical Analysis CC413 Propagation of Errors. 2 In numerical methods, the calculations are not made with exact numbers. How do these inaccuracies propagate.
Lecture 1 Introduction Dr. Hakikur Rahman Thanks to Dr. S. M. Lutful Kabir for Slides CSE 330: Numerical Methods.
3.1 Using and Expressing Measurements > 1 Copyright © Pearson Education, Inc., or its affiliates. All Rights Reserved. Chapter 3 Scientific Measurement.
1 Approximations and Round-Off Errors Lecture Notes Dr. Rakhmad Arief Siregar Universiti Malaysia Perlis Applied Numerical Method for Engineers Chapter.
CSE 330: Numerical Methods. What is true error? True error is the difference between the true value (also called the exact value) and the approximate.
Numerical Methods and Optimization C o u r s e 1 By Bharat R Chaudhari.
1 M 277 (60 h) Mathematics for Computer Sciences Bibliography  Discrete Mathematics and its applications, Kenneth H. Rosen  Numerical Analysis, Richard.
NUMERICAL ANALYSIS I. Introduction Numerical analysis is concerned with the process by which mathematical problems are solved by the operations.
Gauss-Siedel Method.
Chapter 2 ERROR ANALYSIS
Autar Kaw Benjamin Rigsby
Objective of This Course
Sources of Error Major: All Engineering Majors
Sources of Error Major: All Engineering Majors
Numerical Analysis Lecture 2.
Sources of Error Major: All Engineering Majors
Chapter 1 / Error in Numerical Method
Sources of Error Major: All Engineering Majors
CISE-301: Numerical Methods Topic 1: Introduction to Numerical Methods and Taylor Series Lectures 1-4: KFUPM CISE301_Topic1.
Presentation transcript:

Lecture 1 Introduction Slide Credit Dr. S. M. Lutful Kabir, Visiting Professor, BRAC University & Professor, BUET CSE 330: Numerical Methods

Introduction Some mathemetical equations may be solved analytically But a lot of them need to be solved approximately using numerical methods. Indispensable in solving real life mathematical and engineering problems Great mathematicians like Gauss, Newton, Langrange, Fourier and many others in the eighteen and nineteeth centuries developed numerical techniques which are still used The advent of computers has facilitated numerical computations 2

Different forms of mathematical equations 3 Mathematical Equations Transcendental Equations Differential Equations Integral Equations Algebric Equations Polynomial Equations Linear Nonlinear Continuous Piecewise Trigonometric Exponential Logarithmic Ordinary Partial Definite Indefinite

What is numerical computing? An approach for solving complex mathematical problems using only simple arithmatic operations Involves formulation of mathematical models of physical situations It requires development, analysis and use of algorithms Its efficiency may be measured by the number of steps in the algoritm, the computer time, and the amount of memory required 4

Advantage of Numerical Methods A numerical value can be obtained even when the problem has no “analytical” solution The mathematical operations required are essentially addition, subtraction, multiplication, division, and comparisons It is important to realize that solution by numerical analysis is always a number Analytical methods, on the other hand, usually give a result in terms of mathematical functions that can then be evaluated for specific instances 5

Scope of Numerical Analysis Finding roots of equations Solving systems of linear algebraic equations Interpolation and regression analysis Numerical differentiation Numerical Integration Solution of ordinary differential equations Boundary value problems Solution of matrix problem 6

Steps of Solving a Practical Problem Step #1: State the problem clearly, including any simplifying assumptions. Step #2: Develop a mathematical statement of the problem in a form that can be solved for a numerical answer. This process may involve the use of calculus. Other mathematical procedures may be employed. When this statement is a differential equation, appropiate initial conditions and/or boundary conditions must be specified. 7

Steps of Solving a Practical Problem Step #3: Solve the equations obtained from step #2 Sometimes the method will be algebraic But frequently more advanced methods will be needed The result of this step is a numerical answer or set of answers Step #4: Interpret the numerical result to arrive at a decision This will require experience and understanding of the situation in which the problem is embedded 8

Numerical Computing Process 9 Physical Problem Validity Wrong Solution Improve algorithm Application Implementation Numerical Method Mathematical Model Mathematical Concepts Computer & Software Correct Change Method Modify Model

Accuracy in Numerical Analysis Numerical analysis is an approximation, but results can be made as accurately as desired. Errors come in a variety of forms and sizes; some are avoidable and some are not. For example, data conversion and roundoff errors can not be avoided, but human errors can be eliminated. Although certain errors can not be eliminated completely, we must at least know the bounds of these errors. It is therefore essential to know how errors arise, how they grow and how they affect the accuracy of a solution. 10

Taxonomy of errors 11 Total error Modelling errors Inherent errors Numerical errors Blunders Data error Conversion error Roundoff error Truncation error Missing Information Human Imperfection Measuring method Computing machine Numerical method

Modelling errors In many situations it is impractical to model each of the components accurately and so certain simplifying assumptions are made. For example, while developing a model for calculaing the force acting on a falling body, we may not be able to estimate the air resistance coefficient (drag coefficient) properly or determine the direction and magnitude of wind force acting on the body and so on. Since the model is the basic input to the numerical process, no numerical method will provide adequate results if the model is erroneously conceived and formulated. 12

Inherent errors Inherent error (also known as input error) contain two components, namely, data errors and conversion errors Data error Data error (also known as empirical error) arises when data for a problem are obtained by some experimental means and are, therefore, of limited accuracy and precision Conversion error Conversion error (also known as representational error) arise due to the limitations of the computer to store the data exactly 13

Numerical Errors Numerical errors (also known as procedural error) are introduced during the implementation of a numerical method Roundoff error Roundoff errors occur when a fixed number of digits are used to represent exact numbers will be rounded off 2 decimal digits as Truncation error Truncation error arises from using an approximation in place of an exact mathematical procedure Typically it is the error resulting from the truncation of numerical processes We often use finite number of terms to estimate the sum of infinite series 14

Blunders Blunders are the errors that are caused due to human imperfection Some common types are: Lack of understanding of the problem Wrong assumptions Overlooking some basic assumptions required for formulating the model Error in deriving the mathematical equation or using a model that does not describe adequately the physical system under study Selecting a wrong numerical method for solving the mathematical model Selecting a wrong algorithm for implementing the numerical method Making mistakes in the computer program Mistake in data input Wrongly guessing the initial value 15

Significant Digits The following statement describe the notion of significant digits All non-zero digits are significant All zeros occurring between non-zero digits are significant digits Trailing zeros following a decimal point are significant. For example, 3.50, 65.0 and have three significant digits Zeros between the decimal point and preceeding a non-zero digit are not significant. For example, the following numbers have four significant digits (1234X10 -7 ) (1234X10 -6 ) (1234X10 -5 ) Without the decimal point, trailing zeros are often not considered significan, thus 5600 (56X10 2 ) has two significant digits 16

Example has three significant digits has four significant digits 4008 has four significant digits has five significant digits 1.079X10 3 has four significant digits X10 3 has five significant digits X10 3 has six significant digits So, how do we differentiate the number of digits correct in 1,000,000 and 1,079,587? Well for that, one may use scientific notation. 1,000,000= 1X10 6 ; 1 significant digit 1,079,587= X10 6 ; 7 significant digits 17

Relation between accuracy and precision Accuracy refers to the number of significant digits in a value. For example, the number is accurate to five significant digits Precision refers to the number of decimal positions, i.e., the order of magnitude of the last digit in a value. The number has a precission of or

An example of a problem created by round off errors Twenty-eight Americans were killed on February 25, An Iraqi Scud hit the Army barracks in Dhahran, Saudi Arabia. The patriot defense system had failed to track and intercept the Scud. The Patriot defense system consists of an electronic detection device called the range gate. It calculates the area in the air space where it should look for a Scud. To find out where it should aim next, it calculates the velocity of the Scud and the last time the radar detected the Scud. 19

The cause for this failure Time is saved in a register of length 24 bits. Since the internal clock of the system is measured every one-tenth of a second, 1/10 is expressed in a 24 bit-register as However, this is not an exact representation. In fact, it would need an infinite numbers of bits to represent 1/10 exactly. This caused a error in calculation and the defence system did not work Details at 20

What is true error? True error is the difference between the true value (also called the exact value) and the approximate value. True Error = True value – Approximate value Example 1 The derivative of a function at a particular value h can be approximately calculated by For and h=0.3, find at x=2 a) the approximate value of f’(x) b) the true value of f’(x) using calculus c) the true error 21

True error for the example The approximate value is obtained from the previous equation as The true value can be obtainted from the derivative of the function The true value from the above equation is True error = True value – Approximate value =

Magnitude of the true error The magnitude of true error does not show how bad the error is. A true error may seem to be small, but if the function given in the Example 1 were the true error in calculating f’(2) with h=0.3 would be X10 -6 This value of true error is smaller, even when the two problems are similar in that they use the same value of the function argument, x=2 and the step size, h=0.3 This brings us to the definition of relative true error. 23

Relative True Error Relative true error is denoted by and is defined as the ratio between the true error and the true value. True Error Relative True Error, = True value In both the case, the relative true error is % 24

What is approximate error? In the previous section, we discussed how to calculate true errors Such errors can be calculated only when true values are known. For instance when one is checking if a program is correct and you know some cases where the true value is known. But mostly we do not have the luxury of knowing true values We usually only have access to approximate values. We need to know how to quantify error for such cases. 25

Definition of Approximate Error Approximate error is defined as the difference between the present approximation and previous approximation. Approximate Error= Present Approximation – Previous Approximation Relative approximate error is defined as the ratio between the approximate error and the present approximation In the previous exmple if we find the value of the derivative of the function at h=0.3 and h=0.15, the values and respectively So the relative approximate error in percentage is % 26

Use relative approximate errors to minimize the error In a numerical method that uses iterative process, a user can calculate relative approximate error at the end of each iteration The user may pre-specify a minimum acceptable tolerance called the pre-specified tolerance If the absolute relative approximate error is less than or equal to the pre-specified tolerance, then the acceptable error has been reached and no more iterations are required 27

# Lecture 1: Introduction # Lecture 2: Finding Root-Bisection Method # Lecture 3: Finding Root-Newton’s Method # Lecture 4: CT-1 & Finding Root-Secant and False Position Method # Lecture 5: Practice on L-2, L-3 & L-4 # Lecture 6: Interpolation-Direct and Langrange’s Method # Lecture 7: Interpolation-Newton’s Divided Difference Method # Lecture 8: CT-2 & Interpolation-Spline Method # Lecture 9: Regression Analysis # Lecture 10: Practice on L-6, L-7, L-8 & L-9 28 # Lecture 11: Mid Term Examination + SSLE- Gaussian Elimination # Lecture 12: SSLE- Gauss Seidel Method & LU decomposition # Lecture 13: CT-3 & Practice on L-11 & L-12 # Lecture 14: Numerical Differentiation # Lecture 15: Numerical Integration-1 # Lecture 16: CT-4& Numerical Integration-2 # Lecture 17: Practice on L-14, L-15 & L-16 # Lecture 18: Ordinary Differential Equation-1 # Lecture 19: Ordinary Differential Equation-2 # Lecture 20: Practice on L-18 & L-19 CT stands for Class Test The Lecture Presentations will be available in TSR under \\tsr\SUMMER\CSE\HAL\CSE 330

Reference Numerical Methods with Applications: 29