0% found this document useful (0 votes)
23 views12 pages

Numerical CH One

Applied Numerical Analysis chapter 1

Uploaded by

rehiwott
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)
23 views12 pages

Numerical CH One

Applied Numerical Analysis chapter 1

Uploaded by

rehiwott
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/ 12

Manalebish D

Numerical Analysis Math-3221

October 5, 2023
Chapter 1

Basic concepts in error


estimation
The study of numerical methods involve solving problems which produce numerical
answers (outputs) given numerical data (inputs).
Many applied mathematics problems can be solved only approximately such
problems arise whenever mathematics is used to model the real world. The design
and development of numerical methods often depend on the computational aids
available: computers,desk machines, calculators
An algorithm is a systematic procedure that solves a problem.
Examples of numerical problems

1. The evaluation of functions at given arguments: e−0.5 , cos(0.315)

2. The determination of roots of equations

3. The evaluation of derivatives at a given argument or the evaluation of definite


integral of a function

4. The determination of maxima and minima of a function

5. The solution of differential equations, systems of linear equations

1
Many of the linear problems can be solved analytically

Example 1 ax + b = 0, a ̸= 0 then x = − ab is the true value or the exact value



−b± b2 +4ac
ax2 + bx + c = 0, a ̸= 0 then x = 2a are the true values or the exact values

However, many nonlinear equations have no such explicit solution. For these,
numerical methods based on approximation can be developed which produce roughly
correct results.For instance

• Finding roots by finding successively better approximations

• Approximating a function which is not analytically integrable by one which


is intengrable and integrating the approximation.

Any iteration must be terminated after a finite number of steps;giving rise to an


approximation to a specified degree of tolerance (or degree of error).
An approximate value “a” is a value which differs from an exact value “A”
(usually unknown) and is used in place of A in computations.
An error ∆a of an approximate number ‘a′ is given by ∆a = a − A( or A − a)
so that A = a+ − ∆a.
In general, we will not be able to compute the error in a result, (for if we were
able to do so we would simply subtract that error from the computed result to get
the exact value) but we shall compute bounds on the magnitude of the error.
The absolute error of a is given by δ = |∆a| = |a − A| Since A is not usually
known we cannot evaluate the exact value of δ. Thus The limiting absolute error
δa of a is any number ≥ δ ( smallest possible number)

δ = |a − A| ≤ δa i.e. a − δa ≤ A ≤ a + δa

Example 2 For 2.71 ≤ e ≤ 2.72 we have δa = 0.01


For 2.717 ≤ e ≤ 2.720 we have δa = 0.003

Manalebish D: 2 2
An error of 0.01cm in a measurement of 10m is better than the same error in a
measurement of 1m. Thus
The relative error of a is given by

δ a−A a
ε= = = −1
|A| A A

for A ̸= 0(usually given in percentage)


This implies δ = |A|ε and The limiting relative error εa of a is a number ≥ ε
That is
εa ≥ ε δ ≤ |A|εa

We may take δa = |A|εa since a ≈ A we may write δa = |a|εa


From a − δa < A < a + δa . We get A = a(1 ± εa )
δ δa
Assuming A > 0, a > 0 and δa < a, we have ε = A ≤ a−δa . Thus take

δa δa
εa = ≈
a − δa a

Example 3 A result of R = 29.25 was obtained in determining the gas constant


for air. Knowing that the relative error of this value is 0.1%. find the limits within
which R lies.

1
Here εR = 0.1x 100 = 0.001 Then δR = RεR = (29.25)(0.001) ≈ 0.03 Therefore,
R − δR ≤ R ≤ R + δR Then 29.22 ≤ R ≤ 29.28.
Percentage error: The percentage error in a which is the approximate value of
A is given by ε × 100 = εa × 100 it also does not have units.

1.1 Sources of errors


Analysis of errors is the central concern in the study of numerical analysis and
therefore we will investigate the sources and types of errors that may occur in a
given problem and the subsequent propagation of errors.

Manalebish D: 3 3
1. Errors of the problem (instability) When setting up a mathematical model,
i.e. formulating the problem in mathematical terms.

2. Initial errors: This is due to numerical parameters such as physical con-


stants.(which are imperfect known)

3. Experimental (or inherent errors) These errors are found in the statement of
the problem and not in the solution. These are errors of the given data when
‘a’ is determined by physical measurements, the error depends upon the mea-
suring instrument. or due to the simplified assumption in the mathematical
formulation of a the problem.

Inherent errors can be minimized by obtaining better data , by using high


precision computing aids and by correcting obvious assumption in the formu-
lation.

4. Truncation (residual) errors This type of error is rising from the fact that
(finite or infinite) sequences of computational steps necessary to produce an
exact result is truncated prematurely after a certain number of steps. Trun-
cation error is a type of algorithm error. a good example is using Taylor series
formula for finite terms.

Example 4

x
X xn x2 x3
e = is approximated as ex = 1 + x + +
n=0
n! 2! 3!

5. Rounding errors This error is due to the limitation of the calculating aids,
numbers have to be rounded off during computations. It is a process of
dropping unwanted digits.

