Lec #1 Introduction
Lec #1 Introduction
Lec #1 Introduction
By
INTRODUCTION
Lec # 1
1
NUMERICAL METHODS
INTRODUCTION
Numerical Analysis involves the study of methods of computing
numerical data. In many problems this implies producing a sequence
of approximation by repeating the procedure again and again. People
who employ numerical methods for solving problems must worry
about the following issues:
➢ the rate of convergence (how long does it take for the method to
find the answer).
➢ the accuracy (or even validity) of the answer.
➢ the completeness of the response (do other solutions in addition of
the one found, exist). 2
Numerical Methods provide approximations to the problems in
question. No matter how accurate they are they don't, in most cases,
provide the exact answer. In some instances, working out the exact
answer by a different approach may not be possible or may be too
time consuming and it is in these cases where numerical methods are
most often used.
3
APPROXIMATIONS AND ERRORS
OR
ESTIMATION OF ERRORS
EXACT NUMBERS:
Numbers with which no uncertainty is associated, or no approximation is
taken, are known as exact numbers.
3 2
For example: 5, , , … are exact numbers.
6 3
APPROXIMATE NUMBERS:
There are numbers which are not exact e.g 2 = 1.41421356 … , and
e = 2.718281828 … etc. are not exact numbers.
Since they contain infinitely many non-recurring digits.
The numbers obtained by retaining a few digits are called
approximate numbers.
Consider the numbers 𝜋 ≅ 3.142, e = 2.718
(Read ≅ approximately equal to) 3.142, 2.718 are the approximate
values of 𝜋, e .
4
SIGNIFICANT DIGITS / FIGURES
The significant figures in a measurement include all the digits that
are known, plus a last digit that is which is uncertain or is estimated.
For Example: Study the diagram below
Using the ruler at the top of the diagram, what is the length of the darker rectangle
found in between the two rulers?
Answer: The length is between 4 and 5 cm. The “4” is certain, but the distance past 4
cm will have to be estimated. A possible estimate might be 4.3. Both digits are
significant. The first digit is certain, and the second digit is uncertain because it is an
estimate. 5
Determining Significant Figures in Measurements
To determine whether a digit in a measured value is significant, you
need to apply the following rules.
Rule 1: Every nonzero digit is significant
For Example:
➢ 438
➢ 714 Each of these measurements has THREE
➢ 0.743 significant digits.
➢ 26.4
9
EXAMPLE:
How many significant figures are in each measurement? Give the
rule(s) for counting significant figures
a. 123 m
3 Significant digits
(all nonzero numbers)
b. 40,506 mm
5 Significant digits
❖ all nonzero numbers
❖ sandwich zeros
c. 9.8000 x 104 m
5 Significant digits
(trailing zeros with a decimal are significant)
10
ROUND-OFF NUMBERS:
2
If we divide 2 by 7, we get = 0.285714 … , a quotient which is a
7
non-terminating decimal fraction. For using such number in practical
computation, it is to be cut-off to a manageable size such as 0.29, 0.286,
0.2857, …
The process of cutting-off super-fluous digits and retaining as many digits
as desired is known as “ ROUNDING-OFF A NUMBER”.
The rule of rounding-off a number to “ 𝑘 ” decimal is as follows.
Discard the “ (𝑘 + 1)𝑡ℎ ” and all subsequent decimals.
a) If the number thus discarded is less than half a unit in the (𝑘 + 1)𝑡ℎ
place, leave the 𝑘 𝑡ℎ decimal place unchanged. (i.e., rounding down).
b) If the number thus discarded is greater than half a unit in the (𝑘 + 1)𝑡ℎ
place, add one of the 𝑘 𝑡ℎ decimal place. (i.e., rounding up).
12
EXAMPLE:
Round off each measurement to the number of significant figures
shown in parentheses.
a. 314.721 meters (four)
b. 0.001 775 meter (two)
c. 8792 meters (two)
SOLUTION:
a. 314.721 meters (four)
314.7
b. 0.001 775 meter (two)
0.0018
c. 8792 meters (two)
8800
13
Scientific Notation:
An expression of numbers in the form 𝑚 × 10𝑛 , where 𝑚 is equal to
or greater than 1 and less than 10, and 𝑛 is an integer.
For Example:
➢ The Scientific notation of 0.0018 = 1.8 × 10−3 .
➢ The Scientific notation of 8800 = 8.8 × 103 .
14
ABSOLUTE, RELATIVE & PRECENTAGE ERROR:
The accuracy of any computation is always of great importance.
These are three common ways to express size of the error in a
computed result.
a) ABSOULTE ERROR: If 𝑥 ′ is the approximate value of exact
number 𝑥, the absolute error (A E) is defined as
Absolute Error = 𝐴𝐸 = |𝑥 − 𝑥 ′|
b) RELATIVE ERROR: Relative error is defined as
𝑥−𝑥′ |𝑥 − 𝑥 ′| 𝐴𝐸
Relative Error = 𝐴𝐸 = = =
𝑥 𝑥 |𝑇𝑟𝑢𝑒 𝑣𝑎𝑙𝑢𝑒|
c) PRECENTAGE ERROR
The percentage error in 𝑥 ′ which is the approximate value of 𝑥
𝐴𝐸 |𝑥 − 𝑥 ′|
Precentage Error = 𝑅𝐸 × 100 = 100 × = 100 ×
|𝑇𝑟𝑢𝑒 𝑣𝑎𝑙𝑢𝑒| 𝑥
15
EXAMPLE:
If 0.333 is the approximate value of 1/3, find absolute, relative and
percentage errors.
Solution True value = 𝑥 = 1/3
Approximate value = 𝑥 ′ = 0.333
1 1 333 1
Absolute error = 𝑥 − 𝑥′ = − 0.333 = − = = 0.00033
3 3 1000 3000
|𝑥 − 𝑥 ′| 0.00033
Relative Error = 𝑅𝐸 = = = 0.00099
𝑥 1/3
16
EXERCISE
Question # 1 How many significant digits are in each of the
following examples?
1) 47.1 Answers:
2) 9700. 1) 3
3) 0.005965000 2) 4
4) 560 3) 7
5) 0.0509 4) 2
5) 3
6) 701.905
6) 6
7) 50.00
7) 4
8) 50.012
8) 5
9) 0.000009 9) 1
10) 0.0000104 10) 3
17
Question # 2 Determining Significant Digits When Rounding
1) 689.683 grams (4 significant digits)
2) 0.007219 (2 significant digits)
3) 4009 (1 significant digit)
4) 39.21 × 10−1 (1 significant digit)
5) 8792 (2 significant digits) Answers
6) 309.00275 (5 significant digits) 1) 689.7
7) .1046888 (3 significant digits) 2) 0.0072
3) 4000
4) 4 x 10-1
5) 8800
6) 309.00
7) .105
18