Numerical 1

Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

NUMERICAL ANALYSIS

CHAPTER-ONE

BASIC CONCEPTS IN ERROR ESTIMATION

For many engineering problems, we cannot obtain analytical solutions.


Numerical Methods are methods for solving problems on computers by
numerical calculations and/or graphical representations or figures.
Numerical Methods tend to emphasize the implementation of algorithms.
Numerical Methods yield approximate results that are close to the exact analytical
solution.
We cannot exactly compute the errors associated with Numerical Methods.
There are two kinds of numbers—exact and approximate numbers.

An approximate number 𝑿𝑨 is a number that differs, but slightly, from an exact number 𝑿𝑬 and
is used in place of the latter in calculations.
𝟑 𝟑
Example: - 𝟏, 𝟐, 𝟑, … , , , … , 𝑒𝑡𝑐 are all exact, 𝝅, √𝟐 , 𝒆, … , 𝑒𝑡𝑐., written in this manner are
𝟒 𝟓
also exact. 1.41 is an approximate value of √𝟐 , and 1.414 is also an approximate value of √𝟐 .
Similarly, 3.14, 3.141, 3.14159, …, etc., are all approximate values of 𝝅.such numbers which
represents the given numbers to certain degree of accuracy are called Approximate numbers.

SIGNIFICANT DIGITS
 The digits that are used to express a number are called significant digits.
Two notational conventions which make clear how many digits of a given number are significant
are given below.
1. The significant digits in a number in positional notation consist of:
(a) All non-zero digits and
(b) Zero digits which
(i) Lie between significant digits
(ii) Lie to the right of decimal point, and at the same time to the right of a non-zero digit.
(iii) Are specifically indicated to be significant
2. The significant figure in a number written in scientific notation (𝑀 × 10 ) consists of all
the digits explicitly in M.
Example: -
Number Significant Figures No. of Significant figures
21.36 2, 1, 3, 6 4
6030 6, 0, 3 3
6.00 6, 0, 0 3
0.00082 8, 2 2
0.000620 6, 2, 0 3
𝟓. 𝟐 × 𝟏𝟎𝟒 5, 2 2
𝟑. 𝟓𝟎𝟔 × 𝟏𝟎 3, 5, 0, 6 4
5.3800 x 104 5,3,8,0,0 5
0.00001753 1,7,5,3 4

1
NUMERICAL ANALYSIS

Accuracy. How close a computed or measured value to the true value.


Precision (or reproducibility). How close a computed or measured value to
previously computed or measured values.
Inaccuracy (or bias). A systematic deviation from the actual value.
Imprecision (or uncertainty). Magnitude of scatter.
(a) Inaccurate and imprecise, (b) accurate and imprecise, (c) inaccurate and
precise, (d) Accurate and precise

Fig 1: Concepts of Accuracy and Precisions

2
NUMERICAL ANALYSIS

ROUNDING OFF NUMBERS


 The process of dropping unwanted digits is called Rounding off.

Rounding-off rule in order to round-off a number to n significant digits drop all the digits to the
right of the 𝒏𝒕𝒉 significant digit or replace them by ‘0’s’ if the ‘0’s’ are needed as place holders,
and if this discarded digit is
1. Less than 5, leave the remaining digits unchanged
2. Greater than 5, add 1 to the last retained digit
3. Exactly 5 and there are non-zero digits among those discarded, add unity to the last retained
digit.
Example:
Rounded-off to
Number Three digits Four digits
00.522341 00.522 00.5223
93.2155 93.2 93.22
00.66666 00.667 00.6667
84767 84800 84770
5.8255 5.82 5.826

ERRORS
 One of the most important aspects of numerical analysis is the error analysis. Errors may
