Lec #2 (Bisection Method & False Position) PDF

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 41

MATH-352 Numerical Methods – 2+1 CHs

By

Prof Dr Safia Akram

NUMERICAL SOLUTION OF NON-LINEAR EQUATIONS

(BISECTION METHOD)

METHOD OF FALSE POSITION

Lec # 2

1
OBJECTIVE:

In this Lecture we consider one of the most basic problems of


numerical approximation, the root-finding problem. This process
involves finding a root, or solution, of an equation of the form
𝑓 𝑥 = 0, for a given function 𝑓 𝑥 . A root of this equation is also
called a zero of the function 𝑓 𝑥 .

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.

Let us recall the fundamental theorem on roots of


𝑓 𝑥 = 0 in 𝑎 ≤ 𝑥 ≤ 𝑏.
4
THEOREM:
If 𝑓 𝑥 is continuous in a closed interval [𝑎, 𝑏] and 𝑓 𝑎 , 𝑓(𝑏) are of
opposite signs, then the equations 𝑓 𝑥 = 0 will have atleast one real
root between " 𝑎 " and " b " .

𝑓(𝑎)

𝑏
𝑎

𝑓(𝑏)

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

Bisection method can not be used in these cases


6
EXAMPLE # 2:
If 𝑓 𝑎 and 𝑓(𝑏) have the different signs the function has at least one
real zero.

𝑓(𝑎)
𝑓(𝑎)
𝑓(𝑏)
𝑏
𝑎
𝑏
𝑓(𝑏)
𝑎
The function has three real zeros
The function has one real zeros

Bisection method can be used to find one of the zeros


7
BISECTION METHOD

➢ The Bisection method is one of the simplest methods to find a zero


of a nonlinear function.
➢ It is also called interval halving method.
➢ To use the Bisection method, one needs an initial interval that is
known to contain a zero of the function.
➢ The method systematically reduces the interval. It does this by
dividing the interval into two equal parts, performs a simple test and
based on the result of the test half of the interval is thrown away.
➢ The procedure is repeated until the desired interval size is obtained.

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

Now 𝑓 𝑥1 = 𝑓 2.5 = (2.5)3 −2.5 − 11 = 2.125 > 0 = +𝑖𝑣ⅇ


⇒ Root lies between " 𝑎 = 2 " and " 𝑥1 = 2.5 “
2nd approximation is
𝑎 + 𝑥1 2 + 2.5
𝑥2 = = = 2.25
2 2
Now 𝑓 𝑥2 = 𝑓 2.25 = (2.25)3 −2.25 − 11 = −1.859375 < 0 = −𝑖𝑣ⅇ 12
⇒ Root lies between "𝑥2 = 2.25 " and " 𝑥1 = 2.5 “
3rd approximation is
𝑥2 + 𝑥1 2.25 + 2.5
𝑥3 = = = 2.375
2 2
Now 𝑓 𝑥3 = 𝑓 2.375 = (2.375)3 −2.375 − 11 = 0.0214843 = +𝑖𝑣ⅇ
⇒ Root lies between "𝑥3 = 2.375 " and " 𝑥2 = 2.25 “
4th approximation is
𝑥3 + 𝑥2 2.375 + 2.25
𝑥4 = = = 2.3125
2 2
Now 𝑓 𝑥4 = 𝑓 2.3125 = (2.3125)3 −2.3125 − 11 = −0.9460449 = −𝑖𝑣ⅇ

⇒ Root lies between "𝑥4 = 2.3125 " and " 𝑥3 = 2.375 “


5th approximation is
𝑥4 + 𝑥3 2.3125 + 2.375
𝑥5 = = = 2.34375
2 2
Now 𝑓 𝑥5 = 𝑓 2.34375 = −0.4691467 = −𝑖𝑣ⅇ
13
⇒ Root lies between "𝑥3 = 2.375 " and " 𝑥5 = 2.34375“
6th approximation is
𝑥3 + 𝑥5 2.375 + 2.34375
𝑥6 = = = 2.359375
2 2
Now 𝑓 𝑥6 = 𝑓 2.359375 = −0.2255592 = −𝑖𝑣ⅇ
⇒ Root lies between "𝑥3 = 2.375 " and " 𝑥6 = 2.359375“
7th approximation is
𝑥3 + 𝑥6 2.375 + 2.359375
𝑥7 = = = 2.3671875
2 2
Now 𝑓 𝑥7 = 𝑓 2.3671875 = −0.1024708 = −𝑖𝑣ⅇ

