Bisection Method Solution Example
Bisection Method Solution Example
Problem 1: g(x) = x3 − x − 1
1. Evaluate the function at boundaries:
g(1) = 13 − 1 − 1 = −1
g(2) = 23 − 2 − 1 = 5
Since g(1) < 0 and g(2) > 0, the root lies in the interval [1, 2].
Iteration 1:
Set a = 1, b = 2.
Calculate the midpoint:
1+2
x1 = = 1.5
2
Evaluate g(x1 ):
Since g(1.5) < 0, the root remains in the interval [1.5, 2].
Iteration 2:
1.5 + 2
x2 = = 1.75
2
Evaluate g(x2 ):
Since g(1.75) > 0, the root remains in the interval [1.5, 1.75].
Iteration 3:
Evaluate g(x3 ):
Since g(1.625) > 0, the root remains in the interval [1.5, 1.625].
Iteration 4:
1.5 + 1.625
x4 = = 1.5625
2
Evaluate g(x4 ):
Since g(1.5625) > 0, the root remains in the interval [1.5, 1.5625].
Iteration 5:
Evaluate g(x5 ):
Since g(1.53125) > 0, the root remains in the interval [1.5, 1.53125].
Iteration 6:
https://chatgpt.com/c/7e83363f-903d-455f-a215-76840da6d632 2/7
7/5/24, 11:45 PM Bisection Method Solution Example
Evaluate g(x6 ):
Since g(1.515625) < 0, the root remains in the interval [1.515625, 1.53125].
Iteration 7:
1.515625 + 1.53125
x7 = = 1.5234375
2
Evaluate g(x7 ):
Since g(1.5234375) > 0, the root remains in the interval [1.515625, 1.5234375].
Iteration 8:
1.515625 + 1.5234375
x8 = = 1.51953125
2
Evaluate g(x8 ):
Since g(1.51953125) < 0, the root remains in the interval [1.51953125, 1.5234375].
Iteration 9:
1.51953125 + 1.5234375
x9 = = 1.521484375
2
Evaluate g(x9 ):
https://chatgpt.com/c/7e83363f-903d-455f-a215-76840da6d632 3/7
7/5/24, 11:45 PM Bisection Method Solution Example
3
g(1.521484375) = (1.521484375) − 1.521484375 − 1 = 0.0006221756339073181
Since g(1.521484375) > 0, the root remains in the interval [1.51953125, 1.521484375].
Iteration 10:
1.51953125 + 1.521484375
x10 = = 1.5205078125
2
Evaluate g(x10 ):
Since g(1.5205078125) < 0, the root remains in the interval [1.5205078125, 1.521484375].
After 10 iterations, the approximate root of g(x) = x3 − x − 1 in the interval [1, 2] is x10 = 1.5205078125.
h(1) = 13 + 4(1)2 − 10 = −5
h(2) = 23 + 4(2)2 − 10 = 14
Since h(1) < 0 and h(2) > 0, the root lies in the interval [1, 2].
Iteration 1:
Set a = 1, b = 2.
Calculate the midpoint:
1+2
x1 = = 1.5
2
Evaluate h(x1 ):
Since h(1.5) < 0, the root remains in the interval [1.5, 2].
Iteration 2:
https://chatgpt.com/c/7e83363f-903d-455f-a215-76840da6d632 4/7
7/5/24, 11:45 PM Bisection Method Solution Example
1.5 + 2
x2 = = 1.75
2
Evaluate h(x2 ):
Since h(1.75) > 0, the root remains in the interval [1.5, 1.75].
Iteration 3:
1.5 + 1.75
x3 = = 1.625
2
Evaluate h(x3 ):
Since h(1.625) > 0, the root remains in the interval [1.5, 1.625].
Iteration 4:
1.5 + 1.625
x4 = = 1.5625
2
Evaluate h(x4 ):
Since h(1.5625) > 0, the root remains in the interval [1.5, 1.5625].
Iteration 5:
https://chatgpt.com/c/7e83363f-903d-455f-a215-76840da6d632 5/7
7/5/24, 11:45 PM Bisection Method Solution Example
a = 1.5, b = 1.5625.
Calculate the midpoint:
1.5 + 1.5625
x5 = = 1.53125
2
Evaluate h(x5 ):
Since h(1.53125) > 0, the root remains in the interval [1.5, 1.53125].
Iteration 6:
1.5 + 1.53125
x6 = = 1.515625
2
Evaluate h(x6 ):
Since h(1.515625) < 0, the root remains in the interval [1.515625, 1.53125].
Iteration 7:
1.515625 + 1.53125
x7 = = 1.5234375
2
Evaluate h(x7 ):
Since h(1.5234375) < 0, the root remains in the interval [1.5234375, 1.53125].
Iteration 8:
https://chatgpt.com/c/7e83363f-903d-455f-a215-76840da6d632 6/7
7/5/24, 11:45 PM Bisection Method Solution Example
1.5234375 + 1.53125
x8 = = 1.52734375
2
Evaluate h(x8 ):
Since h(1.52734375) < 0, the root remains in the interval [1.52734375, 1.53125].
Iteration 9:
1.52734375 + 1.53125
x9 = = 1.529296875
2
Evaluate h(x9 ):
Since h(1.529296875) > 0, the root remains in the interval [1.52734375, 1.529296875].
Iteration 10:
1.52734375 + 1.529296875
x10 = = 1.5283203125
2
Evaluate h(x10 ):
Since h(1.5283203125) < 0, the root remains in the interval [1.5283203125, 1.529296875].
After 10 iterations, the approximate root of h(x) = x3 + 4x2 − 10 in the interval [1, 2] is x10 =
1.5283203125.
https://chatgpt.com/c/7e83363f-903d-455f-a215-76840da6d632 7/7