Bisection Method: Roots of Equation
Bisection Method: Roots of Equation
Roots of Equation
Asifur Rahman
CEN 205 Numerical Methods Asifur Rahman January 11, 2018 1/6
Motivation for Numerical Solution of Root Bisection Method
Solution By Factorization
2
x − 5x + 6 = 0
2
x − 3x − 2x + 6 = 0
x(x − 3) − 2(x − 3) = 0
(x − 3)(x − 2) = 0
So the solution, x = 2, 3
CEN 205 Numerical Methods Asifur Rahman January 11, 2018 2/6
Behavior of Nonlinear Equations Bisection Method
CEN 205 Numerical Methods Asifur Rahman January 11, 2018 3/6
Bisection Method Bisection Method
Steps
1. Find two estimates of root, x = a to the left and x = b to the right of root.
2. Then determine c = (a + b)/2
3. If, f(a) f(c) < 0, set b = c and follow step 2.
If, f(b) f(c) < 0, set a = c and follow step 2.
CEN 205 Numerical Methods Asifur Rahman January 11, 2018 4/6
Example 1 Bisection Method
Bisection Method
i a b c f(a) f(b) f(c) a
1 1.0000 2.0000 1.5000 −3.5634 14.7781 3.7134 -
2 1.0000 1.5000 1.2500 −3.5634 3.7134 −0.3318 20.0000
3 1.2500 1.5000 1.3750 −0.3318 3.7134 1.5820 9.0909
4 1.2500 1.3750 1.3125 −0.3318 1.5820 0.5989 4.7619
Iteration 1
a = 1, b = 2 5 1.2500 1.3125 1.2813 −0.3318 0.5989 0.1271 2.4390
c = (a + b)/2 = (1 + 2)/2 = 1.5 6 1.2500 1.2813 1.2656 −0.3318 0.1271 −0.1040 1.2346
2 (1) 7 1.2656 1.2813 1.2734 −0.1040 0.1271 0.0112 0.6135
f(a) = 3(1) + 2e − 12 = −3.5634
2 (2)
f(b) = 3(2) + 2e − 12 = +14.7781
2 (1.5)
f(c) = 3(1.5) + 2e − 12 = +3.7134
Since, f(a) f(c) < 0, the root lies between 1 and 1.5
So, a = 1 and b = 1.5 for next iteration.
CEN 205 Numerical Methods Asifur Rahman January 11, 2018 5/6
Example 2 Bisection Method
Since, f(b) f(c) < 0, the root lies between 12.5 and 15. So, a = 12.5 and
b = 15 for next iteration.
Bisection Method
Given that, the cable follows the equation,
i a b c f(a) f(b) f(c) a
T w T
y= cosh x + y0 − 1 10.0000 15.0000 12.5000 2.7626 −1.5892 0.1340 -
w T w
2 12.5000 15.0000 13.7500 0.1340 −1.5892 −0.8085 9.0909
Solution. 3 12.5000 13.7500 13.1250 0.1340 −0.8085 −0.3605 4.7619
Substituing the given values on equation and then
4 12.5000 13.1250 12.8125 0.1340 −0.3605 −0.1195 2.4390
rearranging we find,
T
0.1
T 5 12.5000 12.8125 12.6563 0.1340 −0.1195 0.0057 1.2346
15 = cosh ×50 + 5 −
0.1 T 0.1 6 12.6563 12.8125 12.7344 0.0057 −0.1195 −0.0573 0.6135
5
10T cosh − 1 − 10 = 0
T
Now solve T using bisection method.
CEN 205 Numerical Methods Asifur Rahman January 11, 2018 6/6