occur at any stage of the process of solving a problem.
By the error we mean the difference between the true value and the approximate value.
∴ Error = True value (𝑿𝑬 ) – Approximate value (𝑿𝑨 ).
Types of Errors
In any Numerical Computational, we come across the following types of errors
1) Inherent errors: Most of numerical computations are inexact either due to the given data
or due to the limitations of the computing aids such as Mathematical tables, Desk
Calculators or the digital computers. Due to these limitations’ numbers have to be
rounded causing errors called inherent errors. Inherent errors are the errors that pre-
exist in the problem statement itself before its solution is obtained. These errors cannot be
completely eliminated but can be minimized if we select better data or by employing high
precision computer computations.
Example: The area of a circle is computed by 𝐴 = 𝜋𝑟 . Since 𝜋 by its nature is an approximate
value we round it to different digits as 𝜋 = 3.1, 𝜋 = 3.14, 𝜋 = 3.142 and so on then the error
existing in such problems is called inherent error.
2) Rounding errors: arise from the process of rounding off the numbers during the
computation.
3) Truncation errors: are caused by using approximate results or on replacing an infinite
process by a finite one. If we are using a decimal computer having a fixed word length of
4 digits, rounding off of 13.658 gives 13.66 whereas truncation gives 13.65.
For, example: If 𝑒 = 1 + 𝑥 + !
+
!
+ ⋯ ∞ = 𝑋 (𝑠𝑎𝑦) is replaced by;
1+𝑥+ + = 𝑋 (𝑠𝑎𝑦), then the truncation error is 𝑋 − 𝑋 .
! !

3
NUMERICAL ANALYSIS

4) Absolute, Relative and Percentage errors:


 Absolute error (EA): Is the numerical difference between the true value of a quantity and
its approximate value. i.e. If 𝑋 is the exact or true value of a quantity and 𝑋 is its
approximate value, then |𝑋 – 𝑋 | is called the absolute error 𝑬𝑨 . Therefore, absolute
error
𝐸 = |𝑋 – 𝑋 |

 Relative error (ER): The relative error 𝐸 is the ratio of the absolute error to the exact
value that is
𝑋 −𝑋
𝐸 =
𝑋
Provided 𝑋 ≠ 0 or 𝑋 is not too close to zero.
 The percentage relative error (𝐸 ) is
𝑋 −𝑋
𝐸 = 𝐸 × 100% = × 100%
𝑋

Important Rules
 Rule 1 If 𝑋 is the approximate value of 𝑋 correctly rounded to m decimal places then
1
𝐸 = |𝑋 – 𝑋 | ≤ × 10
2
 Rule 2 If 𝐸 is the approximate value of 𝑋 , after truncating to k digits, then
𝑋 −𝑋
𝐸 = < 10
𝑋
 Rule 3 If 𝐸 is the approximate value of 𝑋 , after rounding-off to k digits, then
𝑋 −𝑋 1
𝐸 = < × 10
𝑋 2
 Rule 4 If 𝐸 is the approximate value of 𝑋 , correct to m significant digits, then

𝑋 −𝑋
𝐸 = < 10
𝑋
Note that: If a number is correct to n significant digits, then the maximum relative error ≤ 10 .
If a number is correct to d decimal places, then the absolute error ≤ 10 .
Example 1: If 𝑥 = 0.51 correct to two decimal places, then find the absolute error.
Solution: 𝐸 = × 10 , but in this case 𝑑 = 2

= × 10 = 0.005

4
NUMERICAL ANALYSIS

Example2: Let the exact value of the number is and its approximate value is 6.666, then find

a) Absolute error,
b) Relative error and
c) The percentage relative error.
Solution:
20 2
𝐸 = |𝑋 − 𝑋 | = − 6.666 =
3 3000
.
𝐸 = = =

𝐸 = 𝐸 100 = × 100 = = 0.01%

Example 3: Three approximate values of the number are given as 0.30, 0.33 and 0.34. Which

one of the three is the best approximation?

Solution: The value with the smallest absolute error is the best approximation and therefore we
have to find the absolute errors in each. Let 𝑋 = 0.30, 𝑋 = 0.33 and 𝑋 = 0.34. then