6. Programming errors (Blunders) These are due to human errors during pro-
gramming (in using computers) bugs/debugging. This can be avoided by
being careful

Manalebish D: 4 4
7. Machine errors This is due to machine malfunctions (Land calculators) usu-
ally it may be obtained as a result of a calculation involving several steps
each of which is subject to errors of one or more of the above steps.

1.2 Approximation of errors


It is unusual to say that the distance between two cities is 94.815 kms It is better to
say that the distance is 95 kms. Let a be any rational numbers (a > 0) terminating
or non-terminating. Then in base ten

a = αm 10m + αm−1 10m−1 + · · · + αm−n+1 10m−n+1 (1.1)

where αi for i = 0, 1, · · · , 9 are called the digits of a.αm ̸= 0, m ∈ Z

Example 5 215.3106 = 2 × 102 + 1 × 101 + 5 × 100 + 3 × 10−1 + 1 × 10−2 + 6 × 10−4

In scientific notation (floating point). we write

37500 = 3.75 × 104 = 3.75E04 = 3.75 + 04


0.00064 = 6.4 × 10−4 = 6.4E − 04 = 6.4 − 04

Significant digits (figures)are the numbers of digits used to express the number.
The digits 1, 2, 3, . . . , 9 are significant digits and ′ 0′ is also a significant figure except
when it is used to fix the decimal point or used to fill the space of discarded digits.
A significant digit of a number ‘a’ is any given digit of a, except possible for
zeros to the left of the first nonzero digit that serve only to fix the position of the
decimal point. Those which carry real information as to the size of the number
apart from exponential position. Significant digits are counted from left to right
starting with the left most non zero digit.
Decimal place express the number of digits after(to the right of) the decimal
point.

Manalebish D: 5 5
Example 6 The numbers 2384, 0.2384, 0.0002384 have 4 significant digits

2, 380, 000 = 2.38 × 106 with 3 significant digits and 2 decimal place
0.000486 = 4.86 × 10−4 with 3 significant digits and 2 decimal place
2.0682 contain 5 significant digits and 4 decimal place

We say that the first n significant digits of an approximate number are correct if
the absolute error does not exceed one half unit in the nth place. That is if in
equation (1.1)
1
δ = |a − A| ≤ 10m−n+1
2
Then the first n digits αm , αm−1 , · · · , αm−n+1 are correct (and we say the number
a is correct to n significant figures.)

Example 7

1. A = 35.97 ≈ 36.0 correct to 3 significant digits


since we want 3 significant digits we want to go up to 35.9 then the first of
the digits being left out is 7 > 5 hence rounding up gives 36.0 here the place
value of 7 is 10−2 implies n = 2

with

1 1 1
δ = |35.97 − 36.0| = 0.03 ≤ (10−n+1 ) = (10−2+1 ) = (10−1 ) = 0.05
2 2 2

2. A = 5.18 ≈ 5.2 correct to 2 significant digits


Since we want 2 significant digits we go up to 5.1 then the first of the digits
being left out is 8 > 5 hence rounding up gives 5.2 here the place value of 8
is 10−2 implies n = 2 with

1 1
δ = |5.18 − 5.2| = 0.02 ≤ (10−2+1 ) = (10−1 ) = 0.05
2 2

Manalebish D: 6 6
3. A = 1596 ≈ 1600 correct to 2 significant digits Since we want 2 significant
digits we go up to 15 then the first of the digits being left out is 9 > 5 hence
rounding up gives 16 here the place value of 9 is is 101 implies m = 1 with

1 1
δ = |1596 − 1600| = 4 ≤ (10m+1 ) = (101+1 ) = 50
2 2

4. A = 1796 ≈ 2000(= 2 × 103 ) correct to one significant digit Since we want


1 significant digits we go up to 1 then the first of the digits being left out is
7 > 5 hence rounding up gives 2 here the place value of 7 is is 102 implies
m = 2 with

1 1
δ = |1796 − 2000| = 204 ≤ (10m+1 ) = (102+1 ) = 500
2 2

1.3 Rounding off errors


Round off errors are errors due to computer imperfection.
Round off rule:is used to choose an approximate number that minimizes the round
off error. To round off to n significant digits, discard all digits to the right of the
nth significant digit as follows

1. If the first of the discarded digits is less than 5 leave the remaining digits
unchanged (rounding down)

2. If the first of the discarded digits is greater than 5, add 1 to the nth digit
(rounding up)

3. If it is 5, the last retained digit is left unchanged if even and increase by 1 if


odd. (even digit rule)

Example 8

