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

Numerical Analysis: Lecture - 2

The document discusses error analysis in numerical calculations, defining types of errors such as absolute and relative error. It provides formulas for calculating the error in addition, subtraction, and operations with multiple numbers. Examples are given to demonstrate estimating the maximum absolute and relative errors of rounded numbers, and finding the range in which the true answer lies.

Uploaded by

Z_Jahangeer
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views

Numerical Analysis: Lecture - 2

The document discusses error analysis in numerical calculations, defining types of errors such as absolute and relative error. It provides formulas for calculating the error in addition, subtraction, and operations with multiple numbers. Examples are given to demonstrate estimating the maximum absolute and relative errors of rounded numbers, and finding the range in which the true answer lies.

Uploaded by

Z_Jahangeer
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

NUMERICAL ANALYSIS

Lecture -2

Muhammad Rafiq
Assistant Professor
University of Central Punjab
Lahore Pakistan

ERROR ANALYSIS
ERROR
The difference in exact and approximate values is error.
Suppose exact value of a number be = x
Approximate exact value of a number be = x
Error = x- x
Absolute error=|x- x|
Relative error=A.E/|x|
=|x- x|/|x|
Percentage relative error=R.E100%

ERROR IN ADDITION
Suppose exact value of a number be= x1
Suppose exact value of another number be= x2
Suppose approximate value of a number be= x1
Suppose approximate value of another number be= x2
Error in first number = e1=x1-x1
Error in first number=e2=x2-x2
Let Z be the sum of two numbers=Z=x1+x2
Let Z be the sum of approximate values=Z=x1 +x2
Error=ez=Z-Z
= (x1+x2) - (x1+x2)

= x1+x2- x1-x2
=(x1-x1)+(x2-x2)
ez=e1+e2
Absolute error=|ez|=|e1+e2||e1|+|e2|
And

|ez||e1|+|e2|

ERROR IN SUBTRACTION
Suppose exact value of a number be= x1
Suppose exact value of another number be= x2
Suppose approximate value of a number be= x1
Suppose approximate value of another number be= x2

Error in first number = e1=x1-x1


Error in first number=e2=x2-x2
Let Z be the difference of two numbers=Z=x1-x2
Let Z be the difference of approximate values=Z=x1-x2
Error=ez=Z-Z
= (x1-x2 )- (x1-x2)
= x1-x2- x1+x2
=(x1-x1)-(x2-x2)
ez=e1-e2
Absolute error=|ez|=|e1-e2||e1|+|e2|
And

|ez| |e1|+|e2|

Thus for n numbers eZ = e1 e2 e3 en


|ez| |e1|+|e2|+|e3|++|en|
Note:
If a number is approximated to n-decimal places, then absolute
error in it is given by
A.E 1/2 10-n
For Example =1.73
=1.7320

e=1/2 10-2
e=1/2 10-4

EXAMPLE 1
If numbers in 0.3062-0.25026+2.51342 are rounded. Estimate
the maximum absolute error and relative error. Find also the
range in which true answers lies.
Solution:
Let x1=0.3062

e1=1/210-4

x2=0.25026

e2=1/210-5

x3=2.51342

e3=1/210-5

Let Z=x1-x2+x3
=0.3062-0.25026+2.51342
= 2.56936

Absolute error 1/210-4+1/210-5+1/210-5


1/210-5(10+1+1)
1/210-5(12)
610-5
0.610-4
Maximum Absolute error=0.610-4
Relative error=A.E/|Z|
=0.610-4/2.56936
=2.335210-5
The range in which true answer lies
Z-A.E Z Z+A.E

2.56936-0.610-4 Z 2.56936+0.610-4
2.56930 Z 2.56942.
(Correct to 3d.p)
EXAMPLE 2
The values of x1 and x2 are estimated as x1=4.57+e1 and
x2=8.84+e2 where |e1|<0.35 and |e2|<0.82.Find the range in
which product lies.
Solution: Let Z=x1x2
Least value of product = (4.57-0.35)(8.48-0.82)

Greatest value of product = (4.57+0.35)(8.48+0.82)


The range in which true answer lies is: 32.3252 < Z < 45.756.

Exercise
Q#1
If numbers in 5.2163+1.35202-1.41265+2.14169 are rounded.
Estimate the maximum absolute error and relative error. Find
also the range in which true answers lies.

Q#2
If numbers in 3.123-2.5169+2.234-2.01267+2.1006 are
rounded. Estimate the maximum absolute error and relative
error. Find also the range in which true answers lies.

You might also like