Errors In Computation-Numerical Analysis-Lecture Handouts, Lecture notes of Mathematical Methods for Numerical Analysis and Optimization

This course contains solution of non linear equations and linear system of equations, approximation of eigen values, interpolation and polynomial approximation, numerical differentiation, integration, numerical solution of ordinary differential equations. This lecture includes: Errors, Computation, Inherent, Local, Round, Truncation, Quantity, Statement, Data, Physical, Measurement

Typology: Lecture notes

2011/2012

Uploaded on 08/05/2012

saruy
saruy 🇮🇳

4.5

(120)

130 documents

1 / 2

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Numerical Analysis –MTH603 VU
© Copyright Virtual University of Pakistan 1
Errors in Computations
Numerically, computed solutions are subject to certain errors. It may be fruitful to
identify the error sources and their growth while classifying the errors in numerical
computation. These are
Inherent errors,
Local round-off errors
Local truncation errors
Inherent errors
It is that quantity of error which is present in the statement of the problem itself, before
finding its solution. It arises due to the simplified assumptions made in the mathematical
modeling of a problem. It can also arise when the data is obtained from certain physical
measurements of the parameters of the problem.
Local round-off errors
Every computer has a finite word length and therefore it is possible to store only a fixed
number of digits of a given input number. Since computers store information in binary
form, storing an exact decimal number in its binary form into the computer memory gives
an error. This error is computer dependent.
At the end of computation of a particular problem, the final results in the computer,
which is obviously in binary form, should be converted into decimal form-a form
understandable to the user-before their print out. Therefore, an additional error is
committed at this stage too.
This error is called local round-off error.
10 2
(0.7625) (0.110000110011)
=
If a particular computer system has a word length of 12 bits only, then the decimal
number 0.7625 is stored in the computer memory in binary form as 0.110000110011.
However, it is equivalent to 0.76245.
Thus, in storing the number 0.7625, we have committed an error equal to 0.00005, which
is the round-off error; inherent with the computer system considered.
Thus, we define the error as
Error = True value – Computed value
Absolute error, denoted by |Error|,
While, the relative error is defined as
Relative error Error
True value
=
Local truncation error
It is generally easier to expand a function into a power series using Taylor series
expansion and evaluate it by retaining the first few terms. For example, we may
approximate the function f (x) = cos x by the series
24 2
cos 1 ( 1)
2! 4! (2 )!
n
n
xx x
xn
=− + + +""
If we use only the first three terms to compute cos x for a given x, we get an approximate
answer. Here, the error is due to truncating the series. Suppose, we retain the first n
terms, the truncation error (TE) is given by
docsity.com
pf2

Partial preview of the text

Download Errors In Computation-Numerical Analysis-Lecture Handouts and more Lecture notes Mathematical Methods for Numerical Analysis and Optimization in PDF only on Docsity!

Errors in Computations

Numerically, computed solutions are subject to certain errors. It may be fruitful to identify the error sources and their growth while classifying the errors in numerical computation. These are Inherent errors, Local round-off errors Local truncation errors Inherent errors It is that quantity of error which is present in the statement of the problem itself, before finding its solution. It arises due to the simplified assumptions made in the mathematical modeling of a problem. It can also arise when the data is obtained from certain physical measurements of the parameters of the problem. Local round-off errors Every computer has a finite word length and therefore it is possible to store only a fixed number of digits of a given input number. Since computers store information in binary form, storing an exact decimal number in its binary form into the computer memory gives an error. This error is computer dependent. At the end of computation of a particular problem, the final results in the computer, which is obviously in binary form, should be converted into decimal form-a form understandable to the user-before their print out. Therefore, an additional error is committed at this stage too. This error is called local round-off error. (0.7625) 10 =(0.110000110011) 2

If a particular computer system has a word length of 12 bits only, then the decimal number 0.7625 is stored in the computer memory in binary form as 0.110000110011. However, it is equivalent to 0.76245. Thus, in storing the number 0.7625, we have committed an error equal to 0.00005, which is the round-off error; inherent with the computer system considered. Thus, we define the error as Error = True value – Computed value Absolute error, denoted by |Error|, While, the relative error is defined as

Relative error

Error True value

Local truncation error It is generally easier to expand a function into a power series using Taylor series expansion and evaluate it by retaining the first few terms. For example, we may approximate the function f ( x ) = cos x by the series 2 4 2 cos 1 ( 1) 2! 4! (2 )!

n x x^ x^ n x n

If we use only the first three terms to compute cos x for a given x , we get an approximate answer. Here, the error is due to truncating the series. Suppose, we retain the first n terms, the truncation error (TE) is given by

docsity.com

2 2 TE (2 2)!

x^ n n

The TE is independent of the computer used. If we wish to compute cos x for accurate with five significant digits, the question is, how many terms in the expansion are to be included? In this situation 2 2 .5 10 5 5 106 (2 2)!

x^ n n

< × −^ = × −

Taking logarithm on both sides, we get

10 10

(2 2) log log[(2 2)!] log 5 6 log 10 0.699 6 5.

n + xn + < − = − = −

or log[(2 n + 2)!] − (2 n + 2) log x >5.

We can observe that, the above inequality is satisfied for n = 7. Hence, seven terms in the expansion are required to get the value of cos x , with the prescribed accuracy The truncation error is given by 16 TE 16!

x

docsity.com