Manalebish D: 7 7
6.125753 ≈ 6.1round to (1 decimal place) δ ≤ 12 10−1 = 0.05
Since we want 2 significant digits we go up to 6.1 then the first of the
digits being left out is 2 < 5 hence rounding down gives 6.1 here the
place value of 2 is 10−2 implies n = 2 with
δ = |6.125753 − 6.1| = 0.025753 ≤ 12 (10−2+1 ) = 12 (10−1 ) = 0.05
≈ 6.12 round to (2 decimal place) δ ≤ 12 10−2 = 0.005
≈ 6.126 round to (3 decimal place) δ ≤ 21 10−3 = 0.0005
≈ 6.1258 round to (4 decimal place) δ ≤ 21 10−4 = 0.00005
Since we want 5 significant digits we go up to 6.1257 then the first of the
digits being left out is 5 and since 7 is odd then even digit rule gives 6.1258
here the place value of 5 is 10−5 implies n = 5 with
δ = |6.125753 − 6.1258| = 0.000047 ≤ 21 (10−5+1 ) = 12 (10−4 ) = 0.00005

Rounding errors are most dangerous when we have to perform more arithmetic
operations.

22 355
Example 9 Approximate π = 3.14159265 using 7 and 113 correct to 2 decimal
place and 4 decimal place and find the corresponding absolute and relative errors.

22 355
= 3.1428571 = 3.1415929
7 113
22 355
δ1 = | − π| = 0.0012645 δ2 = | − π| = 0.0000002668
7 113
δ1 δ2
ε1 = = 4.025 × 10−4 ε2 = = 8.49 × 10−8
|π| |π|

1.4 Propagation of errors


Suppose a′ is a computed result of a number a (a′ ∈ Q). The initial error is a′ − a
while the difference δ1 = f (a′ ) − f (a) is the corresponding approximation error. If
f is replaced by a simpler function of f1 (say a power series representation of f )

Manalebish D: 8 8
then δ2 = f1 (a′ ) − f (a′ ) is the truncation error. But in calculations we obtain, say,
f2 (a′ ) instead of f1 (a′ ) which is wrongly computed value of a wrong function of a
wrong argument. The difference δ3 = f2 (a′ ) − f1 (a′ ) is termed as the error from
the rounding. The total error is then the propagating error δ = f2 (a′ ) − f (a) =
δ1 + δ2 + δ3 .
1
Example 10 Determine e 3 with 4 decimal places.
We compute e0.3333 instead of e0.3̇ with initial error
1
δ1 = e0.3333 − e 3 = e0.3333 1 − e0.0000333... = −0.0000465196


2 3 4
Next, we compute ex from ex = 1 + x + x2! + x3! + x4! for x = 0.3333 with truncation
error
(0.3333)2 (0.3333)3 (0.3333)4
 
δ2 = 1 + 0.3333 + + +
2! 3! 4!
(0.3333)2 (0.3333)3 (0.3333)4
 
− 1 + 0.3333 + + + + ...
2! 3! 4!
(0.3333)5 (0.3333)6
 
= − + + . . . = −0.0000362750
5! 6!
Finally, the summation of the truncated series is done with rounded values giving
the result
x2 x3 x4
1+x+ + + = 1 + 0.3333 + 0.0555 + 0.0062 + 0.0005 = 1.3955
2! 3! 4!
instead if we go upto 10 decimal places we would have 1.3955296304 Then

δ3 = 1.3955296304 − 1.3955 = −0.0000296304

The total error is δ = δ1 + δ2 + δ3 = −0.000112425 and


1
1.3955 − e 3 = −0.000112425

Note:-
Investigation of error propagation are important in iterative processes and compu-
tations where each value depends on its predecessors

Manalebish D: 9 9
1.5 Instability
In some cases one may consider a small error negligible and want to suppress it
and after some steps the accumulated error may have a fatal error on the solution.
Small changes in initial data may produce large changes in the final results.
This property is known as ill-conditioned. ill-conditioned problem of computing
output value y from input value x by y = g(x) : when x is slightly perturbed to x
the result y = g(x) is far from y
A well conditioned problem has a stable algorithm of computing y = f (x), The
out put y is the exact result y = f (x), for a slightly perturbed input x which is close
to the input x. Thus if the algorithm is stable and the problem is well conditioned
the computed result y is close to the exact y
Algorithm is a systematic procedure that solves a problem. It is said to be
stable if its output is the exact result of a slightly perturbed input.
Numerical instability is a concept that refers to the propensity of an algo-
rithm or computational procedure to produce inaccurate results due to round-off
errors, truncation errors, or other computational issues. These errors may
be small initially but can accumulate and escalate in the course of iterations, lead-
ing to results that are significantly far-off from the expected or precise value.
Numerical stability is essential in performing precise and consistent compu-
tational operations. When an algorithm is numerically stable, it ensures that the
round-off or truncation errors do not markedly affect the end result.
Performance features that may be expected from a good numerical algorithm.
Accuracy:- This is related to errors, how accurate is the result going to be when
a numerical algorithm is run with some particular input data.
efficiency:- How fast can we solve a certain problem, rate of convergence of
floating point operations
If an error stays at one point in an algorithm and does not aggregate further
as the calculation continues, then it is considered a numerically stable error. This

Manalebish D: 10 10
happens when the error causes only a very small variation in the formula result.
If the opposite occurs and error propagates bigger as the calculation continuous,
then it is considered numerically unstable.

Manalebish D: 11 11

You might also like