Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Measuring Errors - Numerical Analysis - Solved Exam, Exams of Mathematical Methods for Numerical Analysis and Optimization

Main Points are:Measuring Errors, Relative True Error, Relative Approximate Error, Number of Significant Digits, Concept of Significant Digits, Issue of Errors, True Error, Magnitude of True Error, Derivative of Function

Typology: Exams

2012/2013

Uploaded on 04/16/2013

maalolan
maalolan 🇮🇳

4.5

(8)

123 documents

1 / 7

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
01.02.1
Chapter 01.02
Measuring Errors
After reading this chapter, you should be able to:
1. find the true and relative true error,
2. find the approximate and relative approximate error,
3. relate the absolute relative approximate error to the number of significant digits
at least correct in your answers, and
4. know the concept of significant digits.
In any numerical analysis, errors will arise during the calculations. To be able to deal
with the issue of errors, we need to
(A) identify where the error is coming from, followed by
(B) quantifying the error, and lastly
(C) minimize the error as per our needs.
In this chapter, we will concentrate on item (B), that is, how to quantify errors.
Q: What is true error?
A: True error denoted by t
E 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 )(xf at a particular value of
x
can be approximately calculated
by
h
xfhxf
xf )()(
)(
of )2(f For x
exf 5.0
7)( and 3.0
h, find
a) the approximate value of )2(f
b) the true value of )2(f
c) the true error for part (a)
Solution
a) h
xfhxf
xf )()(
)(
Docsity.com
pf3
pf4
pf5

Partial preview of the text

Download Measuring Errors - Numerical Analysis - Solved Exam and more Exams Mathematical Methods for Numerical Analysis and Optimization in PDF only on Docsity!

Chapter 01.

Measuring Errors

After reading this chapter, you should be able to:

  1. find the true and relative true error,
  2. find the approximate and relative approximate error,
  3. relate the absolute relative approximate error to the number of significant digits at least correct in your answers, and
  4. know the concept of significant digits.

In any numerical analysis, errors will arise during the calculations. To be able to deal with the issue of errors, we need to (A) identify where the error is coming from, followed by (B) quantifying the error, and lastly (C) minimize the error as per our needs. In this chapter, we will concentrate on item (B), that is, how to quantify errors.

Q : What is true error? A : True error denoted by Et 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 f ( x ) at a particular value of x can be approximately calculated

by

h

f x h f x f x

of f (^2 )For f ( x ) 7 e^0.^5 x and h  0. 3 , find a) the approximate value of f ( 2 ) b) the true value of f ( 2 ) c) the true error for part (a) Solution

a) h

f x h f x f x

01.02.2 Chapter 01.

For x  2 and h  0. 3 ,

f f f

f ( 2. 3 ) f ( 2 ) 

7 e^0.^5 (^2.^3 ) 7 e^0.^5 (^2 ) 

b) The exact value of f (^2 )can be calculated by using our knowledge of differential calculus.

f ( x ) 7 e^0.^5^ x f ' ( x ) 7  0. 5  e^0.^5^ x  3. 5 e^0.^5^ x So the true value of f '( 2 )is

f ' ( 2 ) 3. 5 e^0.^5 (^2 )  9. 5140 c) True error is calculated as E (^) t = True value – Approximate value  9. 5140  10. 265  0. 75061 The magnitude of true error does not show how bad the error is. A true error of Et  0. 722

may seem to be small, but if the function given in the Example 1

were f ( x ) 7  10 ^6 e^0.^5 x ,the true error in calculating f (^2 ) with h  0. 3 , would be

Et  0. 75061  10 ^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.

Q : What is relative true error? A : Relative true error is denoted by  t and is defined as the ratio between the true error and

the true value.

Relative True Error TrueValue

TrueError 

Example 2

The derivative of a function f ( x ) at a particular value of x can be approximately calculated

by

h

f x h f x f x

For f ( x ) 7 e^0.^5 x and h  0. 3 , find the relative true error at x  2.

01.02.4 Chapter 01.

h

f x h f x f x

For x  2 and h  0. 3 ,

f f f

f ( 2. 3 ) f ( 2 ) 

7 e^0.^5 (^2.^3 ) 7 e^0.^5 (^2 ) 

b) Repeat the procedure of part (a) with h  0. 15 ,

h

f x h f x f x

For x  2 and h  0. 15 ,

f f f

f ( 2. 15 ) f ( 2 ) 

7 e^0.^5 (^2.^15 ) 7 e^0.^5 (^2 ) 

c) So the approximate error, E (^) a is

E (^) a Present Approximation – Previous Approximation  9. 8799  10. 265  0. 38474 The magnitude of approximate error does not show how bad the error is. An approximate

error of E (^) a  0. 38300 may seem to be small; but for f ( x ) 7  10 ^6 e^0.^5 x , the approximate

error in calculating f '( 2 ) with (^) h  0. 15 would be (^) Ea  0. 38474  10 ^6. This value of

approximate error is smaller, even when the two problems are similar in that they use the same value of the function argument, (^) x  2 , and (^) h  0. 15 and (^) h  0. 3. This brings us to the definition of relative approximate error.

Q : What is relative approximate error? A : Relative approximate error is denoted by  a and is defined as the ratio between the

approximate error and the present approximation.

Relative Approximate Error PresentApproximation

ApproximateError 

Measuring Errors 01.02.

Example 4

The derivative of a function f ( x ) at a particular value of x can be approximately calculated

by

h

f x h f x f x

For f ( x ) 7 e^0.^5 x , find the relative approximate error in calculating f (^2 )using values from

h  0. 3 and h  0. 15. Solution

From Example 3, the approximate value of f ( 2 ) 10. 263 using h  0. 3 and

f '^ ( 2 ) 9. 8800 using h  0. 15. E (^) a Present Approximation – Previous Approximation  9. 8799  10. 265  0. 38474 The relative approximate error is calculated as

a  PresentApproximation

ApproximateError

Relative approximate errors are also presented as percentages. For this example,  a  0. 038942  100 % = (^)  3. 8942 % Absolute relative approximate errors may also need to be calculated. In this example  a |  0. 038942 |  0. 038942 or 3.8942%

Q : While solving a mathematical model using numerical methods, how can we use relative approximate errors to minimize the error? A : In a numerical method that uses iterative methods, a user can calculate relative approximate error  a at the end of each iteration. The user may pre-specify a minimum

acceptable tolerance called the pre-specified tolerance,  s. If the absolute relative

approximate error  a is less than or equal to the pre-specified tolerance  s , that is, | (^) a (^) | s ,

then the acceptable error has been reached and no more iterations would be required. Alternatively, one may pre-specify how many significant digits they would like to be correct in their answer. In that case, if one wants at least m significant digits to be correct in the answer, then you would need to have the absolute relative approximate error, m a

Measuring Errors 01.02.

e) 1. 079  10 3 has four significant digits f) 1. 0790  10 3 has five significant digits g) 1. 07900  10 3 has six significant digits

INTRODUCTION, APPROXIMATION AND ERRORS