Professional Documents
Culture Documents
Lec #2 (Bisection Method & False Position) PDF
Lec #2 (Bisection Method & False Position) PDF
Lec #2 (Bisection Method & False Position) PDF
By
(BISECTION METHOD)
Lec # 2
1
OBJECTIVE:
2
NUMERICAL SOLUTION OF NON-LINEAR EQUATION
OR
SOLUTION TO NUMERICAL ALGEBRAIC AND
TRANSCENDENTAL EQUATIONS
INTRODUCTION
We know that an expression of the form
𝑓 𝑥 = 𝑎0 𝑥 𝑛 + 𝑎1 𝑥 𝑛−1 + ⋯ + 𝑎𝑛−1 𝑥 + 𝑎𝑛
where 𝑎′𝑠 are constants (𝑎0 ≠ 0) and "𝑛“ is a positive integer, is
called a polynomial in 𝑥 of degree "𝑛“.
If 𝑓 𝑥 contains some other functions like exponential, trigonometric,
logarithmic etc.; then 𝑓 𝑥 = 0 is called a transcendental equation.
FOR EXAMPLE:
3𝑥 3 − 3𝑥 + 6 = 0,
𝑥 5 − 7𝑥 4 + 3𝑥 2 + 36𝑥 − 7 = 0
are algebraic equations of third and fifth degree, whereas
3
𝑥 2 − 3cos𝑥 + 1 = 0,
𝑥ⅇ 𝑥 − 2 = 0,
𝑥𝑙𝑜𝑔10 𝑥 = 1.2 etc.
are transcendental equations.
In both the cases, if the coefficients are pure numbers, they are called
numerical equations.
Now we will solve the numerical, algebraic and transcendental
equations.
For the algebraic equations of degree two or three or four, methods are
available to solve them. But the need often arises to solve higher degree
or transcendental equations for which no direct method exists.
Such equations can best be solved by approximate methods. Before we
proceed to solve such equations.
𝑓(𝑎)
𝑏
𝑎
𝑓(𝑏)
5
EXAMPLE # 1:
If 𝑓 𝑎 and 𝑓(𝑏) have the same sign the function may have an even
number of real zeros or no real zero in the interval [𝑎, 𝑏]
𝑓(𝑎)
𝑓(𝑏) 𝑓(𝑎)
𝑓(𝑏)
𝑎 𝑏
𝑎 𝑏
The function has no real zeros
The function has four real zeros
𝑓(𝑎)
𝑓(𝑎)
𝑓(𝑏)
𝑏
𝑎
𝑏
𝑓(𝑏)
𝑎
The function has three real zeros
The function has one real zeros
8
BISECTION ALGORITHM
Assumptions:
➢ If 𝑓 𝑥 is continuous in a closed interval [𝑎, 𝑏] and
➢ 𝑓 𝑎 , 𝑓(𝑏) are of opposite signs
These assumptions ensures the existence of at least one
zero in the interval [𝑎, 𝑏] and the bisection method can be
used to obtain a smaller interval that contains the zero.
➢ Compute the mid point
𝑎+𝑏
𝑥1 =
2
➢ Evaluate 𝑓(𝑥1 )
❑ If 𝑓(𝑥1 ) = 0, then 𝑥1 is a root of 𝑓 𝑥 = 0. Otherwise,
❑ the new interval is [𝑎, 𝑥1 ] or
❑ the new interval is [𝑏, 𝑥1 ]
depending upon whether 𝑓(𝑥1 ) is " + ive “ or " − ive “.
we bisect the interval and continue the process till the root is found
to the desired accuracy. 9
DESCRIPTION OF METHOD
Let the function 𝑓 𝑥 be continuous between " 𝑎 " and " b " .
Let
𝑓 𝑎 be negative and
𝑓 𝑏 be positive.
Then there is a root of 𝑓 𝑥 = 0 lying between " 𝑎 " and " b " .
Let the 1st approximation 𝑥1 be
𝑎+𝑏
𝑥1 = 𝑖. ⅇ average of the ends of the range .
2
Now if 𝑓(𝑥1 ) = 0 then 𝑥1 is a root of 𝑓 𝑥 = 0.
Otherwise, the root will lie between "𝑥1 " and " 𝑎 " or "𝑥1 " and " 𝑏 "
Depending upon whether 𝑓(𝑥1 ) = + 𝑖𝑣ⅇ or 𝑓(𝑥1 ) = − 𝑖𝑣ⅇ
Then as before, we bisect the interval and continue the process till the
root is found to the desired accuracy. 10
If 𝑓(𝑥1 ) = +𝑖𝑣ⅇ therefore the root lies between "𝑥1 " and " 𝑎 " .
The 2nd approximation to the root now is
𝑎 + 𝑥1
𝑥2 =
2
Now if 𝑓(𝑥2 ) = 0, then 𝑥2 is a root of 𝑓 𝑥 = 0.
Otherwise, the root will lie between "𝑥2 " and " 𝑎 " or "𝑥2 " and "𝑥1 "
Depending upon whether 𝑓(𝑥2 ) = +𝑖𝑣ⅇ or 𝑓(𝑥2 ) = −𝑖𝑣ⅇ
If 𝑓(𝑥2 ) = −𝑖𝑣ⅇ then the root lies between "𝑥2 " and "𝑥1 “ and the
3rd approximation to the root is
𝑥2 + 𝑥1
𝑥3 =
2
and so on.
11
EXAMPLE#1: Find a root of the equation 𝑥 3 − 𝑥 − 11 = 0 in the
interval 2, 3 , correct to four decimals using bisection method.
SOLUTION: Let 𝑓 𝑥 = 𝑥 3 − 𝑥 − 11
𝑓(𝑎) = 𝑓 2 = 23 − 2 − 11 = 8 − 2 − 11 = −5 < 0
𝑓 𝑏 = 𝑓 3 = 33 − 3 − 11 = 27 − 14 = 13 > 0
⇒ Root lies between " 𝑎 = 2 " and " 𝑏 = 3 “
1st approximation is
𝑎+𝑏 2+3
𝑥1 = = = 2.5
2 2
⇒ Root lies between "𝑥9 = 2.3730469 " and " 𝑥10 = 2.3740235“
11th approximation is
𝑥9 + 𝑥10 2.3730469 + 2.3740235
𝑥11 = = = 2.373535175
2 2
Now 𝑓 𝑥11 = 𝑓 2.3735352 = −0.001823100 = −𝑖𝑣ⅇ
15
⇒ Root lies between "𝑥11 = 2.373535175" and " 𝑥10 = 2.37402345“
12th approximation is
𝑥11 + 𝑥10 2.373535175 + 2.3740235
𝑥12 = = = 2.3737793375
2 2
Now 𝑓 𝑥12 = 𝑓 2.3730469 = 0.0020597538 = +𝑖𝑣ⅇ
⇒ Root lies between "𝑥11 = 2.373535175" and "𝑥12 = 2.3737793375“
13th approximation is
𝑥11 + 𝑥12 2.373535175 + 2.3737793375
𝑥13 = = = 2.373657256
2 2
Now 𝑓 𝑥13 = 𝑓 2.373657275 = 0.0001182207 = +𝑖𝑣ⅇ
15th approximation is
𝑥14 + 𝑥13
𝑥15 =
2
2.3735962155 + 2.373657256
= = 2.3736267357
2
Now 𝑓 𝑥15 = 𝑓 2.37362673575 = 0.000367132 = −𝑖𝑣ⅇ
From 𝑥14 and 𝑥15 , we can see that 𝑓 𝑥14 and 𝑓 𝑥15 are nearly equal
to zero. Hence the root correct to four decimal places is 2.3736.
17
EXAMPLE #2: Find the real root of the equation 𝑥 3 − 𝑥 2 − 2 = 0
correct to 2- decimal places using bisection method.
SOLUTION: Let 𝑓 𝑥 = 𝑥3 − 𝑥2 − 2
𝑓(𝑎) = 𝑓 1 = 13 − 1 − 2 = −2 < 0
𝑓 𝑏 =𝑓 2 =8−4−2=2>0
⇒ Root lies between " 𝑎 = 1 " and " 𝑏 = 2 “
1st approximation is
𝑎+𝑏 1+2
𝑥1 = = = 1.5
2 2
DISADVANTAGES
➢ Slow to converge.
➢ Good intermediate approximations may be discarded.
➢ If one of the initial guesses is close to the root, the convergence
is slower.
25
EXERCISES
26
27
METHOD OF FALSE POSITION
OR
REGULA FALSI METHOD
This method also known as regular Falsi method, is the oldest method of
finding the real root of an equation 𝑓 𝑥 = 0 and is somewhat similar to
the bisection method.
Consider 𝑓 𝑥 = 0.
Let "𝑎“ and "𝑏“ (𝑎 < 𝑏) be two values of 𝑥 such that 𝑓(𝑎) and 𝑓(𝑏) are of
opposite sign.
Then the graph of y = 𝑓(𝑥) crosses the 𝑥 − 𝑎𝑥𝑖𝑠 at some point between
"𝑎“ and "𝑏“.
28
Therefore, the equation of the chord joining the two points A(𝑎, 𝑓 𝑎 )
and B(𝑏, 𝑓 𝑏 ) is
𝑓 𝑏 −𝑓 𝑎
𝑦−𝑓 𝑎 = (𝑥 − 𝑎) Eq. (1)
𝑏−𝑎
Now in the interval (𝑎, 𝑏) the graph of the function can be considered as a straight
line. So, the intersection of the line given by Eq. (1) with the x-axis will given an
approximate value of the root. 𝑓 𝑏 −𝑓 𝑎
Putting y = 0 in Eq. (1), we get −𝑓 𝑎 = (𝑥 − 𝑎)
𝑏−𝑎
A(𝑎, 𝑓 𝑎 ) Or
𝑎𝑓 𝑏 − 𝑏𝑓 𝑎
𝑥=
𝑓(𝑏) − 𝑓(𝑎)
Hence the 1st approximation to the root is given by
𝑓 𝑎
𝑎𝑓 𝑏 − 𝑏𝑓 𝑎
𝑥1 = Eq. (2)
𝑥1
𝑓(𝑏) − 𝑓(𝑎)
𝑥3 𝑓 𝑏
𝑥2
y = 𝑓(𝑥)
B(𝑏, 𝑓 𝑏 )
29
Now if 𝑓(𝑥1 ) and 𝑓 𝑎 are of opposite sign, then the root lie in
between "𝑎“ and "𝑥1 “. So, we replace "𝑏“ by "𝑥1 “ in Eq. (2) and get
the next approximation "𝑥2 “.
𝑎𝑓 𝑥1 − 𝑥1 𝑓 𝑎
𝑥2 =
𝑓(𝑥1 ) − 𝑓(𝑎)
But if 𝑓(𝑥1 ) and 𝑓 𝑎 are of same sign then 𝑓(𝑥1 ) and 𝑓 𝑏 will be
of opposite signs and therefore, the root lies in between "𝑥1 “ and "𝑏“.
Hence, we replace "𝑎“ by "𝑥1 “ in Eq. (2) and get the next
approximation "𝑥2 “.
𝑥1 𝑓 𝑏 − 𝑏𝑓 𝑥1
𝑥2 =
𝑓(𝑏) − 𝑓(𝑥1 )
5th approximation is
32
5th approximation is
𝑥4 𝑓 𝑏 − 𝑏𝑓 𝑥4 2.0927 16 − 3(−0.0206) 33.545
𝑥5 = = = = 2.0939
𝑓(𝑏) − 𝑓(𝑥4 ) 16 − (−0.0206) 16.0206
Now 𝑓 𝑥5 = 𝑓 2.0939 = −0.007267 = −𝑖𝑣ⅇ
⇒ Root lies between "𝑥5 = 2.0939" and " 𝑏 = 3“
6th approximation is
𝑥5 𝑓 𝑏 − 𝑏𝑓 𝑥5 2.0939 16 − 3(−0.00726) 33.52418
𝑥6 = = = = 2.0943
𝑓(𝑏) − 𝑓(𝑥5 ) 16 − (−0.00726) 16.00726
3.9179594
= = 1.049
3.7336953
Now 𝑓 𝑥4 = 𝑓 1.049 = −5.320155 × 10−3 = −𝑖𝑣ⅇ
⇒ Root lies between "𝑥4 = 1.049" and "𝑏 = 1.5“
35
5th approximation is
𝑥4 𝑓 𝑏 − 𝑏𝑓 𝑥4 3.9129142
𝑥5 = = = 1.0496
𝑓(𝑏) − 𝑓(𝑥4 ) 3.7278502
36
EXAMPLE#2: Solve 𝑥 3 − 9𝑥 + 1 = 0 for the root lying between
2 and 3 by the method of false position correct to three decimal places.
SOLUTION: Let 𝑓 𝑥 = 𝑥 3 − 9𝑥 + 1
𝑓 𝑎 = 𝑓 2 = −9 < 0
𝑓 𝑏 =𝑓 3 =1>0
⇒ Root lies between " 𝑎 = 2 " and " 𝑏 = 3 “
1st approximation is
𝑎𝑓 𝑏 − 𝑏𝑓 𝑎 2 1 − 3(−9) 29
𝑥1 = = = = 2.9
𝑓(𝑏) − 𝑓(𝑎) 1 − (−9) 10
𝑥3 𝑓 𝑏 − 𝑏𝑓 𝑥3 2.94482
𝑥4 = = = 2.9428
𝑓(𝑏) − 𝑓(𝑥3 ) 1.000680
⇒ Therefore, from 𝑥3 and 𝑥4 the root is 2.943, correct to three decimal places.
38
EXERCISES
39
40
41