0% found this document useful (0 votes)
5 views30 pages

Bisection Method

Download as pdf or txt
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 30

THE BISECTION METHOD

Introduction
• Bisection Method:

• Bisection Method is a numerical method in


Mathematics to find a root of a given
function
Introduction (cont.)
•Root of a function:
• Root of a function f(x) = 0, is value a
such that:
• f(a) = 0
Introduction (cont.)
•Example:

Function: f(x) = x2 - 4

Roots: x = -2, x = 2

Because:
f(-2) = (-2)2 - 4 = 4 - 4 = 0
f(2) = (2)2 - 4 = 4 - 4 = 0
A Mathematical Property
•Well-known Mathematical Property:
• If a function f(x) is continuous on the interval [a,b] and
sign of f(a) ≠ sign of f(b), then

• There is a value c ∈ [a..b] such that: f(c) = 0


I.e., there is a root c in the interval [a..b]
A Mathematical Property (cont.)
• Example:
The Bisection Method
• The Bisection Method is a successive approximation method
that narrows down an interval that contains a root of the
function f(x).
• The Bisection Method is given an initial interval [a..b] that
contains a root (We can use the property sign of f(a) ≠ sign of
f(b) to find such an initial interval).
• The Bisection Method will cut the interval into 2 halves and
check which half interval contains a root of the function.
• The Bisection Method will keep cut the interval in halves until
the resulting interval is extremely small
The root is then approximately equal to any value in the final
(very small) interval.
The Bisection Method (cont.)
•Example:
• Suppose the interval [a..b] is as follows:
The Bisection Method (cont.)

•We cut the interval [a..b] in the middle:

m = (a+b)/2
The Bisection Method (cont.)

• Because sign of f(m) ≠ sign of f(a) , we proceed with


the search in the new interval [a,b]:
The Bisection Method (cont.)

We can use this statement to change to


the new interval:
b = m;
The Bisection Method (cont.)

• In the above example, we have changed the end


point b to obtain a smaller interval that still
contains a root

In other cases, we may need to changed the end


point b to obtain a smaller interval that still
contains a root
The Bisection Method (cont.)
• Here is an example where you have to change the
end point a:
• Initial interval [a..b]:
The Bisection Method (cont.)

• After cutting the interval in half, the root is contained in the


right-half, so we have to change the end point a:
Example 1 : solve the equation

correct up to 2 significant figures using bisection


method.
• Solution:
Here, 𝑓 𝑥 = 𝑥 − 1.1𝑥 + 4𝑥 − 4.4

𝑓 1 = 1 − 1.1 ∗ 1 + 4 ∗ 1 − 4.4 = −0.5 < 0


𝑓 2 = 2 − 1.1 ∗ 2 + 4 ∗ 2 − 4.4 = 7.2 > 0
Hence 𝑓 1 ∗ 𝑓 2 < 0
Hence the required root is in 1,2 = [𝑎, 𝑏]
i.e. 𝑥 ∈ 1,2 , 𝑓𝑜𝑟 𝑤ℎ𝑖𝑐ℎ 𝑓 𝑥 = 0
Taking 𝑎 = 1 & 𝑏 = 2 we have following.
𝑎 +𝑏
N 𝑎 𝑏 𝑥 = 𝑓(𝑎 ) 𝑓(𝑏 ) 𝑓(𝑥 )
2
solution:
𝑎 +𝑏
N 𝑎 𝑏 𝑥 = 𝑓(𝑎 ) 𝑓(𝑏 ) 𝑓(𝑥 )
2

0 1 2 1.5 -0.5 7.2 2.5


1 1 1.5 1.25 -0.5 2.5 0.834375
2 1 1.25 1.125 -0.5 0.834375 0.131641
3 1 1.125 1.0625 -0.5 0.131641 -0.19233
4 1.0625 1.125 1.09375 -0.19233 0.131641 -0.03248
5 1.09375 1.125 1.109375 -0.03248 0.131641 0.049038
6 1.09375 1.109375 1.101563 -0.03248 0.049038 0.008146
7 1.09375 1.101563 1.097656 -0.03248 0.008146 -0.0122
8 1.097656 1.101563 1.099609 -0.0122 0.008146 -0.00203
9 1.099609 1.101563 1.100586 -0.00203 0.008146 0.003053
•Example-2
Solve the equation for the
roots lying between 2 and 3 correct up to 3
significant figures using bisection method.