𝐸 = − 0.30 =

𝐸 = − 0.33 =

𝐸 = − 0.34 =

Here, < <

Therefore, the best approximation of the number is 0.33.

Example 4: Round off the numbers 865250 and 37.46235 to four significant digits and compute
𝐸 , 𝐸 , 𝐸 in each case.

Solution: i) Number rounded off to four significant digits=865200

𝐸 = |𝑋 − 𝑋 | = |865250 − 865200| = 50

5
NUMERICAL ANALYSIS

𝐸 = = = 6.71 × 10

E = E × 100 = 6.27 × 10 .

ii) Number rounded off to four significant digits= 37.46

E = |X − X | = |37.46235 − 37.46000| = 0.00235

.
𝐸 = = = 6.27 × 10
.

E = E × 100 = 6.27 × 10

Example 5: Find the absolute error if the number 0.005455828 is

i) Truncated to three decimal digits.


ii) Rounded off to three decimal digits.

Solution: We have 𝑋 = 0.005455828 = 0.545828 × 10

i) After truncating to three decimal places, its approximate value 𝐸 = 0.545 × 10

∴ 𝐸 = |𝑋 − 𝑋 | = 0.000828 × 10 = 0.828 × 10

ii) After rounding off to three decimal places, its approximate value 𝐸 = 0.546 × 10

∴ 𝐸 = |𝑋 − 𝑋 | = 0.000172 × 10 = 0.172 × 10

GENERAL ERROR FORMULA

Function Approximation

Let 𝑢 be a function of several independent quantities 𝑥 , 𝑥 , 𝑥 , … , 𝑥 which are subject to errors


of magnitude ∆𝑥 , ∆𝑥 , ∆𝑥 , … , ∆𝑥 respectively. If ∆𝑢 (𝐸𝑢) denotes the error in 𝑢 then

𝑢 = 𝑓(𝑥 , 𝑥 , 𝑥 , … , 𝑥 )

𝑢 + ∆𝑢 = 𝑓(𝑥 +∆𝑥 , 𝑥 + ∆𝑥 , 𝑥 + ∆𝑥 , … , 𝑥 + ∆𝑥 ).

Using Taylor’s theorem for a function of several variables and expanding the right-hand side we get

6
NUMERICAL ANALYSIS

𝜕𝑓 𝜕𝑓 𝜕𝑓 𝜕𝑓
𝑢 + ∆𝑢 = 𝑓(𝑥 , 𝑥 , , … , 𝑥 ) + ∆𝑥 + ∆𝑥 + ∆𝑥 + ⋯ + ∆𝑥
𝜕𝑥 𝜕𝑥 𝜕𝑥 𝜕𝑥
+ 𝑡𝑒𝑟𝑚𝑠 𝑖𝑛𝑣𝑜𝑙𝑣𝑖𝑛𝑔 (∆𝑥 ) , 𝑒𝑡𝑐.,

𝜕𝑓 𝜕𝑓 𝜕𝑓 𝜕𝑓
𝑢 + ∆𝑢 = 𝑢 + ∆𝑥 + ∆𝑥 + ∆𝑥 + ⋯ + ∆𝑥 + 𝑡𝑒𝑟𝑚𝑠 𝑖𝑛𝑣𝑜𝑙𝑣𝑖𝑛𝑔 (∆𝑥 ) , 𝑒𝑡𝑐.,
𝜕𝑥 𝜕𝑥 𝜕𝑥 𝜕𝑥

The errors ∆𝑥 , ∆𝑥 , ∆𝑥 , … , ∆𝑥 are very small quantities.

Therefore, neglecting the squares and higher power of ∆𝑥 , we can write

∆𝑢 ≈ ∆𝑥 + ∆𝑥 + ∆𝑥 + ⋯ + ∆𝑥 (1)

The relative error in 𝑢 is


𝐸 = = ( ∆𝑥 + ∆𝑥 + ∆𝑥 + ⋯ + ∆𝑥 ) (2)