⇒ Root lies between "𝑥7 = 2.3671875 " and " 𝑥3 = 2.375 “


8th approximation is
𝑥7 + 𝑥3 2.3671875 + 2.375
𝑥8 = = = 2.3710938
2 2
Now 𝑓 𝑥8 = 𝑓 2.3710938 = −0.040601 = −𝑖𝑣ⅇ
14
⇒ Root lies between "𝑥3 = 2.375 " and " 𝑥8 = 2.3710938“
9th approximation is
𝑥3 + 𝑥8 2.375 + 2.3710938
𝑥9 = = = 2.3730469
2 2
Now 𝑓 𝑥9 = 𝑓 2.3730469 = −9.585468 × 10−3 = −𝑖𝑣ⅇ
⇒ Root lies between "𝑥3 = 2.375 " and " 𝑥9 = 2.3730469“
10th approximation is
𝑥3 + 𝑥9 2.375 + 2.3730469
𝑥10 = = = 2.37402345
2 2
Now 𝑓 𝑥10 = 𝑓 2.3740235 = 5.942661 × 10−3 = +𝑖𝑣ⅇ

⇒ 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 = +𝑖𝑣ⅇ

⇒ Root lies between "𝑥11 = 2.373535175" and " 𝑥13 = 2.373657256“


14th approximation is
𝑥11 + 𝑥13 2.373535175 + 2.373657256
𝑥14 = = = 2.3735962155
2 2
Now 𝑓 𝑥14 = 𝑓 2.3735962155 = −0.000852468 = −𝑖𝑣ⅇ
16
⇒ Root lies between "𝑥14 = 2.3735962155" and " 𝑥13 = 2.373657256“

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

Now 𝑓 𝑥1 = 𝑓 1.5 = (1.5)3 − 1.5 2 − 2 = −0.8750 < 0 = −𝑖𝑣ⅇ


⇒ Root lies between " 𝑏 = 2 " and " 𝑥1 = 2.5 “
2nd approximation is
𝑏 + 𝑥1 2 + 1.5
𝑥2 = = = 1.75
2 2
Now 𝑓 𝑥2 = 𝑓 1.75 = (1.75)3 − 1.75 2 − 2 = 0.2969 > 0 = +𝑖𝑣ⅇ 18
⇒ Root lies between "𝑥2 = 1.75" and " 𝑥1 = 1.5 “
3rd approximation is
𝑥2 + 𝑥1 1.75 + 1.5
𝑥3 = = = 1.6250
2 2
Now 𝑓 𝑥3 = 𝑓 1.6250 = (1.6250)3 −(1.6250)2 −2 = −0.34960 = −𝑖𝑣ⅇ
⇒ Root lies between "𝑥3 = 1.6250" and " 𝑥2 = 1.75 “
4th approximation is
𝑥3 + 𝑥2 1.6250 + 1.75
𝑥4 = = = 1.6875
2 2
Now 𝑓 𝑥4 = 𝑓 1.6875 = (1.6875)3 −(1.6875)2 −2 = −0.042236 = −𝑖𝑣ⅇ

⇒ Root lies between "𝑥4 = 1.6875" and " 𝑥2 = 1.75 “


5th approximation is
𝑥4 + 𝑥3 1.6875 + 1.75
𝑥5 = = = 1.71875
2 2
Now 𝑓 𝑥5 = 𝑓 1.7188 = 0.123260 = +𝑖𝑣ⅇ
19
⇒ Root lies between "𝑥5 = 1.71875" and " 𝑥4 = 1.6875“
6th approximation is
𝑥5 + 𝑥4 1.71875 + 1.6875
𝑥6 = = = 1.703125
2 2
Now 𝑓 𝑥6 = 𝑓 1.703125 = 0.0395088 = +𝑖𝑣ⅇ
⇒ Root lies between "𝑥6 = 1.703125" and " 𝑥4 = 1.6875“
7th approximation is
𝑥6 + 𝑥4 1.703125 + 1.6875
𝑥7 = = = 1.6953125
2 2
Now 𝑓 𝑥7 = 𝑓 1.6953125 = −0.0016131 = −𝑖𝑣ⅇ

