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

Numerical Chapter-1

This document provides an overview of numerical analysis and sources of error in numerical computations. It discusses numerical methods for approximating solutions to mathematical problems since analytic methods are often impossible. Errors arise from modeling assumptions, input data uncertainty, limitations of numerical methods, and round-off errors from finite precision arithmetic on computers. The document outlines common sources of error, including modeling error from simplifying assumptions, data uncertainty from measurements, errors inherent to numerical methods, and computational errors from round-off during calculations.

Uploaded by

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

Numerical Chapter-1

This document provides an overview of numerical analysis and sources of error in numerical computations. It discusses numerical methods for approximating solutions to mathematical problems since analytic methods are often impossible. Errors arise from modeling assumptions, input data uncertainty, limitations of numerical methods, and round-off errors from finite precision arithmetic on computers. The document outlines common sources of error, including modeling error from simplifying assumptions, data uncertainty from measurements, errors inherent to numerical methods, and computational errors from round-off during calculations.

Uploaded by

wondosen.l
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

NUMERICAL ANALYSIS CHAPTER ONE

Table of Contents
Unit-1: Errors in numerical computations ................................................................................. 2
1.1 Introduction ......................................................................................................................... 2
1.2 Some Mathematical preliminaries ................................................................................ 3
1.2.1 Theorem (Intermediate value theorem) ..................................................................... 3
1.2.2 Theorem (Location theorem) ....................................................................................... 3
1.2.3 Theorem (Mean value theorem) .................................................................................. 3
1.2.4 Theorem (Taylor’s theorem) ....................................................................................... 3
1.3 Errors ................................................................................................................................... 3
1.3.0 Definition of Error ........................................................................................................ 3
1.4 Sources of Errors ............................................................................................................. 3
1.4.1 Modeling Error ............................................................................................................. 4
1.4.2 Data Uncertainty........................................................................................................... 4
1.4.3 The numerical Methods used....................................................................................... 4
1.4.4 Computational Error ................................................................................................... 4
1.5 Types Error.......................................................................................................................... 5
1.5.1Inherent Error ............................................................................................................... 5
1.5.2 Round off Error ............................................................................................................ 5
1.5.3. Truncation Error ......................................................................................................... 5
1.5.4. Absolute, Relative and Percentage Error .................................................................. 5
1.6 Decimal places and Significant Digits................................................................................ 6
1.7 Propagation of Errors in Function Evaluations ............................................................... 7

1
NUMERICAL ANALYSIS CHAPTER ONE

Unit-1: Errors in numerical computations


1.1 Introduction
In talking real situations in our daily lives, we encounter a wide range of mathematical
problems related to engineering, physical life and social sciences, business, economics,
industry and others. To make decision in these disciplines, there is a high demand of solving
such problems and seeking numerical answers. There are generally two methods in which we
solve mathematical problems: analytic and numerical methods.
Analytic Methods: are those which produce exact solutions for mathematical problems. If it
is possible it is usually best to use these solutions. However, it is difficult or impossible to
obtain exact solutions for most practical problems. Consequently, analytic methods have
limited practical application and use only for few classes of mathematical problems.
Numerical Methods: are those by which approximate solutions are obtained for mathematical
problems. These methods involve large number of tedious arithmetic calculations. However,
the development of fast and efficient digital computers has simplified the calculation and hence
the role of numerical methods in solving mathematical problems has increased dramatically in
recent years. Numerical methods may divided in to two types: direct and iterative methods.
Direct Methods: refers to a procedure for computing a solution using a formula that is
mathematically exact. In practice, since the computer works with a limited memory, direct
methods are subjected to rounding errors and hence they don’t give exact solutions.
Iterative Methods: starts with an initial approximation and which, by applying suitable chosen
procedures, leads to successive better approximations. The process will be repeated until the
required accuracy is achieved. Iterative methods are often preferred over direct methods
because of simpler programming requirements or computer memory size limitation, even
though the direct method may seem simpler to explain and use.
Numerical Analysis
Numerical Analysis: is concerned with mathematical derivation of numerical methods,
designing an algorithm for the methods, implementation of these algorithms on computers and
analysis of the error associated with the methods.
In numerical analysis, the process of solving mathematical problems involves the following
three phases.
Phase 1: Identify the problems to be solved. It requires, depth analysis of mathematical
equations, providing the input and output data and describing their relationships.
Phase2: Designing an algorithm. An algorithm is a complete and unambiguous set of
procedures that will determine the answer to a problem with a finite steps.

