Numerical Methods Lecture 1
Numerical Methods Lecture 1
Numerical Methods
[MA-200]
Introduction
• They are used whenever the mathematical problem is too complex or too
lengthy to give a closed form solution
Since numerical methods provide estimates to the exact solutions. So, there
are essential chances of errors.
What Are Numerical Methods?
• Numerical methods are algorithms
– Precise set of rules to follow
– Generate a numerical approximation of the mathematical problem
– Do not tell how good/poor is the approximation
x2
xo
x1
Algorithm
Quality Control of Answer
Algorithm
xi xi+1
Error = 𝐸 = 𝑦 − 𝑦 ∗
Sources of Errors
• Gross Errors
• Rounding Errors
• Truncation Errors
Gross Errors
These error often arise due to human mistake (or by the computer). For
example, misreading the figures, use of inaccurate mathematical formula
for a particular problem or use of inaccurate data.
Such errors can be avoided by taking enough care in using the proper
numerical technique.
Rounding Errors
The errors introduced by rounding off numbers to a limited number of decimal
places are called rounding errors.
For Example, If value of 𝜋 = 3.1415926535 is rounded off to 3.14 or 3.142.
By using this value, the rounding error arises.
Rounding errors are also introduced due to computers. Because computer
hardware works with only limited number of digits in machine numbers. If a
1
number is correct up to n decimal places, then it has rounding error 𝑒 ≤ ×
2
−𝑛 1
10 . E.g., 𝜋 = 3.1415926535, then 𝑒 ≤ × 10−10 =0.00000000005
2
Truncation Errors
Truncation is defined as the replacement of one series by another with
fewer terms. The error arising from this approximation is called the
truncation error.
𝑥 𝑥2 𝑥3 𝑥4 𝑥5 𝑥𝑛
𝑒 =1+𝑥+ + + + +… + (𝑖)
2! 3! 4! 5! 𝑛!
𝑥2 𝑥3 𝑥4
1+𝑥+ + + (𝑖𝑖)
2! 3! 4!
Cont.
Using equation (ii) instead of (i) gives rise to the truncation error
1/2
න 𝑒 𝑥 𝑑𝑥 = 0.64872127
0
And
1/2
𝑥2 𝑥3 𝑥4
න (1 + 𝑥 + + + )𝑑𝑥 = 0.64869792
0 2! 3! 4!