False Position Method
False Position Method
Y (b , f (b))
f (x ) = 0
a
0 a x1 x2 x3 R b X
( a , f ( a )) ( x , f ( x )) ( x
1 1 2 , f ( x2 ) ) ( x , f ( x ))
3 3
Fig: 01
(a+b)/2=x1 f(x1)<0
(a , f (a ))
Y
f (x ) = 0
0 a x3 x2 x1 b X
(x 2 , f ( x2 ) ) ( x , f ( x )) (b , f (b ))
1 1
Fig:02
Consider two paints x = a and x = b, a b such that f (a ) f (b) 0 then there exists a real root of
f (x ) = 0 in (a , b ) .
x−a y − f (a )
=
b − a f (b ) − f (a )
y − f (a )
x−a = (b − a ) (1)
f (b ) − f (a )
This line cuts the x- axis at ( x1 , 0 ) where x1 is the first approximation of the desired root. Now (1)
takes the form
0 − f (a )
x1 − a = (b − a )
f (b) − f (a )
af (a ) − bf (a )
x1 = +a
f (b) − f (a )
af (a ) − bf (a ) + af (b) − af (a )
=
f (b) − f (a )
a f (b ) − bf (a )
=
f (b ) − f (a )
Draw a straight line joining (x1 , f (x1 )) and (b , f (b )) whose equation is given by
x − x1 y − f (x1 )
=
b − x1 f (b ) − f (x1 )
y − f (x1 )
x − x1 = (b − x1 ) (2)
f (b ) − f (x1 )
This line cuts the x- axis at (x2 , 0) where x2 is the second approximation of the desired root. Now
(2) takes the form
x1 f (x1 ) − bf (x1 )
x2 = + x1
f (b ) − f (x1 )
x1 f (b ) − bf (x1 )
=
f (b ) − f (x1 )
a f (b ) − bf (a )
Now replacing x1 by a we get x2 = .
f (b ) − f (a )
Draw a straight line joining (a , f (a )) and (x1 , f (x1 )) whose equation is given by
x−a y − f (a )
=
x1 − a f (x1 ) − f (a )
y − f (a )
x−a = (x1 − a ) (3)
f (x1 ) − f (a )
This line cuts the x- axis at (x2 , 0) , where x2 is the second approximation of the desired root. Now
(3) takes the form
0 − f (a )
x2 − a = (x1 − a )
f (x1 ) − f (a )
af (a ) − x1 f (a )
x2 = +a
f (x1 ) − f (a )
af (a ) − x1 f (a ) + af (x1 ) − af (a )
=
f (x1 ) − f (a )
a f (x1 ) − x1 f (a )
=
f (x1 ) − f (a )
a f (b ) − bf (a )
Now replacing x1 by b we get x2 =
f (b ) − f (a )
Repeating this iterating process, we can find the higher approximation formula as
We shall continue this iterating process until two successive values of xk is approximately same
i.e. xk −1 xk .
Find the real root of e x − 4 x 2 = 0 that lies in (0 ,1) correct to four decimal places by using False
Position Method.
Soln: Given, f (x ) = e x − 4x 2
f (0) = e 0 − 4 0 2 = 1
f (1) = e1 − 4 12 = −1.2817
a f (b) − bf (a )
f (a ) f (b) xk = f ( xk )
f (b) − f (a )
Iteration a b
f (2) = 23 − 3 2 − 5 = −3
f (3) = 33 − 3 3 − 5 = 13
a f (b) − bf (a )
f (a ) f (b) xk = f ( xk )
f (b) − f (a )
Iteration a b
1 2 -3 3 13 2.1875 -1.0949
2 2.1875 -1.0949 3 13 2.2506 -0.3521
3 2.2506 -0.3521 3 13 2.2704 -0.1079
4 2.2704 -0.1079 3 13 2.2764 -0.6329
5 2.2764 -6329 3 13 2.2782 -0.0103
6 2.2782 -0.0103 3 13 2.2788 -0.0028
7 2.2788 -0.0028 3 13 2.2790 -0.0002
8 2.2790 -0.0002 3 13 2.2790 -0.0002
Since x8 − x7 = 0
Find the real root of 2 x − log 10 x − 7 = 0 that lies in (3 , 4) correct to four decimal places by
using false position method.
Find the real root of x 2 + 4Sinx = 0 that lies in (− 2.5 ,1.5) correct to four decimal places by
using false position method.
Here, f (− 2.5) f (1.5) 0 so there doesn’t exist a real root of (x)=0 in (− 2.5 ,1.5) .
Step-1: Define f ( x )
Step-2: Read a , b
Step-3: k =1
a f (b ) − bf (a )
Step-4: xk = 1 x1 f(x1)
f (b ) − f (a )
Step-5: Print k , xk , f (xk ) 2 x2 f(x2)
Step-6: If xk − xk −1 0.0001 then Go To Step-9
else if f (xk )• f (b ) 0 then a = xk
else if f (xk )• f (a ) 0 then b = xk
end if
Step-7: k = k + 1
Step-8: Go to Step-4
Step-9: Print ‘The required root=’ xk
Step-10: Stop