2
NUMERICAL ANALYSIS CHAPTER ONE

Phase3: The designed algorithm will be coded or translated to a computer language. This
process is called programming.

1.2 Some Mathematical preliminaries


1.2.1 Theorem (Intermediate value theorem)
If 𝑓 is continuous on [𝑎, 𝑏] and 𝑘 is a number between 𝑓(𝑎) and𝑓(𝑏), then there exists a
number 𝑐 in (𝑎, 𝑏) such that𝑓(𝑐) = 𝑘.

1.2.2 Theorem (Location theorem)


If 𝑓 is continuous on[𝑎, 𝑏], 𝑓(𝑎)𝑓(𝑏) < 0 , then there exists a number 𝑐 in (𝑎, 𝑏) such
that𝑓(𝑐) = 0.

1.2.3 Theorem (Mean value theorem)


If 𝑓 is continuous on [𝑎, 𝑏] and differentiable on(𝑎, 𝑏), then there exists a number 𝑐 in (𝑎, 𝑏)
𝑓(𝑏)−𝑓(𝑎)
such that𝑓 ′ (𝑐) = .
𝑏−𝑎

1.2.4 Theorem (Taylor’s theorem)


Suppose 𝑓 has 𝑛 + 1 continuous derivatives on [𝑎, 𝑏] , then 𝑓 can be expressed near 𝑥 = 𝑥0 in
[𝑎, 𝑏] as:

𝑓 ′′ (𝑥0 )(𝑥 − 𝑥0 )2 𝑓 (𝑛) (𝑥0 )(𝑥 − 𝑥0 )𝑛
𝑓(𝑥) = 𝑓(𝑥0 ) + 𝑓 (𝑥0 )(𝑥 − 𝑥0 ) + + ⋯+ +⋯
2 𝑛!
1.3 Errors
1.3.0 Definition of Error

Error = true value – approximate value

For numerical methods, the true value will be known only when we deal with functions that can
be solved analytically. However, in real world applications, we can’t obtain exact solutions and
consequently we can’t compute the associated errors. For these situations, an alternative is to use
the best available estimate of the true value.

Errors are deliberate but often unavoidable part of the solution process, are not mistakes which are
attributed due to human imperfection or malfunctions of computers.

1.4 Sources of Errors

The following are the main sources of error in obtaining numerical solutions to mathematical
problems.

3
NUMERICAL ANALYSIS CHAPTER ONE

1.4.1 Modeling Error

A mathematical modeling for physical solution is an attempt to give mathematical relationships


between certain quantities or parameters of the physical situations. Because of the complexity of
physical reality, a Varity of simplifying assumptions are used to construct more tractable
mathematical models. The resulting model has limitations on its accuracy as consequence of these
assumptions, and these limitations may or may not be troublesome, depending on the uses of the
model. In the case that the model is not accurate, no numerical method will improve this basic lack
of accuracy.

1.4.2 Data Uncertainty

Input data from a physical problem may contain error or inaccuracy within it associated with
measurement or previous computations. This affects the accuracy of any calculation based on the
data, limiting the accuracy of answers. Hence, there may be an error involved due to uncertainty
of physical data.

1.4.3 The numerical Methods used

In most cases numerical methods are approximate by themselves, that is even if the initial data are
void of errors all the arithmetic operations are identically performed, they yield the solution of the
original with some error which is called the error of the method. In a number of cases the
numerical method is constructed on the basis of an infinite process which leads the desired solution
(for instance computing the value of an elementary function with the aid of partial sums of power
series in to which this function is expanded). But in reality, the passage of the limit usually fails to
be realized and the process interrupted at a certain step yields an approximation.

1.4.4 Computational Error

In numerical computations, we usually come across two types of errors:

Round off Error: arises because it is impossible to represent all real numbers exactly on a finite
state machine since a world in a computer memory stores only a finite number of digits and hence
a computer numbers have limited number of digits. We are forced to cut off some of the digits of
1
a number. For example, 3 , 𝑒, 𝑎𝑛𝑑 𝜋.

Truncation Error: is caused by the fact that when an exact mathematical procedure is replaced
by another to make it easier to solve a problem.