•Example-3
Solve the equation for the
roots lying between 1 and 2 correct up to 2
decimal places using bisection method.
Example 2 : solution
𝑎 +𝑏
N 𝑎 𝑏 𝑥 = 𝑓(𝑎 ) 𝑓(𝑏 ) 𝑓(𝑥 )
2

0 2 3 2.5 -9 1 -5.875

1 2.5 3 2.75 -5.875 1 -2.95313

2 2.75 3 2.875 -2.95313 1 -1.11133

3 2.875 3 2.9375 -1.11133 1 -0.09009

4 2.9375 3 2.96875 -0.09009 1 0.446259

5 2.9375 2.96875 2.953125 -0.09009 0.446259 0.175922

6 2.9375 2.953125 2.945313 -0.09009 0.175922 0.042378

7 2.9375 2.945313 2.941406 -0.09009 0.042378 -0.02399

8 2.941406 2.945313 2.943359 -0.02399 0.042378 0.00916

9 2.941406 2.943359 2.942383 -0.02399 0.00916 -0.00742


Solution :3
𝑥
N 𝑎 𝑏 𝑎 +𝑏 𝑓(𝑎 ) 𝑓(𝑏 ) 𝑓(𝑥 )
=
2
0 1 2 1.5 -1 0.693147 -0.09453

1 1.5 2 1.75 -0.09453 0.693147 0.309616

2 1.5 1.75 1.625 -0.09453 0.309616 0.110508

3 1.5 1.625 1.5625 -0.09453 0.110508 0.008787

4 1.5 1.5625 1.53125 -0.09453 0.008787 -0.04267

5 1.53125 1.5625 1.546875 -0.04267 0.008787 -0.01689

6 1.546875 1.5625 1.554688 -0.01689 0.008787 -0.00404

7 1.554688 1.5625 1.558594 -0.00404 0.008787 0.002378

8 1.554688 1.558594 1.556641 -0.00404 0.002378 -0.00083

9 1.556641 1.558594 1.557617 -0.00083 0.002378 0.000774


METHOD OF FALSE POSITION

(REGULA FALSI METHOD)


Process:

𝑎=𝑎 𝑎 𝑎

𝑏=𝑏
𝑏
𝑏
Process:

𝑏−𝑎
𝐵 𝑏, 𝑓 𝑏

𝑓 𝑏


𝑎
𝑎
𝑏 𝑥 𝑏
𝑓 𝑎

𝐴 𝑎, 𝑓 𝑎
Process:
From the given figure we can see that
𝑏−𝑎
triangle ∆𝑂𝐴𝐵 &∆𝑂𝐶𝐷 are similar. D C
Hence,
𝐴𝐵 𝑂𝐴
=
𝐶𝐷 𝑂𝐷 𝑓 𝑏
ℎ 𝑓(𝑎)
=
𝑏−𝑎 𝑓(𝑎) + 𝑓(𝑏) ℎ
𝑓(𝑎) ∗ 𝑏 − 𝑎 𝑎 B
ℎ=
𝑓(𝑎) + 𝑓(𝑏) A 𝑥 𝑏
𝑓 𝑎
𝑥 =𝑎+ℎ
For iterations O
𝑓(𝑎 ) ∗ 𝑏 − 𝑎
ℎ =
𝑓(𝑎 ) + 𝑓(𝑏 )
𝑥 =𝑎 +ℎ
Steps :
• Equation is given make appropriate Function from this call it 𝑓(𝑥)
• Find 𝑎 & 𝑏 in which root is lying between.
• Follow the process …

𝑛 𝑎 𝑏 𝑓(𝑎 ) 𝑓(𝑏 ) 𝑏 −𝑎 ℎ 𝑥 𝑓 𝑥

0 𝑎 𝑏 𝑓(𝑎 ) 𝑓(𝑏 ) 𝑏 −𝑎 ℎ 𝑥 𝑓 𝑥

⋮ ⋮ ⋮ ⋮ ⋮ ⋮ ⋮ ⋮ ⋮
⋮ ⋮ ⋮ ⋮ ⋮ ⋮ ⋮ ⋮ ⋮
Example 1: using Regula-falsi (RF) method
find the root of function
correct up to 3 significant figures.
• Solution:
Here, 𝑓 𝑥 = 𝑥 + 2𝑥 −2

