Numerical Analysis WEEK 1
Numerical Analysis WEEK 1
Numerical Analysis deals with the process of getting the numerical solution to
complex problems. Most of the Mathematical problems that arise in science and
engineering are very hard and sometime impossible to solve exactly. Thus, an
approximation to a difficult Mathematical problem is very important to make it more
easy to solve. Due to the immense development in the computational technology,
numerical approximation has become more popular and a modern tool for scientists
and engineers. As a result many scientific softwares are developed (for instance,
Matlab, Mathematica, Maple etc.) to handle more difficult problems in an efficient
and easy way.
“Numerical Analysis is the branch of mathematics that provides tools and methods for solving
mathematical problems in numerical form.”
Numerical analysis include three parts. The first part of the subject is about the
development of a method to a problem. The second part deals with the analysis of
the method, which includes the error analysis and the efficiency analysis. Error
analysis gives us the understanding of how accurate the result will be if we use the
method and the efficiency analysis tells us how fast we can compute the result. The
third part of the subject is the development of an efficient algorithm to implement
the method as a computer code.
ERROR
Error is a term used to denote the amount by which an approximation fails to
equal the exact solution.
SOURCE OF ERRORS
Numerically computed solutions are subject to certain errors. Mainly there are
three types of errors.
1. Inherent errors
2. Truncation errors
3. Round Off errors
These are also called “Chopping” i.e. discarding all decimals from some decimals
on.
Absolute Error
Absolute Error is the magnitude of the difference between the true value “a”
and the approximate value “ā”. The error between two values is defined as:
Absolute Error=|Approximate value -True Value|
=|ā - a|
RELATIVE ERRORS
If “ā” is an approximate value of a quantity whose exact value is
“a” then relative error of “ā” is defined by
|𝐀𝐩𝐩𝐫𝐨𝐱𝐢𝐦𝐚𝐭𝐞 𝐯𝐚𝐥𝐮𝐞 −𝐓𝐫𝐮𝐞 𝐕𝐚𝐥𝐮𝐞|
Relative Error = 𝐓𝐫𝐮𝐞 𝐕𝐚𝐥𝐮𝐞
|ā − 𝐚 |
Relative Error =
𝐚
Percentage Error
If “ā” is an approximate value of a quantity whose exact value is
“a” then Percentage error of “ā” is defined as:
|𝐀𝐩𝐩𝐫𝐨𝐱𝐢𝐦𝐚𝐭𝐞 𝐯𝐚𝐥𝐮𝐞 −𝐓𝐫𝐮𝐞 𝐕𝐚𝐥𝐮𝐞|
Percentage error = X100
𝐓𝐫𝐮𝐞 𝐕𝐚𝐥𝐮𝐞
Those values of “x” for which f(x) = 0 is satisfied are called root of an
equation. Thus “a” is root of f(x) = 0 iff f(a) = 0
ALGEBRAIC EQUATION
The equation f(X) = 0 is called an algebraic equation if it is
purely a polynomial in “x”. e.g.
𝑥 3 + 5𝑥 2 − 6𝑥 + 3 = 0
TRANSCENDENTAL EQUATION
The equation f(x) = 0 is called transcendental equation if it contains
Trigonometric, Inverse trigonometric, Exponential, Hyperbolic or
Logarithmic functions.e.g.
i. M = 𝑒 𝑥 -𝑒 𝑥 sinx
2 𝑥
ii. 𝑎𝑥 + log(x-3) +𝑒 sinx = 0
REMARK
There are two types of methods to find the roots of Algebraic
and Transcendental equations.
(i) DIRECT METHODS
(ii) INDIRECT (ITERATIVE) METHODS
DIRECT METHODS
1. Direct methods give the exact value of the roots in a finite number of
steps.
2. These methods determine all the roots at the same time assuming no
round off errors.
3. In the category of direct methods; Elimination Methods are
advantageous because they can be applied when the system is large.
INDIRECT (ITERATIVE) METHODS
1. These are based on the concept of successive approximations. The
general procedure is to start with one or more approximation to the
root and obtain a sequence of iterates “x” which in the limit converges
to the actual or true solution to the root.
2. Indirect Methods determine one or two roots at a time.
3. Rounding error have less effect.
4. These are self-correcting methods.
5. Easier to program and can be implemented on the computer.
I. BRACKETING METHODS
II. OPEN METHODS
BRACKETING METHODS
These methods require the limits between which the root lies. e.g. Bisection
method, False position method.
OPEN METHODS
These methods require the initial estimation of the solution. e.g.
Newton Raphson method.
ADVANTAGES AND DISADVANTAGES OF BRACKETING METHODS
Bracket methods always converge.
The main disadvantage is, if it is not possible to bracket the root,
the method cannot applicable.
REMARK
Always set your calculator at radian mod while solving
Transcendental or Trigonometric equations.
If f(x) is continuous on [a, b] and f(a) and f(b) have opposite signs
then f(x) =0 has atleast one real root between a and b.
This result is very simple to use. We set up a table of values of f (x) for various
values of x. Studying the changes in signs in the values of f (x), we determine the
intervals in which the roots lie. For example, if f (1) and f (2) are of opposite
signs, then there is a root in the interval (1, 2).
Methods for Solving Non-Linear Equations
1. Bisection Method
2. Iteration Method or Fixed Point Iteration
3. Regular Falsi Method or Method of False Position
4. Newton-Raphson Method
5. Secant Method
MERITS OF BISECTION METHOD
1. The iteration using bisection method always produces a root, since the
method brackets the root between two values.
2. As iterations are conducted, the length of the interval gets halved. So
one can guarantee the convergence in case of the solution of the
equation.
3. Bisection method is simple to program in a computer.
EXAMPLE
Solve equation 𝒙𝟑 + 𝒙 − 𝟏 = 𝟎 using Bisection Method
SOLUTION
Let f(x)= 𝒙𝟑 + 𝒙 − 𝟏
x 0 0.5 1
f(x) -1 -0.375 1
Ist Iteration
𝟎.𝟓+𝟏
𝒙𝟏 = =0.75
𝟐
= 0.1719 >0
f(0.5) f(0.75)<0
=- 0.1309 <0
f(0.625) f(0.75)<0
3rd Iteration
𝟎.𝟔𝟐𝟓+𝟎.𝟕𝟓
𝒙𝟑 = =0.6875
𝟐
=0.0125 >0
f(0.625) f(0.6875)<0
4th Iteration
𝟎.𝟔𝟐𝟓+𝟎.𝟔𝟖𝟕𝟓
𝒙𝟒 = =0.6563
𝟐
=-0.0611<0
5th Iteration
𝟎.𝟔𝟓𝟔𝟑+𝟎.𝟔𝟖𝟕𝟓
𝒙𝟓 = =0.6719
𝟐
=-0.0248<0
f(0.6719) f(0.6875)<0
6th Iteration
𝟎.𝟔𝟕𝟏𝟗+𝟎.𝟔𝟖𝟕𝟓
𝒙𝟔 = =0.6797
𝟐
=-0.0141<0
f(0.6797) f(0.6875)<0
7th Iteration
𝟎.𝟔𝟕𝟗𝟕+𝟎.𝟔𝟖𝟕𝟓
𝒙𝟕 = =0.6836
𝟐
f(0.6836)= (𝟎. 𝟔𝟖𝟑𝟔)𝟑 + 𝟎. 𝟔𝟖𝟑𝟔 − 𝟏
=0.0031>0
f(0.6797) f(0.6836)<0
8th Iteration
𝟎.𝟔𝟕𝟗𝟕+𝟎.𝟔𝟖𝟑𝟔
𝒙𝟖 = =0.6817
𝟐
=-0.0016<0
f(0.6817) f(0.6836)<0
9th Iteration
𝟎.𝟔𝟖𝟏𝟕+𝟎.𝟔𝟖𝟑𝟔
𝒙𝟗 = =0.6826
𝟐
=0.0007>0
10th Iteration
𝟎.𝟔𝟖𝟏𝟕+𝟎.𝟔𝟖𝟐𝟔
𝒙𝟏𝟎 = =0.6822
𝟐
=-0.0004<0
f(0.6822) f(0.6826)<0
EXAMPLE
SOLUTION
EXAMPLE
Use bisection method to find out the roots of the function describing
to drag coefficient of parachutist given by
SOLUTION
EXAMPLE
Solve equation 𝒔𝒊𝒏𝒙 − 𝟓𝒙 + 𝟐 = 𝟎 using Bisection Method to find the
correct solution upto 4 decimal point.
SOLUTION
Ist Iteration
𝟎.𝟒+𝟎.𝟔
𝒙𝟏 = =0.5
𝟐
f(0.5)= 𝒔𝒊𝒏(𝟎. 𝟓) − 𝟓(𝟎. 𝟓) + 𝟐
= -0.0206<0
2nd Iteration
𝟎.𝟒+𝟎.𝟓
𝒙𝟐 = =0.45
𝟐
=0.1856 >0
f(0.5) f(0.45)<0
3rd Iteration
𝟎.𝟒𝟓+𝟎.𝟓
𝒙𝟑 = =0.475
𝟐
=0.0823 >0
f(0.5) f(0.475)<0
=0.0309 >0
f(0.5) f(0.4875)<0
5th Iteration
𝟎.𝟒𝟖𝟕𝟓+𝟎.𝟓
𝒙𝟓 = =0.4938
𝟐
=0.0049 >0
6th Iteration
𝟎.𝟒𝟗𝟑𝟖+𝟎.𝟓
𝒙𝟔 = =0.4969
𝟐
=-0.0078 <0
7th Iteration
𝟎.𝟒𝟗𝟑𝟖+𝟎.𝟒𝟗𝟔𝟗
𝒙𝟕 = =0.4954
𝟐
=-0.0017 <0
8th Iteration
𝟎.𝟒𝟗𝟑𝟖+𝟎.𝟒𝟗𝟓𝟒
𝒙𝟖 = =0.4946
𝟐
=0.0017 >0
9th Iteration
𝟎.𝟒𝟗𝟒𝟔+𝟎.𝟒𝟗𝟓𝟒
𝒙𝟗 = =0.4950
𝟐