NUMERICAL ERROR ENGR 351 Numerical Methods for Engineers

Slides:



Advertisements
Similar presentations
Ordinary Differential Equations
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
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 ~ Curve Fitting ~ Least Squares Regression Chapter.
ECIV 201 Computational Methods for Civil Engineers Richard P. Ray, Ph.D., P.E. Error Analysis.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Ordinary Differential Equations Equations which are.
Approximations and Errors
CURVE FITTING ENGR 351 Numerical Methods for Engineers
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.
Initial-Value Problems
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 181 Interpolation Chapter 18 Estimation of intermediate.
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.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. by Lale Yurttas, Texas A&M University Chapter 171 CURVE.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. by Lale Yurttas, Texas A&M University Chapter 181 Interpolation.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Interpolation Chapter 18.
Lecture Notes Dr. Rakhmad Arief Siregar Universiti Malaysia Perlis
PROBABILITY AND STATISTICS ENGR 351 Numerical Methods for Engineers Southern Illinois University Carbondale College of Engineering Dr. L.R. Chevalier.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. by Lale Yurttas, Texas A&M University Chapter 171 Least.
CISE-301: Numerical Methods Topic 1: Introduction to Numerical Methods and Taylor Series Lectures 1-4: KFUPM.
Least-Squares Regression
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. by Lale Yurttas, Texas A&M University Chapter 31.
Introduction and Analysis of Error Pertemuan 1
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.
ENGR Introduction to Engineering1 ENGR 107 – Introduction to Engineering Estimation, Accuracy and Precision, and Significant Figures (Lecture #3)
ES 240: Scientific and Engineering Computation. Chapter 4 Chapter 4: Errors Uchechukwu Ofoegbu Temple University.
Truncation Error and the Taylor Series
Villanova University Dept. of Civil & Environmental Engineering CEE 3704 Statistical and Numerical Analysis 1 CEE 3704 Statistical and Numerical Analysis.
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.
MECN 3500 Inter - Bayamon Lecture 3 Numerical Methods for Engineering MECN 3500 Professor: Dr. Omar E. Meza Castillo
Determining the Size of a Sample 1 Copyright © 2014 Pearson Education, Inc.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Chapter 3.
Meeting 15 Introduction to Numerical Methods Error Analysis.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Part 7 - Chapter 25.
Numerical Analysis CC413 Propagation of Errors.
Errors in Numerical Methods
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Part 6 - Chapters 22 and 23.
Statistics for Business and Economics 8 th Edition Chapter 7 Estimation: Single Population Copyright © 2013 Pearson Education, Inc. Publishing as Prentice.
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.
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.
ESTIMATION.
Part 5 - Chapter
ME 142 Engineering Computation I
Part 5 - Chapter 17.
Interpolation Estimation of intermediate values between precise data points. The most common method is: Although there is one and only one nth-order.
Chapter 18.
Taylor series in numerical computations (review)
Chapter 12 Using Descriptive Analysis, Performing
Chapter 2 ERROR ANALYSIS
NUMERICAL DIFFERENTIATION AND INTEGRATION
Class Notes 18: Numerical Methods (1/2)
Chapter 18.
Roundoff and Truncation Errors
Statistical Methods For Engineers
Part 5 - Chapter 17.
Approximations and Round-Off Errors Chapter 3
Mathematical Model.
Determining the Size of a Sample
Introduction to Sampling Distributions
Chapter 1 / Error in Numerical Method
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.
Presentation transcript:

NUMERICAL ERROR ENGR 351 Numerical Methods for Engineers Southern Illinois University Carbondale College of Engineering Dr. L.R. Chevalier

Copyright© 1999 by Lizette R. Chevalier Permission is granted to students at Southern Illinois University at Carbondale to make one copy of this material for use in the class ENGR 351, Numerical Methods for Engineers. No other permission is granted. All other rights are reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior written permission of the copyright owner.

SIMPLE STATISTICS Arithmetic mean Standard deviation

Simple Statistics cont. Variance, sy2 Coefficient of variation

Pseudo Code Review for First Programming Assignment Raw Data Code Output Data

ASCII Acronym for American Standard Code for Information Interchanged Pronounced ask-key Also referred to as a text file Generate in C++, Fortran, Basic, etc. editors Generate in Notepad Can generate in Word, but need to save as a text file Executable programs are never stored in ASCII format

Pseudo Code Review for First Programming Assignment Raw Data Code Output Data These are in ASCII format, unless you are using an executable version of your code. In that case, only the data (input and output) are ASCII format.

Pseudo Code for Average 10 77.8 39.2 56.7 98.2 88.7 86.2 76.3 82.5 93.6 78.2 Data file input.dat Read an ASCII file that 1. Inputs number of students n 2. Inputs scores y(n)

Pseudo Code for Average DIMENSION Y OPEN INPUT.DAT READ N DO I=1,N READ Y(N) CONTINUE DO J=1,N SUM=SUM+Y(J) AVERAGE = SUM/N PRINT “AV”

PROBLEM Modify the pseudo-code to calculate the variance.

Approximation and Errors Significant Figures 1.845 0.01845 0.0001845 43,500 ? confidence 4.35 x 104 3 significant figures 4.350 x 104 4 significant figures 4.3500 x 104 5 significant figures

Accuracy and Precision Accuracy - how closely a computed or measured value agrees with the true value Precision - how closely individual computed or measured values agree with each other number of significant figures spread in repeated measurements or computations

increasing accuracy increasing precision

Error Definitions Numerical error - use of approximations to represent exact mathematical operations and quantities true value = approximation + error error, et=true value - approximation subscript t represents the true error shortcoming....gives no sense of magnitude normalize by true value to get true relative error

Error definitions cont. True relative percent error But we may not know the true answer apriori

Error definitions cont. May not know the true answer apriori This leads us to develop an iterative approach of numerical methods

Error definitions cont. Usually not concerned with sign, but with tolerance Want to assure a result is correct to n significant figures

Example Consider a series expansion to estimate trigonometric functions Estimate sin p/ 2 to three significant figures

Error Definitions cont. Round off error - originate from the fact that computers retain only a fixed number of significant figures Truncation errors - errors that result from using an approximation in place of an exact mathematical procedure To gain insight consider the mathematical formulation that is used widely in numerical methods - TAYLOR SERIES

TAYLOR SERIES Provides a means to predict a function value at one point in terms of the function value at and its derivative at another point Zero order approximation This is good if the function is a constant.

Taylor Series Expansion First order approximation slope multiplied by distance Still a straight line but capable of predicting an increase or decrease - LINEAR

Taylor Series Expansion Second order approximation - captures some of the curvature

Taylor Series Expansion

Taylor Series Expansion

Example Use zero through fourth order Taylor series expansion to approximate f(1) given f(0) = 1.2 (i.e. h = 1) Note: f(1) = 0.2

Functions with infinite number of derivatives f(x) = cos x f '(x) = -sin x f "x) = -cos x f "'(x) = sin x Evaluate the system where xi = p/4 and xi+1 = p /3 h = p /3 - p /4 = p /12

Functions with infinite number of derivatives Zero order f(p /3) = cos (p/4 ) = 0.707 et = 41.4% First order f(p /3) = cos (p/4 ) - sin (p/4 )(p/12) et = 4.4% Second order f(p /3) = 0.498 et = 0.45% By n = 6 et = 2.4 x 10-6 %

Exam Question How many significant figures are in the following numbers? A. 3.215 B. 0.00083 C. 2.41 x 10-3 D. 23,000,000 E. 2.3 x 107

TAYLOR SERIES PROBLEM Use zero- through fourth-order Taylor series expansions to predict f(4) for f(x) = ln x using a base point at x = 2. Compute the percent relative error et for each approximation.