𝑓 0 = −2 < 0
𝑓 1 =1>0
Hence 𝑓 0 ∗ 𝑓 1 < 0
Hence the required root is in 0,1 = [𝑎, 𝑏]
i.e. 𝑥 ∈ 0,1 , 𝑓𝑜𝑟 𝑤ℎ𝑖𝑐ℎ 𝑓 𝑥 = 0
Taking 𝑎 = 0 & 𝑏 = 1 we have following.
Solution 1:
𝒏 𝒂𝒏 𝒃𝒏 𝒇(𝒂𝒏 ) 𝒇(𝒃𝒏 ) 𝒃𝒏 − 𝒂𝒏 𝒉𝒏 𝒙𝒏 𝟏 𝒇 𝒙𝒏 𝟏

0 0.00000 1.00000 -2.00000 1.00000 1.00000 0.66667 0.66667 -0.37037

1 0.66667 1.00000 -0.37037 1.00000 0.33333 0.09009 0.75676 -0.05311

2 0.75676 1.00000 -0.05311 1.00000 0.24324 0.01227 0.76902 -0.00716

3 0.76902 1.00000 -0.00716 1.00000 0.23098 0.00164 0.77066 -0.00096

4 0.77066 1.00000 -0.00096 1.00000 0.22934 0.00022 0.77088 -0.00013

5 0.77088 1.00000 -0.00013 1.00000 0.22912 0.00003 0.77091 -0.00002

6 0.77091 1.00000 -0.00002 1.00000 0.22909 0.00000 0.77092 0.00000

7 0.77092 1.00000 0.00000 1.00000 0.22908 0.00000 0.77092 0.00000


•Example-2
Solve the equation by RF
method, correct upto 3 decimal places.

•Example-3
Solve the equation by RF
method correct up to 4 significant places.
Solution 2:
𝒏 𝒂𝒏 𝒃𝒏 𝒇(𝒂𝒏 ) 𝒇(𝒃𝒏 ) 𝒃𝒏 − 𝒂𝒏 𝒉𝒏 𝒙𝒏 𝟏 𝒇 𝒙𝒏 𝟏

0 1.00000 2.00000 -1.00000 0.38629 1.00000 0.72135 1.72135 -0.06512

1 1.72135 2.00000 -0.06512 0.38629 0.27865 0.04020 1.76155 -0.00263

2 1.76155 2.00000 -0.00263 0.38629 0.23845 0.00161 1.76316 -0.00010

3 1.76316 2.00000 -0.00010 0.38629 0.23684 0.00006 1.76322 0.00000

4 1.76322 2.00000 0.00000 0.38629 0.23678 0.00000 1.76322 0.00000

5 1.76322 2.00000 0.00000 0.38629 0.23678 0.00000 1.76322 0.00000

6 1.76322 2.00000 0.00000 0.38629 0.23678 0.00000 1.76322 0.00000

7 1.76322 2.00000 0.00000 0.38629 0.23678 0.00000 1.76322 0.00000


Solution 1:
𝒏 𝒂𝒏 𝒃𝒏 𝒇(𝒂𝒏 ) 𝒇(𝒃𝒏 ) 𝒃𝒏 − 𝒂𝒏 𝒉𝒏 𝒙𝒏 𝟏 𝒇 𝒙𝒏 𝟏

0 1.50000 2.00000 0.06823 -0.50685 0.50000 0.05932 1.55932 0.01141

1 1.55932 2.00000 0.01141 -0.50685 0.44068 0.00970 1.56902 0.00177

2 1.56902 2.00000 0.00177 -0.50685 0.43098 0.00150 1.57052 0.00027

3 1.57052 2.00000 0.00027 -0.50685 0.42948 0.00023 1.57075 0.00004

4 1.57075 2.00000 0.00004 -0.50685 0.42925 0.00004 1.57079 0.00001

5 1.57079 2.00000 0.00001 -0.50685 0.42921 0.00001 1.57080 0.00000

6 1.57080 2.00000 0.00000 -0.50685 0.42920 0.00000 1.57080 0.00000

7 1.57080 2.00000 0.00000 -0.50685 0.42920 0.00000 1.57080 0.00000

You might also like