𝑥2 𝑥3
Example if 𝑒 𝑥 = 1 + 𝑥 + + + ⋯+ ⋯∞ = 𝑋
2! 3!

𝑥2 𝑥3
Is replaced by 1 + 𝑥 + + = 𝑋′
2! 3!

4
NUMERICAL ANALYSIS CHAPTER ONE

Then the truncation error is |𝑋 − 𝑋 ′ |

1.5 Types of Error

In any numerical computation, we come across the following types of errors


1.5.1 Inherent Error

Error which are already present in the statement of a problem before its solution are called
inherent errors. Such errors arise either due to the given data being approximate or due to the
limitations of mathematical tables, calculators or the digital computer. Inherent errors can be
minimized by taking better data or by using high precision computing aids.

1.5.2 Round off Error

Arises because it is impossible to represent all real numbers exactly on a finite state machine since
a world in a computer memory stores only a finite number of digits and hence a computer numbers
have limited number of digits. We are forced to cut off some of the digits of a number

1.5.3. Truncation Error

Caused by the fact that when an exact mathematical procedure is replaced by another to make it
easier to solve a problem.

1.5.4. Absolute, Relative and Percentage Error

If 𝑋 is the true value of a quantity and 𝑋 ′ is its approximate value, then

I. 𝐸𝑎 = |𝑋 − 𝑋 ′ | is absolute error .
𝐸
II. 𝐸𝑟 = |𝑋|𝑎 is relative error.
III. 𝐸𝑝 = 100𝐸𝑟 % is percentage error.

Example
1
The three approximation of 3 are given as 0.30, 0.33, and 0.34

a. Find 𝐸𝑎 , 𝐸𝑟 and 𝐸𝑝 for each approximation.


b. Which of these is the best approximation?
Solution
Note: b. the smallest the error gives the best approximation

5
NUMERICAL ANALYSIS CHAPTER ONE

1.6 Decimal places and Significant Digits

1. A number is rounded off by dropping one or more digits at its right. If the digit to be
dropped is less than 5, then we leave the digit to its left as it is and if the digit to be
dropped greater than or equal to 5, then we increase the digit to its left by 1.
2. Let 𝑥 be a real number having decimal representation
𝒙 = 𝒂𝒏 𝒂𝒏−𝟏 𝒂𝒏−𝟐 … 𝒂𝟐 𝒂𝟏 𝒂𝟎 . 𝒅𝟏 𝒅𝟐 … 𝒅𝒌 𝒅𝒌+𝟏 𝒅𝒌+𝟐 …

We say that 𝒙 has been correctly rounded to a 𝒌 decimal places number, which we denote it by

𝒂𝒏 𝒂𝒏−𝟏 𝒂𝒏−𝟐 … 𝒂𝟐 𝒂𝟏 𝒂𝟎 . 𝒅𝟏 𝒅𝟐 … 𝒅𝒌 𝒊𝒇 𝒅𝒌+𝟏 < 𝟓


