f(1.0) = 0.841471
f(4.0) = -0.189201
(0.841471) x (-0.189201) < 0
Iteration 1 of 10 with (1.0, 4.0)
↓
c = (1.0 + 4.0) / 2 = 2.5
f(a) = f(1.0) = 0.841471
f(b) = f(4.0) = -0.189201
f(c) = f(2.5) = 0.239389
↓
|f(c)| = |0.239389| > 0.0001 = Tolerance
↓
(a', b') = (2.5, 4.0)
Iteration 2 of 10 with (2.5, 4.0)
↓
c = (2.5 + 4.0) / 2 = 3.25
f(a) = f(2.5) = 0.239389
f(b) = f(4.0) = -0.189201
f(c) = f(3.25) = -0.033291
↓
|f(c)| = |-0.033291| > 0.0001 = Tolerance
↓
(a', b') = (2.5, 3.25)
Iteration 3 of 10 with (2.5, 3.25)
↓
c = (2.5 + 3.25) / 2 = 2.875
f(a) = f(2.5) = 0.239389
f(b) = f(3.25) = -0.033291
f(c) = f(2.875) = 0.091633
↓
|f(c)| = |0.091633| > 0.0001 = Tolerance
↓
(a', b') = (2.875, 3.25)
Iteration 4 of 10 with (2.875, 3.25)
↓
c = (2.875 + 3.25) / 2 = 3.0625
f(a) = f(2.875) = 0.091633
f(b) = f(3.25) = -0.033291
f(c) = f(3.0625) = 0.025799
↓
|f(c)| = |0.025799| > 0.0001 = Tolerance
↓
(a', b') = (3.0625, 3.25)
Iteration 5 of 10 with (3.0625, 3.25)
↓
c = (3.0625 + 3.25) / 2 = 3.15625
f(a) = f(3.0625) = 0.025799
f(b) = f(3.25) = -0.033291
f(c) = f(3.15625) = -0.004644
↓
|f(c)| = |-0.004644| > 0.0001 = Tolerance
↓
(a', b') = (3.0625, 3.15625)
Iteration 6 of 10 with (3.0625, 3.15625)
↓
c = (3.0625 + 3.15625) / 2 = 3.109375
f(a) = f(3.0625) = 0.025799
f(b) = f(3.15625) = -0.004644
f(c) = f(3.109375) = 0.01036
↓
|f(c)| = |0.01036| > 0.0001 = Tolerance
↓
(a', b') = (3.109375, 3.15625)
Iteration 7 of 10 with (3.109375, 3.15625)
↓
c = (3.109375 + 3.15625) / 2 = 3.132812
f(a) = f(3.109375) = 0.01036
f(b) = f(3.15625) = -0.004644
f(c) = f(3.132812) = 0.002803
↓
|f(c)| = |0.002803| > 0.0001 = Tolerance
↓
(a', b') = (3.132812, 3.15625)
Iteration 8 of 10 with (3.132812, 3.15625)
↓
c = (3.132812 + 3.15625) / 2 = 3.144531
f(a) = f(3.132812) = 0.002803
f(b) = f(3.15625) = -0.004644
f(c) = f(3.144531) = -0.000935
↓
|f(c)| = |-0.000935| > 0.0001 = Tolerance
↓
(a', b') = (3.132812, 3.144531)
Iteration 9 of 10 with (3.132812, 3.144531)
↓
c = (3.132812 + 3.144531) / 2 = 3.138672
f(a) = f(3.132812) = 0.002803
f(b) = f(3.144531) = -0.000935
f(c) = f(3.138672) = 0.000931
↓
|f(c)| = |0.000931| > 0.0001 = Tolerance
↓
(a', b') = (3.138672, 3.144531)
Iteration 10 of 10 with (3.138672, 3.144531)
↓
c = (3.138672 + 3.144531) / 2 = 3.141602
f(a) = f(3.138672) = 0.000931
f(b) = f(3.144531) = -0.000935
f(c) = f(3.141602) = -3e-06
↓
|f(c)| = |-3e-06| ≤ 0.0001 = Tolerance
↓
Root = 3.1416015625
Error = ± 2.835786152192458e-06