Find a root of an equation `f(x)=x^3+2x^2+x-1` using Bisection method
Solution:
Here `x^3+2x^2+x-1=0`
Let `f(x) = x^3+2x^2+x-1`
Here
`1^(st)` iteration :
Here `f(0) = -1 < 0` and `f(1) = 3 > 0`
`:.` Now, Root lies between `0` and `1`
`x_0=(0+1)/2=0.5`
`f(x_0)=f(0.5)=0.5^3+2*0.5^2+0.5-1=0.125 > 0`
`2^(nd)` iteration :
Here `f(0) = -1 < 0` and `f(0.5) = 0.125 > 0`
`:.` Now, Root lies between `0` and `0.5`
`x_1=(0+0.5)/2=0.25`
`f(x_1)=f(0.25)=0.25^3+2*0.25^2+0.25-1=-0.6094 < 0`
`3^(rd)` iteration :
Here `f(0.25) = -0.6094 < 0` and `f(0.5) = 0.125 > 0`
`:.` Now, Root lies between `0.25` and `0.5`
`x_2=(0.25+0.5)/2=0.375`
`f(x_2)=f(0.375)=0.375^3+2*0.375^2+0.375-1=-0.291 < 0`
`4^(th)` iteration :
Here `f(0.375) = -0.291 < 0` and `f(0.5) = 0.125 > 0`
`:.` Now, Root lies between `0.375` and `0.5`
`x_3=(0.375+0.5)/2=0.4375`
`f(x_3)=f(0.4375)=0.4375^3+2*0.4375^2+0.4375-1=-0.0959 < 0`
`5^(th)` iteration :
Here `f(0.4375) = -0.0959 < 0` and `f(0.5) = 0.125 > 0`
`:.` Now, Root lies between `0.4375` and `0.5`
`x_4=(0.4375+0.5)/2=0.4688`
`f(x_4)=f(0.4688)=0.4688^3+2*0.4688^2+0.4688-1=0.0112 > 0`
`6^(th)` iteration :
Here `f(0.4375) = -0.0959 < 0` and `f(0.4688) = 0.0112 > 0`
`:.` Now, Root lies between `0.4375` and `0.4688`
`x_5=(0.4375+0.4688)/2=0.4531`
`f(x_5)=f(0.4531)=0.4531^3+2*0.4531^2+0.4531-1=-0.0432 < 0`
`7^(th)` iteration :
Here `f(0.4531) = -0.0432 < 0` and `f(0.4688) = 0.0112 > 0`
`:.` Now, Root lies between `0.4531` and `0.4688`
`x_6=(0.4531+0.4688)/2=0.4609`
`f(x_6)=f(0.4609)=0.4609^3+2*0.4609^2+0.4609-1=-0.0162 < 0`
`8^(th)` iteration :
Here `f(0.4609) = -0.0162 < 0` and `f(0.4688) = 0.0112 > 0`
`:.` Now, Root lies between `0.4609` and `0.4688`
`x_7=(0.4609+0.4688)/2=0.4648`
`f(x_7)=f(0.4648)=0.4648^3+2*0.4648^2+0.4648-1=-0.0026 < 0`
`9^(th)` iteration :
Here `f(0.4648) = -0.0026 < 0` and `f(0.4688) = 0.0112 > 0`
`:.` Now, Root lies between `0.4648` and `0.4688`
`x_8=(0.4648+0.4688)/2=0.4668`
`f(x_8)=f(0.4668)=0.4668^3+2*0.4668^2+0.4668-1=0.0043 > 0`
`10^(th)` iteration :
Here `f(0.4648) = -0.0026 < 0` and `f(0.4668) = 0.0043 > 0`
`:.` Now, Root lies between `0.4648` and `0.4668`
`x_9=(0.4648+0.4668)/2=0.4658`
`f(x_9)=f(0.4658)=0.4658^3+2*0.4658^2+0.4658-1=0.0009 > 0`
`11^(th)` iteration :
Here `f(0.4648) = -0.0026 < 0` and `f(0.4658) = 0.0009 > 0`
`:.` Now, Root lies between `0.4648` and `0.4658`
`x_10=(0.4648+0.4658)/2=0.4653`
`f(x_10)=f(0.4653)=0.4653^3+2*0.4653^2+0.4653-1=-0.0008 < 0`
`12^(th)` iteration :
Here `f(0.4653) = -0.0008 < 0` and `f(0.4658) = 0.0009 > 0`
`:.` Now, Root lies between `0.4653` and `0.4658`
`x_11=(0.4653+0.4658)/2=0.4656`
`f(x_11)=f(0.4656)=0.4656^3+2*0.4656^2+0.4656-1=0 > 0`
Approximate root of the equation `x^3+2x^2+x-1=0` using Bisection method is `0.4656` (After 12 iterations)
`n` | `a` | `f(a)` | `b` | `f(b)` | `c=(a + b)/2` | `f(c)` | Update |
1 | 0 | -1 | 1 | 3 | 0.5 | 0.125 | `b = c` |
2 | 0 | -1 | 0.5 | 0.125 | 0.25 | -0.6094 | `a = c` |
3 | 0.25 | -0.6094 | 0.5 | 0.125 | 0.375 | -0.291 | `a = c` |
4 | 0.375 | -0.291 | 0.5 | 0.125 | 0.4375 | -0.0959 | `a = c` |
5 | 0.4375 | -0.0959 | 0.5 | 0.125 | 0.4688 | 0.0112 | `b = c` |
6 | 0.4375 | -0.0959 | 0.4688 | 0.0112 | 0.4531 | -0.0432 | `a = c` |
7 | 0.4531 | -0.0432 | 0.4688 | 0.0112 | 0.4609 | -0.0162 | `a = c` |
8 | 0.4609 | -0.0162 | 0.4688 | 0.0112 | 0.4648 | -0.0026 | `a = c` |
9 | 0.4648 | -0.0026 | 0.4688 | 0.0112 | 0.4668 | 0.0043 | `b = c` |
10 | 0.4648 | -0.0026 | 0.4668 | 0.0043 | 0.4658 | 0.0009 | `b = c` |
11 | 0.4648 | -0.0026 | 0.4658 | 0.0009 | 0.4653 | -0.0008 | `a = c` |
12 | 0.4653 | -0.0008 | 0.4658 | 0.0009 | 0.4656 | 0 | `b = c` |
This material is intended as a summary. Use your textbook for detail explanation.
Any bug, improvement, feedback then