⇒ Root lies between "𝑥7 = 1.6953125" and " 𝑥6 = 1.703125“


8th approximation is
𝑥7 + 𝑥6 1.6953125 + 1.703125
𝑥8 = = = 1.699218
2 2
Now 𝑓 𝑥8 = 𝑓 1.699218 = 0.01888 = +𝑖𝑣ⅇ
20
⇒ Root lies between "𝑥8 = 1.699218 " and " 𝑥7 = 1.6953125“
9th approximation is
𝑥8 + 𝑥7 1.699218 + 1.6953125
𝑥9 = = = 1.69726525
2 2
Now 𝑓 𝑥9 = 𝑓 1.69726525 = 0.0722
Root correct up to 2-decimal places is 1.69.

EXAMPLE #3: Find the real root of the equation 𝑥 3 − 3𝑥 + 1 = 0


in the interval 0, 2 ?
SOLUTION:
Let 𝑓 𝑥 = 𝑥 3 − 3𝑥 + 1
𝑓 𝑎 = 𝑓 0 = 03 − 0 + 1 = 1 > 0
𝑓 𝑏 =𝑓 2 =8−6+1=3>0
Assumptions are not satisfied Bisection method can not be used.
21
EXAMPLE # 4: Find the real root of the equation
sin 𝑥 + 𝑥 2 − 1 = 0 in the interval 0, 1 , correct to 2- decimal
places using bisection method.
SOLUTION: Let 𝑓 𝑥 = sin 𝑥 + 𝑥 2 − 1
𝑓 𝑎 = 𝑓 0 = 0 + 0 − 1 = −1 < 0
𝑓 𝑏 = 𝑓 1 = sin(1) + 1 − 1 = 0.84147 > 0
⇒ Root lies between " 𝑎 = 0 " and " 𝑏 = 1 “
1st approximation is
𝑎+𝑏 0+1
𝑥1 = = = 0.5
2 2
Now 𝑓 𝑥1 = 𝑓 0.5 = sin(0.5) + 0.5 2 − 1 = −0.27057 < 0 = −𝑖𝑣ⅇ
⇒ Root lies between " 𝑏 = 1 " and " 𝑥1 = 0.5 “
2nd approximation is
𝑏 + 𝑥1 1 + 0.5
𝑥2 = = = 0.75
2 2
2
Now 𝑓 𝑥2 = 𝑓 0.75 = sin(0.75) + 0.75 − 1 = 0.244138 > 0 = +𝑖𝑣ⅇ
22
⇒ Root lies between "𝑥2 = 0.75" and " 𝑥1 = 0.5 “
3rd approximation is
𝑥2 + 𝑥1 0.75 + 0.5
𝑥3 = = = 0.625
2 2
Now 𝑓 𝑥3 = 𝑓 0.6250 = sin(0.625) + 0.625 2 − 1 = −0.0242 = −𝑖𝑣ⅇ
⇒ Root lies between "𝑥3 = 0.625" and " 𝑥2 = 0.75“
4th approximation is
𝑥3 + 𝑥2 0.625 + 0.75
𝑥4 = = = 0.6875
2 2
Now 𝑓 𝑥4 = 𝑓 0.6875 = 0.1072633 = +𝑖𝑣ⅇ

⇒ Root lies between "𝑥4 = 0.6875" and " 𝑥3 = 0.625 “


5th approximation is
𝑥4 + 𝑥3 0.6875 + 0.625
𝑥5 = = = 0.65625
2 2
Now 𝑓 𝑥5 = 𝑓 0.65625 = 0.0408 = +𝑖𝑣ⅇ
23
⇒ Root lies between "𝑥5 = 0.65625" and " 𝑥3 = 0.625“
6th approximation is
𝑥5 + 𝑥3 0.65625 + 0.625
𝑥6 = = = 0.64062
2 2
Now 𝑓 𝑥6 = 𝑓 0.64062 = 0.0080866 = +𝑖𝑣ⅇ
⇒ Root lies between "𝑥6 = 0.64062" and " 𝑥3 = 0.625“
7th approximation is
𝑥3 + 𝑥6 0.625 + 0.64062
𝑥7 = = = 0.63281
2 2
Now 𝑓 𝑥7 = 𝑓 0.63281 = −0.008138 = −𝑖𝑣ⅇ
⇒ Root lies between "𝑥7 = 0.63281" and " 𝑥6 = 0.64062“
8th approximation is
𝑥7 + 𝑥6 0.64062 + 0.63281
𝑥8 = = = 0.636715
2 2
Now 𝑓 𝑥8 = 𝑓 0.636715 = −0.0000366 = −𝑖𝑣ⅇ
Root correct up to 2-decimal places is 0.63 24
ADVANTAGES

