Modified Study Material _Module I
Modified Study Material _Module I
Study Material
(Numerical Method and BCAC303)
_____________________________________________________________________________________________
Module I
Table of Contents
Department Mathematics
Brainware University, Kolkata 1
Bachelor of Computer applications and Semester III
Numerical Method (BCAC303)
BCA
Academic Session : 2023-2024
Module I
1 Approximation and Errors in Computing
1.1. Introduction:
Numerical Analysis is a multidisciplinary subject. It has formed an integral part of
the undergraduate and postgraduate curriculum in Mathematics, Computer Science,
Physics, Commerce and different Engineering streams. Numerical Analysis shows the
way to obtain numerical answers to applied problems. Numerical methods stand there
where analytical methods may fail or complicated to solve the problem. For example, in
finding the roots of transcendental equations or in solving non-linear differential equations.
So, it is quite impossible to train the students in applied sciences or engineering
without an adequate knowledge of numerical methods.
1.2. Analytical verses Numerical Methods:
The solutions of mathematical problems are of two types: analytical and numerical. The
analytical solutions can be expressed in closed form and these solutions are error free. On
the other hand, numerical method is a division of mathematics which solves problems using
computational machine (computer, calculator, etc.). But, for some classes of problems it is
very difficult to obtain an analytical solution. For example, the Indian populations are known
at the years 1951, 1961, 1971, 1981, 1991, 2001. There is no analytical method available to
determine the population in the year, say, 2000. But, using numerical method one can
determine the population in the said year. Again, sometimes we observed that the solutions
of non-linear differential equations cannot be determined by analytical methods, but, such
problems can easily be solved by numerical methods. Numerical computations are almost
invariably contaminated by errors, and it is important to understand the source, propagation,
magnitude, and rate of growth of these errors.
In this age of computer, many complicated and large problems are solved in significantly
less time. But, without using numerical methods we cannot solve any mathematical
Department Mathematics
Brainware University, Kolkata 2
Bachelor of Computer applications and Semester III
Numerical Method (BCAC303)
BCA
Academic Session : 2023-2024
problem using computer, as analytical methods are not suitable to solve a problem
by computer. Thus, the numerical methods are highly appreciated and extensively used
by Mathematicians, Computer Scientists, Statisticians, Engineers and others.
❖ Inherent errors:
This type of errors is present in the statement of the problem itself, before determining its
solution. Inherent errors occur due to the simplified assumptions made in the process of
mathematical modelling of a problem. It can also arise when the data is obtained from
certain physical measurements of the parameters of the proposed problem.
❖ Round-off errors:
Generally, the numerical methods are carried out using calculator or computer. In
numerical computation, all the numbers are represented by decimal fraction. Some
numbers such as 1/3, 2/3, 1/7 etc. can not be represented by decimal fraction in finite
numbers of digits. Thus, to get the result, the numbers should be rounded-off into some
finite number of digits.
❖ Truncation errors:
These errors occur due to the finite representation of an
inherently infinite process. For example, the use of a finite number of terms in the
infinite series to compute the value of 𝑐𝑜𝑠 𝑥, 𝑠𝑖𝑛 𝑥, 𝑒 𝑥 , etc.
The Taylor’s series expansion of 𝑠𝑖𝑛 𝑥 is
This is an infinite series expansion. If only first five terms are taken to compute the
value of sin x for a given x, then we obtain an approximate result. Here, the error occurs
due to the truncation of the series. Suppose, we retain the first n terms, the truncation
error (𝐸𝑡𝑟𝑢𝑛𝑐 ) is given by
Department Mathematics
Brainware University, Kolkata 3
Bachelor of Computer applications and Semester III
Numerical Method (BCAC303)
BCA
Academic Session : 2023-2024
2. The numbers √3 and 𝜋 are the exact numbers and the numbers 1.732 and 3.142 are the approximate
numbers corresponding to √3 and 𝜋, respectively.
The concept of significant figures has two important implications for the study of
numerical methods.
Department Mathematics
Brainware University, Kolkata 4
Bachelor of Computer applications and Semester III
Numerical Method (BCAC303)
BCA
Academic Session : 2023-2024
II. Although certain quantities such as 𝜋 or e represents specific numbers. They can’t
express exactly with a finite number of digits.
Ex. 𝜋=3.14159265358973238462643…to infinity.
The computers hold only a finite number of significant figures, these numbers can never
be represented accurately.
Example:
Find the number of significant figures of the following numbers.
Department Mathematics
Brainware University, Kolkata 5
Bachelor of Computer applications and Semester III
Numerical Method (BCAC303)
BCA
Academic Session : 2023-2024
In practical calculations, some numbers occur containing large number of digits, and it will
be necessary to cut them to a usable number of figures. This process is called rounding-off
of numbers.
(i) If the digit removed is greater than 5, the previous digit increases by one.
Ex: 8.236 →8.24 (correct upto 3 significant digits or 2 decimal places)
(ii) If the digit removed is less than 5, the previous digit is not changed.
Ex: 8.231 →8.23(correct upto 3 significant digits or 2 decimal )
(iii) If the digit removed is 5 followed by a different number other than 0, the previous digit
increases by one.
Ex: 8.2353 →8.24(correct upto 3 significant digits)
(iv) If the digit ends in exactly at 5, then see the previous digits. if it is odd then the digit is
increased by one or if it is even then the digit remains unchanged.
Ex: 8.2335 →8.23(correct upto 4 significant digits or 3 decimal places)
1.7 Error
The numerical errors are generated with the use of approximations to represent
mathematical operations and quantities. An error is the representation of the
inaccuracy and vagueness of predictions. The difference between the exact value 𝑥𝑇
and its approximate value 𝑥𝐴 is an error.
✓ Accuracy refers to how close is measured or calculated value to the true value.
Department Mathematics
Brainware University, Kolkata 6
Bachelor of Computer applications and Semester III
Numerical Method (BCAC303)
BCA
Academic Session : 2023-2024
❖ Absolute error: The absolute error of the number 𝑥 is the difference between true
value and approximate value, i.e., the absolute error is defined as
𝛥𝑥 = |𝑥𝑇 − 𝑥𝐴 |.
It may be noted from the rounding process that, if a number be rounded to 𝑚 decimal
1
places then absolute error ≤ × 10−𝑚 .
2
Note: The absolute error measures only the quantitative aspect of the error but not the
qualitative one, i.e., does not show whether the measurement and calculation were
accurate.
❖ Relative error: The relative error (𝛿𝑥) of the number 𝑥𝐴 is
∆𝑥 ∆𝑥 |𝑥 −𝑥 |
𝛿𝑥 = |𝑥 | or |𝑥 | = 𝑇|𝑥 |𝐴 ,
𝐴 𝑇 𝑇
Note: The relative error measures the quantity and quality of the calculation and
measurement.
Thus, the relative error is a better measurement of error than absolute error.
❖ Percentage error:
|𝑥 −𝑥 |
The percentage error of an approximate number 𝑥𝐴 is 𝛿𝑥 × 100% = 𝑇|𝑥 |𝐴 × 100%
𝑇
It is a particular type of relative error. This error is sometimes called relative
percentage error.
Note: This error also calculates the quantity and quality of measurement.
When relative error is very small then the percentage error is calculated.
Department Mathematics
Brainware University, Kolkata 7
Bachelor of Computer applications and Semester III
Numerical Method (BCAC303)
BCA
Academic Session : 2023-2024
Example:
If 3.45234 be an approximate value of 3.45678, find the absolute, relative and percentage
error.
Solution:
𝑥𝑇 = 3.45678 and 𝑥𝐴 = 3.45234
Approximate error: 𝐸𝐴 = |𝑥𝑇 − 𝑥𝐴 | = |3.45678 − 3.45234| = 4.44 × 10−3
𝐸𝐴
Relative error: 𝐸𝑅 = = 1.28 × 10−3
𝑥𝑇
Thus the absolute error of a sum of number of approximate numbers is less than or equal to
the sum of the absolute errors of the numbers.
Example:
1.8.2 The error in Subtraction:
Let u be the difference of 2 approximate numbers 𝑢1 , 𝑢2
Then u= 𝑢1 − 𝑢2
|∆𝑢| = |(𝑢1 + ∆𝑢1 ) − (𝑢2 + ∆𝑢2 ) − 𝑢1 − 𝑢2 |
=|∆𝑢1 − ∆𝑢2 |
≤ |∆𝑢1 |+|∆𝑢2 |
Thus the maximum absolute error of a sum of number of approximate numbers is less than
or equal to the sum of the absolute errors of the numbers.
1.8.3 The error in Multiplication:
Let u be the product of 2 approximate numbers 𝑢1 , 𝑢2
Then u= 𝑢1 . 𝑢2
ln 𝑢 = 𝑙𝑛 𝑢1 + 𝑙𝑛𝑢2
∆𝑢 ∆𝑢1 ∆𝑢2
or, = +
𝑢 𝑢1 𝑢2
∆𝑢 ∆𝑢1 ∆𝑢2
or, 𝐸𝑟 = | | ≤ | |+| |
𝑢 𝑢1 𝑢2
ln 𝑢 = 𝑙𝑛 𝑢1 − 𝑙𝑛𝑢2
∆𝑢 ∆𝑢1 ∆𝑢2
or, = −
𝑢 𝑢1 𝑢2
Department Mathematics
Brainware University, Kolkata 9
Bachelor of Computer applications and Semester III
Numerical Method (BCAC303)
BCA
Academic Session : 2023-2024
∆𝑢 ∆𝑢1 ∆𝑢2
or, 𝐸𝑟 = | | ≤ | |+| |
𝑢 𝑢1 𝑢2
Thus, the relative error of a quotient of two approximate numbers is less than or equal to the
sum of the relative errors of the numbers.
Example: Find the difference of the approximate numbers 27.5 and 35.8 having
absolute errors 0.02 and 0.03 respectively. Evaluate the absolute and the relative
errors of the result.
Solution:
Let 𝑥1 = 27.5 and 𝑥2 = 35.8. Then 𝑥 = 𝑥1 − 𝑥2 = −8.3. The total
absolute error 𝛥𝑥 = 0.02 + 0.03 = 0.05.
Thus, the difference 𝑥1 − 𝑥2 is −8.3 with absolute error 0.05.
0.05
The relative error is | ≅ 0.006 = 0.6%.
− 8.3|
3
Example: If 𝑢 = 𝑥𝑦𝑧 2 + 𝑥 3 𝑦 5 and errors in x, y, z are 0.005, 0.001, 0.001 respectively at
2
x=3, y=z=1, compute the maximum absolute and relative errors in evaluating u.
Solution:
3
𝑢 = 𝑥𝑦𝑧 2 + 𝑥 3 𝑦 5
2
𝜕𝑢 9
We have, = y𝑧 2 + 𝑥 2 𝑦 5
𝜕𝑥 2
𝜕𝑢 15
= x𝑧 2 + 𝑥 3 𝑦 4
𝜕𝑦 2
𝜕𝑢
= 2xyz
𝜕𝑧
𝜕𝑢 𝜕𝑢 𝜕𝑢
∆𝑢 ≅ .∆𝑥 + .∆𝑦 + .∆𝑧
𝜕𝑥 𝜕𝑦 𝜕𝑧
9 15
=(y𝑧 2 + 𝑥 2 𝑦 5 ) ∆𝑥 +(x𝑧 2 + 𝑥 3 𝑦 4 ) ∆𝑦 + (2xyz)∆𝑧
2 2
Department Mathematics
Brainware University, Kolkata 10
Bachelor of Computer applications and Semester III
Numerical Method (BCAC303)
BCA
Academic Session : 2023-2024
83 411
= × 0.005 + × 0.001 + 6 × 0.001
2 2
=0.419
0.419
Relative error= = 9.632 × 10−3
43.5
1.9. Exercise
I. Multiple Choice Questions
1. Identify the number of significant figures in 0.03409.
a)5 b)6
c)7 d)4
2. Select the correct digit that is not significant of the number 0.025.
a) 0 b) 2
c) 5 d) None of these.
3. Select the number of significant digits in the number 3.0056.
a)3 b)4
c)5 d)2
4. Identify the number of significant digits in the number 0.0001234.
a)7 b)4
c)8 d)6
5. If ‘a’ be the actual value and ‘e’ be its estimated value, then define formula for relative
error.
𝑎 |𝑎−𝑒|
a) 𝑒 b) 𝑒
(𝑎−𝑒) |𝑎−𝑒|
c) d)
𝑒 𝑎
Department Mathematics
Brainware University, Kolkata 11
Bachelor of Computer applications and Semester III
Numerical Method (BCAC303)
BCA
Academic Session : 2023-2024
6.
If 0.1 is approximated to 0.09, then the relative error is __. Select the correct option.
a) b)
1 0.11111
9
c) d)
0.11 None of these
7. Select the correct option. After being rounding off to three places of decimal the number
57.1092 becomes__
a) 57.109 b) 57.100
c) 57.110 d) 0.109
8. Select the error if 0.0081 is the approximate value of 0.00809
a) 0.001 b) 0.00001
10. If the number 0.005723 is rounded-off up to three significant digits then select the correct
answer.
a) 0.005 b) 0.00572
11. If the number 1.005723 is rounded-off up to three significant digits then identify the
correct answer.
a) 1.00 b) 1.005
12. Select the correct answer. If the number 0.0456 is rounded-off up to five significant
figures then the obtained number is__.
Department Mathematics
Brainware University, Kolkata 12
Bachelor of Computer applications and Semester III
Numerical Method (BCAC303)
BCA
Academic Session : 2023-2024
a) 0.0456 b) 0.04560
a) 3.456 b) 3.457
c) 3.458 d) 3.4567
14. Identify the round-off number of the number 0.0000123 up to four decimals.
a) 0.0001 b) 0.0000
a) 5.457 b) 5.459
c) 5.458 d) None of these.
17. 4
Identify the percentage error in approximating to 1.3333.
3
a) 0.0025% b) 25%
c) 0.00025% d) 0.25%
18. Select the correct option. If 𝐸 = 𝑒1 𝑒2with 𝑒1 = 5.43,𝑒2 = 3.82and if error in both
𝑒1 , 𝑒2 is 0.01, then the relative error of E is___
a) 0.0425 b) 0.0045
19. Locate the correct option. When 9.8 is approximated to 9.79 then the percentage error
is___
a)-0.01 b)0.01
c)0.00102145 d)0.102041
20. Identify the digits that are not significant digit of the number 1.025.
a)0 b)2
Department Mathematics
Brainware University, Kolkata 13
Bachelor of Computer applications and Semester III
Numerical Method (BCAC303)
BCA
Academic Session : 2023-2024
a)4 b)6
c)3 d)5
22. Identify the total number of significant digits in 0.00303.
a)6 b)5
c) 3 d)2
23. Select the total number of significant digits in the number 30.06.
a) 4 b) 3
c) 2 d) None of these
24. Select the correct option. The round-off number of 3.14159 to four significant digits is
a) 3.140 b) 3.1415
25. Select the correct option. The round-off number of 1.6583 to four significant digits is
a) 1.659 b) 1.668
a) 0.8593 b) 0.9593
a)15.231 b) 15.232
c) 15.241 d) 15.2
28. Select the correct option. The result after rounding off to five decimal places of decimals
of the number 15.231865 is__
a) 15.23196 b) 15.23187
29. Identify the number that is obtained by rounding off to three places of decimals of the
number 7.16528.
a)7.17 b)7.16
c)7.2 d) 7.165
30. 𝑏
Select the correct option. The error in Trapezoidal rule in evaluating ∫𝑎 𝑓(𝑥)𝑑𝑥 , is of
order
Department Mathematics
Brainware University, Kolkata 14
Bachelor of Computer applications and Semester III
Numerical Method (BCAC303)
BCA
Academic Session : 2023-2024
a) ℎ2 b) ℎ3
c) ℎ4 d) ℎ
32. If 0.0082 is approximated to 0.00809, then select the absolute error from the followings.
a)0.001 b)0.00011
a)0.001 b)0.00001
c)-0.00001 d)none.
34. Select the correct option. The truncation error in composite Simpson’s one-third rule is
of order
a) ℎ2 b) ℎ3
c) ℎ5 d) ℎ4
35. Identify the correct error of approximation in Trapezoidal rule for finding the
209.12
approximate value of ∫103.7 (0.6𝑥 + 7.92)𝑑𝑥.
a) 0.0001 b) 10−15
c) 0 d) none of these
36. 719.8
Trapezoidal rule for finding the approximate value of ∫212 𝐾𝑑𝑥
a) 0 b) 10−2
c) −10−2 d) 10−4
37. 𝑏
The error of approximation in Simpson’s one-third rule to find ∫𝑎 (2𝑥 2 + 𝑥 + 1)𝑑𝑥 is__.
Identify the correct option.
a) 2 b) b-a
c) 0 d) 1
Department Mathematics
Brainware University, Kolkata 15
Bachelor of Computer applications and Semester III
Numerical Method (BCAC303)
BCA
Academic Session : 2023-2024
38. Select the correct option. The digit that is not significant of the number .034 is__
a) 0 b) 3
c) 4 d) None of these
39. Select the correct option. The digit that is not significant of the number 1.205 is__
a) 1 b) 2
c) 5 d) None of these
a)4 b) 5
c) 3 d) None of these
41. Identify the number of significant digits in the number 0.00303.
a) 3 b) 5
c) 6 d) None of these
42. Identify the number of significant digits in the number 0.0005.
a) 1 b) 4
c) 5 d) None of these
43. Identify the number of significant digits in the number 0.0034500.
a) 3 b) 8
c) 5 d) None of these
44. Select the correct option. After rounding off to three places of decimals the number
15.23186 becomes__.
a) 15.231 b) 15.232
a) 15.231 b) 15.23186
46. After being rounded off to two places of decimals the number 7.16528 becomes—. Select
the correct option.
a) 7.17 b) 7.16
Department Mathematics
Brainware University, Kolkata 16
Bachelor of Computer applications and Semester III
Numerical Method (BCAC303)
BCA
Academic Session : 2023-2024
47. After being rounded off to five places of decimals the number 7.1652850 becomes—.
Select the correct option.
a) 7.16528 b) 7.16529
48. After being rounded off to five significant figures, the number 7.1652850 becomes—.
Select the correct option.
a) 7.1653 b) 7.1652
a) 0.199 b) 0.190
a) 0.199 b) 0.190
c) 35.9 d) 35.0
52. After being rounded off to three significant figures, the number 125.42 becomes—.
Predict the correct option.
a) 125 b) 126
a) 200 b) 100
a) 200 b) 300
55. When 9.8 is approximate value of 9.79, the percentage error becomes__ Trace the correct
option.
Department Mathematics
Brainware University, Kolkata 17
Bachelor of Computer applications and Semester III
Numerical Method (BCAC303)
BCA
Academic Session : 2023-2024
a) -0.01 b) 0.01
c) 0.00102145 d) 0.102145
a) 0.1 b) 0.4
c) 0.2 d) 0.0
a) 0.04 b) 0.03
c) 𝑑𝑥 d) None of these
60. The number 0.1 approximates the value 0.09, the relative error is__.
Identify the correct relative error.
1 b) 0.11111
a) 9
Department Mathematics
Brainware University, Kolkata 18
Bachelor of Computer applications and Semester III
Numerical Method (BCAC303)
BCA
Academic Session : 2023-2024
6. Convert the following numbers into the round off number correct
up to 4-decimal places:
a) 56.243827
b) 0.235082
c) 0.560012
d) 40.35856
Department Mathematics
Brainware University, Kolkata 19
Bachelor of Computer applications and Semester III
Numerical Method (BCAC303)
BCA
Academic Session : 2023-2024
3.
Describe (i) Inherent errors
(ii) Truncation error
6.
22
An approximate value of 𝜋 is given by 𝑋1 = =
7
3.1428571 and its true value is 𝑋 = 3.1415926. Identify
the absolute, relative and percentage error of this
approximation.
Department Mathematics
Brainware University, Kolkata 20
Bachelor of Computer applications and Semester III
Numerical Method (BCAC303)
BCA
Academic Session : 2023-2024
Department Mathematics
Brainware University, Kolkata 21