(∴ = ) (𝑖 = 1,2,3, … , 𝑛)

Formula (2) is called general error formula.

Example: -Given that 𝑢 = ∆𝑥, ∆𝑦, and ∆𝑧 denote the errors in 𝑥, 𝑦 𝑎𝑛𝑑 𝑧 respectively such

that 𝑥 = 𝑦 = 𝑧 = 1 and ∆𝑥 = ∆𝑦 = ∆𝑧 = 0.001, Find the relative maximum error in 𝑢.

Solution: We have

𝜕𝑢 5𝑦 𝜕𝑢 10𝑥𝑦 𝜕𝑢 −15𝑥𝑦
= , = , =
𝜕𝑥 𝑧 𝜕𝑦 𝑧 𝜕𝑧 𝑧

𝜕𝑢 𝜕𝑢 𝜕𝑢
∴ ∆𝑢 = ∆𝑥 + ∆𝑦 + ∆𝑧
𝜕𝑥 𝜕𝑦 𝜕𝑧

𝜕𝑢 𝜕𝑢 𝜕𝑢
⇒ (∆𝑢) = ∆𝑥 + ∆𝑦 + ∆𝑧
𝜕𝑥 𝜕𝑦 𝜕𝑧

= ∆𝑥 + ∆𝑦 + ∆𝑧 (1)

7
NUMERICAL ANALYSIS

Substituting the given values in (1) and using the formula to find the relative maximum error we
(∆ ) .
get (𝐸 ) = = = 0.006

Class Work a) If 𝑢 = 𝑎𝑛𝑑 ∆𝑥, ∆𝑦, and ∆𝑧 denote the errors in 𝑥, 𝑦 𝑎𝑛𝑑 𝑧 respectively such

that 𝑥 = 𝑦 = 𝑧 = 1 and ∆𝑥 = 0.001, ∆𝑦 = 0.002, ∆𝑧 = 0.003, Find the Percentage error in 𝑢.

b) If 𝑓(𝑥) = 4 ln(𝑒 ) − 6𝑥, find the relative percentage error in 𝑓(𝑥) for 𝑥 = 0 if the errors
in 𝑥 = 0.005

Note that: Errors occurs due to Summation, Product, Modeling, Series approximations,
rounding off, etc.

Exercise 1.1
1. If the true value of a number is 2.546282 and 2.5463 is its approximate value; find
the absolute error, relative error and the percentage error in the number.
2. Evaluate the sum 𝑆 = √7 + √13 + √𝑒 to four significant digits and find its
absolute and relative errors.
3. Find the largest interval in which 𝑥 must lie to approximate 𝑤 = √𝜋 with
relative error at most 10

4. 𝐸 = , 𝑓 = 72 ± 0.9, ℎ = 4 ± 0.1, 𝑙 = 70 ± 1.5 then find error in 𝐸

5. Let 𝑣 = + ln( ) and the errors in 𝑥, 𝑦 𝑎𝑛𝑑 𝑧 be 0.001. then

compute the maximum relative errors in 𝑣 when 𝑥 = 𝑦 = 𝑧 = 1

6. Let 𝑅 = + if the percentage error in 𝑅 ≤ 2%, then find the errors in

𝑟 and ℎ. {𝑟 = 4.5, ℎ = 5.5}


7. Use derivative to calculate the approximate percentage error in volume of a sphere of
radius 4𝑐𝑚 corresponding to an error of 1% in its radius.
8. Find the truncation errors in the Maclaurin expansion of a) 𝑦 = 𝑐𝑜𝑠𝑥 b) 𝑦 = 𝑠𝑖𝑛ℎ𝑥

9. A physical quantity 𝑄 is calculated according to the expression 𝑄 =


If percentage errors in 𝐴, 𝐵, 𝐶, 𝐷 are 2%, 1%, 3% and 4% respectively. What is the


percentage error in 𝑄 ?

You might also like