➢ Simple and easy to implement.


➢ One function evaluation per iteration.
➢ The size of the interval containing the zero is reduced by 50%
after each iteration
➢ The important property of bisection method is that it always
converges to a solution, and for that reason it is often used as a
starter for the more efficient methods.

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 )

The process is to be repeated till the root is found to the desired


accuracy.
30
EXAMPLE#1: Find a real root of the equation 𝑥 3 − 2𝑥 − 5 = 0 by
the method of false position correct to three decimal places.
SOLUTION: Let 𝑓 𝑥 = 𝑥 3 − 2𝑥 − 5
𝑓(𝑎) = 𝑓 2 = 23 − 2(2) − 5 = −1 < 0
𝑓 𝑏 = 𝑓 3 = 33 − 2 3 − 5 = 16 > 0
⇒ Root lies between " 𝑎 = 2 " and " 𝑏 = 3 “
1st approximation is
𝑎𝑓 𝑏 − 𝑏𝑓 𝑎 2 16 − 3(−1) 35
𝑥1 = = = = 2.0588
𝑓(𝑏) − 𝑓(𝑎) 16 − (−1) 17

Now 𝑓 𝑥1 = 𝑓 2.0588 = (2.0588)3 −2 2.0588 − 5 = −0.391 = −𝑖𝑣ⅇ


⇒ Root lies between " 𝑏 = 3 " and " 𝑥1 = 2.0588 “
2nd approximation is
𝑥1 𝑓 𝑏 − 𝑏𝑓 𝑥1 2.0588 16 − 3(−0.391) 34.1138
𝑥2 = = = = 2.08125
𝑓(𝑏) − 𝑓(𝑥1 ) 16 − (−0.391) 16.391

Now 𝑓 𝑥2 = 𝑓 2.08125 = (2.08125)3 −2(2.08125) − 5 = −0.147(−𝑖𝑣ⅇ)


31
⇒ Root lies between "𝑥2 = 2.08125" and " 𝑏 = 3“
3rd approximation is

𝑥2 𝑓 𝑏 − 𝑏𝑓 𝑥2 2.08125 16 − 3(−0.147) 33.741


𝑥3 = = = = 2.0896
𝑓(𝑏) − 𝑓(𝑥2 ) 16 − (−0.147) 16.147

Now 𝑓 𝑥3 = 𝑓 2.0896 = (2.0896)3 −2 2.0896 − 5 = −0.0551 = −𝑖𝑣ⅇ


⇒ Root lies between "𝑥3 = 2.0896" and " 𝑏 = 3 “
4th approximation is

𝑥3 𝑓 𝑏 − 𝑏𝑓 𝑥3 2.0896 16 − 3(−0.0551) 33.5989


𝑥4 = = = = 2.0927
𝑓(𝑏) − 𝑓(𝑥3 ) 16 − (−0.0551) 16.0551
Now 𝑓 𝑥4 = 𝑓 2.0927 = (2.0927)3 −2(2.0927) − 5 = −0.0206 = −𝑖𝑣ⅇ

⇒ Root lies between "𝑥4 = 2.0927" and "𝑏 = 3“

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

Now 𝑓 𝑥6 = 𝑓 2.0943 = −0.0028 = −𝑖𝑣ⅇ


⇒ Root lies between "𝑥6 = 2.0943" and " 𝑏 = 3 “
7th approximation is
𝑥6 𝑓 𝑏 − 𝑏𝑓 𝑥6 2.0943 16 − 3(−0.0028) 33.5172
𝑥7 = = = = 2.0944
𝑓(𝑏) − 𝑓(𝑥6 ) 16 − (−0.0028) 16.0028
Therefore the root is 2.0944, correct to three decimal places.
33
EXAMPLE#2: Find a real root of the equation 𝑥ⅇ 𝑥 = 3 by the method
of false position correct to three decimal places.
SOLUTION: Let 𝑓 𝑥 = 𝑥ⅇ 𝑥 − 3
𝑓(𝑎) = 𝑓 1 = ⅇ − 3 = −0.28172 < 0
𝑓 𝑏 = 𝑓 1.5 = (1.5)ⅇ 1.5 −3 = 3.72253 > 0
⇒ Root lies between " 𝑎 = 1 " and " 𝑏 = 1.5 “
1st approximation is
𝑎𝑓 𝑏 − 𝑏𝑓 𝑎 1 3.72253 − 1.5(−0.28172) 4.14511
𝑥1 = = = = 1.035
𝑓(𝑏) − 𝑓(𝑎) 3.72253 − (−0.28172) 4.00425

