0% found this document useful (0 votes)
13 views

Chapter 1 - Errors and Approximations

This document provides an overview of numerical errors and approximations that arise when solving mathematical problems computationally. It discusses sources of error such as round-off error from finite digit representation and truncation error from numerical approximations. Methods to estimate the error in approximations like Taylor series expansions are presented. Examples are provided to illustrate rounding numbers to a given number of significant figures or decimal places, as well as using successive terms of Taylor series approximations to iteratively estimate functions like e^x and cos(x) to within a specified tolerance.

Uploaded by

Andre207
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views

Chapter 1 - Errors and Approximations

This document provides an overview of numerical errors and approximations that arise when solving mathematical problems computationally. It discusses sources of error such as round-off error from finite digit representation and truncation error from numerical approximations. Methods to estimate the error in approximations like Taylor series expansions are presented. Examples are provided to illustrate rounding numbers to a given number of significant figures or decimal places, as well as using successive terms of Taylor series approximations to iteratively estimate functions like e^x and cos(x) to within a specified tolerance.

Uploaded by

Andre207
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Chapter 1

Errors and Approximations

Errors
1. Round-off Error
2. Truncation Error
Approximation
1. Approximate Percent Relative Error

Significant Figures

Example

Round 742,396 to four, three, and two significant digits:

742,400 (four significant digits)


742,000 (three significant digits)
740,000 (two significant digits)

Round 0.07284 to four, three, and two significant digits:

0.07284 (four significant digits)


0.0728 (three significant digits)
0.073 (two significant digits)

Round 231.45 to four, three, and two significant digits:

231.5 (four significant digits)


231 (three significant digits)
230 (two significant digits)

Decimal Places

Example

Round 0.07284 to four, three, and two decimal places:

0.0728 (four decimal places)


0.073 (three decimal places)
0.07 (two decimal places)

Exercise

Round 19286.37465, 19208.37465, 19204.37465, 19886.37465 and 352.96479 to

a. Four, three, and two significant digits


b. Four, three, and two decimal places
Numerical method – Techniques by which mathematical problems are formulated so that
they can be solved with arithmetic operations

Example
Method - Newton Raphson method

f  xi 
xi 1  xi 
f '  xi 

Problem – Integrate the following

f x   x x

Numerical Error

Round-off error Truncation error

Round of error
Due to the fact that computers can represent only quantities with a finite number of digits

Example
  3.14

Truncation error
Is the discrepancy introduced by the fact that numerical methods may employ approximations
to represent exact mathematical operations and quantities.

Example
Consider the Taylor Series Expansion, a series that provides a means to predict a function
value at one point in terms of the function value and its derivatives at another point.

f '' xi  2 f ''' xi  3 f ''' xi  n


f xi 1   f xi   f ' xi h  h  h  ...  h  Rn
2! 3! n!

First-order approximation
f xi 1   f xi   f ' xi h
Second-order approximation
f ''  x i  2
f  xi 1   f  xi   f ' xi h  h
2!

Third-order approximation
f '' xi  2 f ''' xi  3 f ''' xi  n
f xi 1   f xi   f ' xi h  h  h  ...  h  Rn
2! 3! n!

In general,

True value = Approximation + True Error

Let E t = True error, then rearranging the equation gives

E t = True value – Approximation

True percent relative error

True value  approximation


t  100%
True value

Example

Actual length of line A = 10000 meters


Actual length of line B = 10 meters

Length of line A measured by Sally = 9999 meters


Length of line B measured by Sally = 9 meters
 t of A =

 t of B =

However, true value and true error are not available in most real-world applications. Hence,

Approximate value = Approximation + Approximate Error

Let E a = Approximate error, then rearranging the equation gives

E a = Approximate value – Approximation

Approximate percent relative error

Current approximation  Previous approximation


a  100%
Current approximation

Stopping criterion – Terminate computation when  a   s where  s is a pre-specified


percent tolerance. If this relationship holds, the percent relative error of our results is assumed
to be within the pre-specified acceptable level  s .

Suppose you want your result to be correct to at least n significant figure then set

 s  0.5 102n % 

Often, when performing computations, we may not be concerned with the sign of the error,
but we are interested in whether the percent absolute value is lower than a pre-specified
percent tolerance  s . Hence, this gives the following equations

True value  approximation


t  100%
True value

Current approximation  Previous approximation


a  100%
Current approximation
Example

Consider the Mclaurin series expansion

x 2 x3 x 4 xn
e 1 x 
x
   ... 
2 3! 4! n!

By adding terms one at a time, estimate e 0.5 correct to at least 3 significant figures.

Solution

 s  0.5 1023 %  0.05%

1 term,
ex 1 e 0.5  1

2 terms,
e x 1  x e 0.5  1  0.5  1.5

3 terms,
x2 0.5 2
ex  1 x  e 0.5  1  0.5   1.626
2 2

4 terms,
x2 x3 0.5 2 0.53
ex  1 x   e 0.5  1  0.5    1.645833333
2 3! 2 3!

5 terms,
x 2 x3 x 4 0.5 2 0.53 0.5 4
ex  1 x    e x  1  0.5     1.648437500
2 3! 4! 2 3! 4!

6 terms,
x 2 x3 x4 x5 0.5 2 0.53 0.5 4 0.55
ex  1 x     e x  1  0.5      1.648697917
2 3! 4! 5! 2 3! 4! 5!

Terms Result  t %  a %


1 1 39.3
2 1.5 9.02 33.3
3 1.625 1.44 7.69
4 1.645833333 0.175 1.27
5 1.648437500 0.0172 0.158
6 1.648697917 0.00142 0.0158

 a  0.0158   s  0.05
Exercise
Given that
x 2 x3 x 4 xn
e 1 x 
x
   ... 
2 3! 4! n!
By adding terms one at a time, estimate e1.2 correct to at least 2 significant figures.

Solution
Exercise
Given that
x 2 x 4 x 6 x8
cos x  1      ...
2 4! 6! 8!

By adding terms one at a time, estimate cos 0.6 correct to at least 4 significant figures.

Solution

Reference
Chapra, S.C. and Canale, R.P., 2010. Numerical Methods for Engineers, 6th Edition. McGraw-Hill.

You might also like