0% found this document useful (0 votes)
9 views6 pages

Lec 1

The document introduces numerical methods, which are algorithms used to find numerical solutions when analytical solutions are impractical or non-existent. It discusses the importance of accuracy, significant figures, and the types of errors encountered in numerical computations, including blunders, modeling errors, data uncertainty, and discretization errors. Additionally, it defines absolute and relative errors, as well as roundoff and truncation errors, emphasizing the need for error analysis in scientific computing.

Uploaded by

11fatimakhalid
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)
9 views6 pages

Lec 1

The document introduces numerical methods, which are algorithms used to find numerical solutions when analytical solutions are impractical or non-existent. It discusses the importance of accuracy, significant figures, and the types of errors encountered in numerical computations, including blunders, modeling errors, data uncertainty, and discretization errors. Additionally, it defines absolute and relative errors, as well as roundoff and truncation errors, emphasizing the need for error analysis in scientific computing.

Uploaded by

11fatimakhalid
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/ 6

Lec 1

Introduction
Numerical Methods
Algorithms that are used to obtain numerical solutions of a mathematical problem.
Why do we need them?
• No analytical solution exists,
• An analytical solution is difficult to obtain or not practical.
Basic Needs in the Numerical Methods:
Practical:
Can be computed in a reasonable amount of time.
Accurate:
• Good approximate to the true value,
• Information about the approximation error (Bounds, error order,… ).

Difference between exact and approximate


There are two of numbers, exact and approximate numbers. An approximate number x is a
number that differs but slightly from an exact number.
3 5
For example the number 1, 2, …,4 , 8 , … 𝜋, √2 , 𝑒 , ..etc are all exact. However 1.41 and 1.414
are approximate values of √2, Similarly 3.14, 3.141, 3.14159,.. are all approximate values of
𝜋.
Definition
The significant figures of a given number are those significant or important digits, which
convey the meaning according to its accuracy. For example, 6.658 has four significant digits.
These substantial figures provide precision to the numbers. They are also termed as significant
digits.
Rules for Significant Figures
• All non-zero digits are significant. 198745 contains six significant digits.
• All zeros that occur between any two non-zero digits are significant. For example,
108.0097 contains seven significant digits.
• All zeros that are on the right of a decimal point and also to the left of a non-zero digit
is never significant. For example, 0.00798 contained three significant digits.
• All zeros that are on the right of a decimal point are significant, only if, a non-zero digit
does not follow them. For example, 20.00 contains four significant digits.
• All the zeros that are on the right of the last non-zero digit, after the decimal point, are
significant. For example, 0.0079800 contains five significant digits.
• The number 2025000 may have four, five, six or seven significant digits depending
upon the situation. The conventional form of writing numbers somewhat ambiguous in
this instance
Significant Figures Examples
Q.1: Identify the number of significant digits/figures in the following given numbers.
45, 0.046, 7.4220, 5002, 300.0
Solution:
Number Number of Significant digits/figures
45 Two
0.046 Two
7.4220 Five
5002 Four
300.0 Four
Q.2: Write 12.378162 correct to 4 significant digits.
Solution:
The number 12.378162, rounded to 4 significant digits is 12.38
Hence, 12.38 is the answer.
Rounding Off Numbers
The process of cutting the numbers is called rounding off.
Rules: In order to round-off a number to n significant digits if the discarded digit is
• Less than 5, Leave the remaining digits unchanged.
• Greater than 5, add 1 to the last retained digit.
• Exactly 5 and there are non-zero digits among those discarded, add unity to the last
retained digit. However, if the first discarded digit is exactly 5 and all the other
discarded digits are 0, the last retained digit is left unchanged if even, and is increased
by unity if odd.
Errors:
Occurrence of error is unavoidable in the field of scientific computing. Instead, numerical
analysts try to investigate the possible and best ways to minimize the error. The study of the
error and how to estimate and minimize it are the fundamental issues in error analysis.
1.1 Error Analysis
In numerical analysis we approximate the exact solution of the problem by using numerical
method and consequently an error is committed. The numerical error is the difference between
the exact solution and the approximate solution.

Definition 2 (Numerical Error). Let x be the exact solution of the underlying problem and x∗
its approximate solution, then the error (denoted by e) in solving this problem is
𝑒 = 𝑥 − 𝑥∗
1.2 Sources of Error in Numerical Computations

Blunders (Gross Errors)


These errors also called humans errors, and are caused by human’s mistakes and oversight and
can be minimized by taking care during scientific investigations. These errors will add to the
total error of the underlying problem and can significantly affect the accuracy of solution.
Modelling Errors
These errors arise during the modelling process when scientists ignore effecting factors in the
model to simplify the problem. Also, these errors known as formulation errors.
Data Uncertainty
These errors are due to the uncertainty of the physical problem data and also known as data
errors.
Discretization Errors
Computers represent a function of continuous variable by a number of discrete values. Also,
scientists approximate and replace complex continuous problems by discrete ones and this
results in discretization errors.

1.3 Absolute and Relative Errors


Definition 3 (Absolute Error). The absolute error 𝑒̂ of the error e is defined as the absolute
value of the error e
𝑒̂ = |𝑥 − 𝑥 ∗ |.

Definition 4 (Relative Error). The relative error 𝑒̌ of the error e is defined as the ratio between
the absolute error 𝑒̂ and the absolute value of the exact solution x
𝑒̂ |𝑥 − 𝑥 ∗ |
𝑒̌ = = ,𝑥 ≠ 0
|𝑥| |𝑥|

Example 2.
Let x = 3.141592653589793 is the value of the constant ratio π correct to 15 decimal places
and x ∗ = 3.14159265 be an approximation of x. Compute the following quantities:
a. The error.
b. The absolute error.
c. The relative error.
1.4 Roundoff and Truncation Errors
Computers represent numbers in finite number of digits and hence some quantities cannot be
represented exactly. The error caused by replacing a number a by its closest machine number
is called the roundoff error and the process is called correct rounding.
Truncation errors also sometimes called chopping errors are occurred when chopping an
infinite number and replaced it by a finite number or by truncated a series after finite number
of terms.
Example 3. Approximate the following decimal numbers to three digits by using rounding and
chopping (truncation) rules:

You might also like