1 Approximation. 2 Taylor Series 3 Truncation Error  In general, the nth order Taylor series expansion will be exact for an nth order polynomial  In.

Slides:



Advertisements
Similar presentations
Truncation Errors and Taylor Series
Advertisements

Part 1 Chapter 4 Roundoff and Truncation Errors PowerPoints organized by Dr. Michael R. Gustafson II, Duke University All images copyright © The McGraw-Hill.
3- 1 Chapter 3 Introduction to Numerical Methods Second-order polynomial equation: analytical solution (closed-form solution): For many types of problems,
Roundoff and truncation errors
What is Rounding Error? AiS Challenge STI 2003 Richard Allen.
1 Chapter 1 Introductory Concepts and Calculus Review.
Numerical Computation
High Accuracy Differentiation Formulas
CE33500 – Computational Methods in Civil Engineering Differentiation Provided by : Shahab Afshari
Engineering Computation
ECIV 201 Computational Methods for Civil Engineers Richard P. Ray, Ph.D., P.E. Error Analysis.
Part 3 Truncation Errors Second Term 05/06.
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
Atms 4320 Lab 2 Anthony R. Lupo. Lab 2 -Methodologies for evaluating the total derviatives in the fundamental equations of hydrodynamics  Recall that.
Part 3 Truncation Errors.
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 5 Approximations, Errors and The Taylor Series.
NUMERICAL ERROR ENGR 351 Numerical Methods for Engineers Southern Illinois University Carbondale College of Engineering Dr. L.R. Chevalier.
1 Error Analysis Part 1 The Basics. 2 Key Concepts Analytical vs. numerical Methods Representation of floating-point numbers Concept of significant digits.
Dr. Jie Zou PHY Chapter 7 Numerical Differentiation: 1 Lecture (I) 1 Ref: “Applied Numerical Methods with MATLAB for Engineers and Scientists”, Steven.
Calculus I – Math 104 The end is near!. 1. Limits: Series give a good idea of the behavior of functions in the neighborhood of 0: We know for other reasons.
The Islamic University of Gaza Faculty of Engineering Civil Engineering Department Numerical Analysis ECIV 3306 Chapter 23 Numerical Differentiation.
CISE-301: Numerical Methods Topic 1: Introduction to Numerical Methods and Taylor Series Lectures 1-4: KFUPM.
Ch 8.1 Numerical Methods: The Euler or Tangent Line Method
Interpolation. Interpolation is important concept in numerical analysis. Quite often functions may not be available explicitly but only the values of.
Chapter 1 Scientific Computing Approximation in Scientific Computing (1.2) January 12, 2010.
Taylor Series & Error. Series and Iterative methods Any series ∑ x n can be turned into an iterative method by considering the sequence of partial sums.
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.
MATH 685/CSI 700 Lecture Notes Lecture 1. Intro to Scientific Computing.
CISE301_Topic11 CISE-301: Numerical Methods Topic 1: Introduction to Numerical Methods and Taylor Series Lectures 1-4:
Infinite Series Copyright © Cengage Learning. All rights reserved.
ES 240: Scientific and Engineering Computation. Chapter 4 Chapter 4: Errors Uchechukwu Ofoegbu Temple University.
ME 142 Engineering Computation I Computer Precision & Round-Off Error.
Taylor’s Polynomials & LaGrange Error Review
Truncation Error and the Taylor Series
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.
9.7 and 9.10 Taylor Polynomials and Taylor Series.
Engineering Analysis ENG 3420 Fall 2009 Dan C. Marinescu Office: HEC 439 B Office hours: Tu-Th 11:00-12:00.
Finite Difference Methods Definitions. Finite Difference Methods Approximate derivatives ** difference between exact derivative and its approximation.
Sensitivity derivatives Can obtain sensitivity derivatives of structural response at several levels Finite difference sensitivity (section 7.1) Analytical.
Engineering Analysis – Computational Fluid Dynamics –
Engineering Analysis ENG 3420 Fall 2009 Dan C. Marinescu Office: HEC 439 B Office hours: Tu-Th 11:00-12:00.
Meeting 15 Introduction to Numerical Methods Error Analysis.
Lecture 4 - Numerical Errors CVEN 302 June 10, 2002.
Numerical Analysis CC413 Propagation of Errors.
Errors in Numerical Methods
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Truncation Errors and the Taylor Series Chapter 4.
Spring 2006CISC101 - Prof. McLeod1 Announcements Assn 4 is posted. Note that due date is the 12 th (Monday) at 7pm. (Last assignment!) Final Exam on June.
9.3 Taylor’s Theorem: Error Analysis yes no.
Lecture 1 Introduction Dr. Hakikur Rahman Thanks to Dr. S. M. Lutful Kabir for Slides CSE 330: Numerical Methods.
Infinite Series 9 Copyright © Cengage Learning. All rights reserved.
NUMERICAL ANALYSIS I. Introduction Numerical analysis is concerned with the process by which mathematical problems are solved by the operations.
High Accuracy Differentiation Formulas
ME 142 Engineering Computation I
Applied Numerical Methods
Taylor series in numerical computations (review)
Chapter 2 ERROR ANALYSIS
Sec:4.1 THE TAYLOR SERIES.
Chapter 18.
Roundoff and Truncation Errors
Chapter 23.
Taylor Polynomials & Approximation (9.7)
Find the Taylor series for f (x) centered at a = 8. {image} .
SKTN 2393 Numerical Methods for Nuclear Engineers
Chapter 1 / Error in Numerical Method
Roundoff and Truncation Errors
CISE-301: Numerical Methods Topic 1: Introduction to Numerical Methods and Taylor Series Lectures 1-4: KFUPM CISE301_Topic1.
Presentation transcript:

1 Approximation

2 Taylor Series

3 Truncation Error  In general, the nth order Taylor series expansion will be exact for an nth order polynomial  In other cases, the remainder term R n is of the order of h n+1, meaning:  The more terms are used, the smaller the error, and  The smaller the spacing, the smaller the error for a given number of terms

Numerical Differentiation  Problem: approximate the derivative of the function f(x) knowing the values of the function at discrete values of x  First order Taylor series can be used to calculate approximations to derivatives:  Given:  Then:  This is termed a “forward” difference because it utilizes data at i and i+1 to estimate the derivative 4

Numerical Differentiation ( 續 )  There are also backward difference and centered difference approx., depending on the points used:  Forward  Backward  Centered 5

Truncation and Round-off Errors  Truncation error ( 截斷誤差 ): method dependent  Results from ignoring all but a finite number of terms of an infinite series  Results from using an approximation rather than an exact procedure  Round-off error ( 捨入誤差 ): machine dependent  Difference between an approximation of a number used in computation and its exact (correct) value  Results from not being able to adequately represent the true value 6

Truncation and Round-off Errors  Round-off error ( 捨入誤差 ): machine dependent  An example of round-off error is provided by an index devised at the Vancouver stock exchange. At its inception in 1982, the index was given a value of After 22 months of recomputing the index and truncating to three decimal places at each change in market value, the index stood at , despite the fact that its "true" value should have been  Another example is the fate of the Ariane rocket launched on June 4, 1996 (European Space Agency 1996). In the 37th second of flight, the inertial reference system attempted to convert a 64-bit floating-point number to a 16-bit number, but instead triggered an overflow error which was interpreted by the guidance system as flight data, causing the rocket to veer off course and be destroyed. 7

function sum = exp(x) % Evaluate exponential function exp(x) % by Taylor series expansion % f(x)=1 + x + x^2/2! + x^3/3! + … + x^n/n! clear all x = input(‘enter the value of x = ’); n = input(‘enter the order n = ’); term =1 ; sum= term; for i = 1 : n term = term*x/i; sum = sum + term; end Truncation Error Example

function sum = exp(x) % Evaluate exponential function exp(x) % by Taylor series expansion % f(x)=1 + x + x^2/2! + x^3/3! + … + x^n/n! x = input(‘enter the value of x =’); n = input(‘enter the order n = ’); term(1) =1 ; sum(1)= term(1); for i = 1 : n term(i+1) = term(i)*x/i; sum(i+1) = sum(i) + term(i+1); end % Display the results disp(‘i term(i) sum(i)’) a = 1:n+1; [a’ term’ sum’] Truncation Error Example

n term sum Truncation Error

n term sum Truncation Error How to reduce error?

Accuracy and Precision  Accuracy - How closely a measured or computed value agrees with the true value  Precision - How closely individual measured or computed values agree with each other  Accuracy is getting all your shots near the target  Precision is getting them close together. 13 More Accurate More Precise

Effect of the Step Size on the Total Error  Truncation and round-off errors behave differently as functions of the step size h:  Truncation error increases as the step size increases  Round-off error decreases as the step size increases  Total numerical error = truncation + round-off error  There is an optimum step size which minimizes the total error 14

Effect of the Step Size  The smaller the step size  The larger the number of calculations, thus the larger the round-off error  The smaller the error made when approximation the value of the function at the intermediate points 15

16 Other Errors  Blunders  Errors caused by malfunctions of the computer or human imperfection  Model errors  Errors resulting from incomplete mathematical models  Data uncertainty  Errors resulting from the accuracy and/or precision of the data