Now 𝑓 𝑥1 = 𝑓 1.035 = 1.035 ⅇ 1.035 − 3 = −0.0864 = −𝑖𝑣ⅇ


⇒ Root lies between " 𝑏 = 1.5 " and " 𝑥1 = 1.035“
2nd approximation is
𝑥1 𝑓 𝑏 − 𝑏𝑓 𝑥1 1.035 3.72253 − 1.5(−0.0864) 3.98242
𝑥2 = = = = 1.045
𝑓(𝑏) − 𝑓(𝑥1 ) 3.72253 − (−0.0864) 3.80893

Now 𝑓 𝑥2 = 𝑓 1.045 = 1.045 ⅇ 1.045 − 3 = −0.0286485(−𝑖𝑣ⅇ)


34
⇒ Root lies between "𝑥2 = 1.045" and " 𝑏 = 1.5“
3rd approximation is
𝑥2 𝑓 𝑏 − 𝑏𝑓 𝑥2 1.045 3.72253 − 1.5(−0.0286485) 3.9330166
𝑥3 = = =
𝑓(𝑏) − 𝑓(𝑥2 ) 3.72253 − (−0.0286485) 3.7511785
= 1.048

Now 𝑓 𝑥3 = 𝑓 1.048 = 1.048 ⅇ 1.048 − 3 = −0.0111652 = −𝑖𝑣ⅇ


⇒ Root lies between "𝑥3 = 1.048" and " 𝑏 = 1.5 “
4th approximation is

𝑥3 𝑓 𝑏 − 𝑏𝑓 𝑥3 1.048 3.72253 − 1.5(−0.0111652)


𝑥4 = =
𝑓(𝑏) − 𝑓(𝑥3 ) 3.72253 − (−0.0111652)

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

Now 𝑓 𝑥5 = 𝑓 1.0496 = −1.808903 × 10−3 = −𝑖𝑣ⅇ


⇒ Root lies between "𝑥5 = 1.0496" and " 𝑏 = 1.5“
6th approximation is
𝑥5 𝑓 𝑏 − 𝑏𝑓 𝑥5 3.9098808
𝑥6 = = = 1.0498
𝑓(𝑏) − 𝑓(𝑥5 ) 3.7243389
Therefore, from 𝑥5 and 𝑥6 the root is 1.050, correct to three decimal places.

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

Now 𝑓 𝑥1 = 𝑓 2.9 = (2.9)3 −9(2.9) + 1 = −0.711 = −𝑖𝑣ⅇ


⇒ Root lies between " 𝑏 = 3 " and " 𝑥1 = 2.9“
2nd approximation is
𝑥1 𝑓 𝑏 − 𝑏𝑓 𝑥1 2.9 1 − 3(−0.711) 5.033
𝑥2 = = = = 2.94155
𝑓(𝑏) − 𝑓(𝑥1 ) 1 − (−0.711) 1.711
Now 𝑓 𝑥2 = 𝑓 2.94155 = (2.94155)3 −9 2.94155 + 1
= −0.02155(−𝑖𝑣ⅇ)
37
⇒ Root lies between "𝑥2 = 2.94155" and " 𝑏 = 3“
3rd approximation is
𝑥2 𝑓 𝑏 − 𝑏𝑓 𝑥2 2.94155 1 − 3(−0.02155) 3.0062
𝑥3 = = =
𝑓(𝑏) − 𝑓(𝑥2 ) 1 − (−0.02155) 1.02155
= 2.94278

Now 𝑓 𝑥3 = 𝑓 2.94278 = (2.94278)3 −9 2.94278 + 1


= −0.000680 = −𝑖𝑣ⅇ
⇒ Root lies between "𝑥3 = 2.94278" and " 𝑏 = 3 “
4th approximation is

𝑥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

You might also like