𝒅𝒌 (𝒙) = {
𝒂𝒏 𝒂𝒏−𝟏 𝒂𝒏−𝟐 … 𝒂𝟐 𝒂𝟏 𝒂𝟎 . 𝒅𝟏 𝒅𝟐 … 𝒅𝒌 + 𝟏 × 𝟏𝟎−𝒌 , 𝒊𝒇 𝒅𝒌+𝟏 ≥ 𝟓

Example

If 𝒙 = 𝟗𝟐. 𝟓𝟎𝟕𝟔𝟐𝟑 then find

a. 𝒅𝟑 (𝒙)
b. 𝒅𝟒 (𝒙)
c. 𝒅𝟖 (𝒙)
3. We say 𝑋 ′ approximates 𝑋 correct to 𝑘 decimal places, if 𝑘 is the largest positive
integer such that the absolute error
𝑬𝒂 (𝑿′ ) = |𝑿 − 𝑿′ | ≤ 𝟎. 𝟓 × 𝟏𝟎−𝒌

Example

If 𝑿 = 𝟎. 𝟎𝟎𝟑𝟏𝟕𝟓𝟖, 𝒕𝒉𝒆𝒏 𝑿′ = 𝟎. 𝟎𝟎𝟑𝟐 approximates 𝑿 correct to 4 decimal places.

Check that |𝑿 − 𝑿′ | ≤ 𝟎. 𝟓 × 𝟏𝟎−𝒌?

4. The following rules apply to find the number of significant digits in a number.
i. All nonzero digits in the number are significant.
ii. Zeros between nonzero digits in the number are significant.
iii. Zeros to the left of the first nonzero digit in the number are not significant.
iv. When the number ends in zeros that are to the right of the decimal point,
these zeros are significant.
v. When the number ends in zeros that are not to the right of the decimal point,
these zeros are not necessary significant.

6
NUMERICAL ANALYSIS CHAPTER ONE

Example

Identify the number of significant digits for the following decimals

a. 0.31416 (𝒊 ← 𝟓)
b. 102.3 (𝒊𝒊 ← 𝟒)
c. 0.000045 (𝒊𝒊𝒊 ← 𝟐)
d. 127 (𝒊 ← 𝟑)
e. 0.0494200000 (𝒊𝒊𝒊&𝒊𝒗 ← 𝟗)
f. 29000 (𝒗 ← 𝟐, 𝟑, 𝟒, 𝒐𝒓 𝟓)

5. An approximation 𝑿 of the number 𝑿 correct to n significant digits if n is the largest
positive integer such that the absolute error
𝑬𝒂 (𝑿′ ) = |𝑿 − 𝑿′ | ≤ 𝟎. 𝟓 × 𝟏𝟎𝑺−𝒏+𝟏 Where S is the largest integer such that
10𝑆 ≤ |𝑋|

Example: if 𝑋 = 135.2469208 , then 𝑋 ′ = 135.247 approximate 𝑋 correct to 6 significant


digits. Check that|𝑋 − 𝑋 ′ | ≤ 0.5 × 10𝑆−𝑛+1 ? (0.0000792 ≤ 0.5 × 102−6+1 = 0.0005)

6. Writing a number 𝑿 in scientific notation is to put 𝑿 in the form


±𝑎 × 10𝑛 𝑤ℎ𝑒𝑟𝑒 1 ≤ 𝑎 < 10 and n is an integer.

Example

Approximate 63459286 correct to 3 significant digits.(ans. 6.35x104)

1.7 Propagation of Errors in Function Evaluations

Let 𝑦 = 𝑓(𝑥) be a function that depends on 𝑥 which is in error. Let the absolute error in
𝑥 𝑏𝑒 ∆𝑥. Then, we have 𝑦 + ∆𝑦 = 𝑓(𝑥 + ∆𝑥)
The error in 𝑦 is given by ∆𝑦 = 𝑓(𝑥 + ∆𝑥) − 𝑓(𝑥)
From Taylor’s series we have
𝑓 ” (𝑥)∆𝑥 2 𝑓 ′′′ (𝑥)∆𝑥 3
𝑓(𝑥 + ∆𝑥) = 𝑓(𝑥) + 𝑓 ′ (𝑥)∆𝑥 + + +⋯
2! 3!

Dropping the second and higher order derivatives and rearranging we get

𝑓(𝑥 + ∆𝑥) − 𝑓(𝑥) = 𝑓 ′ (𝑥)∆𝑥

Hence the absolute error in 𝑦 can be estimated by ∆𝑦 = |𝑓 ′ (𝑥)|∆𝑥

7
NUMERICAL ANALYSIS CHAPTER ONE

Similarly if 𝑦 = 𝑓(𝑥1 , 𝑥2 , 𝑥3 , … , 𝑥𝑛 ) is a function of several variables with an error in each 𝑥𝑖 be


∆𝑥𝑖 , then

𝜕𝑦 𝜕𝑦 𝜕𝑦 𝜕𝑦
∆𝑦 = |𝜕𝑥 | ∆𝑥1 + |𝜕𝑥 | ∆𝑥2 + |𝜕𝑥 | ∆𝑥3 + ⋯ + |𝜕𝑥 | ∆𝑥𝑛
1 2 3 𝑛

Example

a. Let 𝑦 = 2𝑥 3 − 5𝑥 2 + 2 and 𝑥 = 1 & ∆𝑥 = 0.001

Find ∆𝑦

b. Let = 5𝑥 3 𝑦 2 𝑧 . Given that 𝑥 = 3, 𝑦 = 1, 𝑎𝑛𝑑 𝑧 = 2 with errors 0.003, 0.001, and 0.002
respectively. Find errors in 𝑤

You might also like