Find `sqrt(12)` using Bisection method
Solution:
Let `x=sqrt(12)`
`:.x^2=12`
`:.x^2-12=0`
i.e. `f(x)=x^2-12`
Here
`x` | 0 | 1 | 2 | 3 | 4 |
---|
`f(x)` | -12 | -11 | -8 | -3 | 4 |
---|
`1^(st)` iteration :
Here `f(3) = -3 < 0` and `f(4) = 4 > 0`
`:.` Now, Root lies between `3` and `4`
`x_0=(3+4)/2=3.5`
`f(x_0)=f(3.5)=3.5^2-12=0.25 > 0`
`2^(nd)` iteration :
Here `f(3) = -3 < 0` and `f(3.5) = 0.25 > 0`
`:.` Now, Root lies between `3` and `3.5`
`x_1=(3+3.5)/2=3.25`
`f(x_1)=f(3.25)=3.25^2-12=-1.4375 < 0`
`3^(rd)` iteration :
Here `f(3.25) = -1.4375 < 0` and `f(3.5) = 0.25 > 0`
`:.` Now, Root lies between `3.25` and `3.5`
`x_2=(3.25+3.5)/2=3.375`
`f(x_2)=f(3.375)=3.375^2-12=-0.6094 < 0`
`4^(th)` iteration :
Here `f(3.375) = -0.6094 < 0` and `f(3.5) = 0.25 > 0`
`:.` Now, Root lies between `3.375` and `3.5`
`x_3=(3.375+3.5)/2=3.4375`
`f(x_3)=f(3.4375)=3.4375^2-12=-0.1836 < 0`
`5^(th)` iteration :
Here `f(3.4375) = -0.1836 < 0` and `f(3.5) = 0.25 > 0`
`:.` Now, Root lies between `3.4375` and `3.5`
`x_4=(3.4375+3.5)/2=3.4688`
`f(x_4)=f(3.4688)=3.4688^2-12=0.0322 > 0`
`6^(th)` iteration :
Here `f(3.4375) = -0.1836 < 0` and `f(3.4688) = 0.0322 > 0`
`:.` Now, Root lies between `3.4375` and `3.4688`
`x_5=(3.4375+3.4688)/2=3.4531`
`f(x_5)=f(3.4531)=3.4531^2-12=-0.0759 < 0`
`7^(th)` iteration :
Here `f(3.4531) = -0.0759 < 0` and `f(3.4688) = 0.0322 > 0`
`:.` Now, Root lies between `3.4531` and `3.4688`
`x_6=(3.4531+3.4688)/2=3.4609`
`f(x_6)=f(3.4609)=3.4609^2-12=-0.0219 < 0`
`8^(th)` iteration :
Here `f(3.4609) = -0.0219 < 0` and `f(3.4688) = 0.0322 > 0`
`:.` Now, Root lies between `3.4609` and `3.4688`
`x_7=(3.4609+3.4688)/2=3.4648`
`f(x_7)=f(3.4648)=3.4648^2-12=0.0051 > 0`
`9^(th)` iteration :
Here `f(3.4609) = -0.0219 < 0` and `f(3.4648) = 0.0051 > 0`
`:.` Now, Root lies between `3.4609` and `3.4648`
`x_8=(3.4609+3.4648)/2=3.4629`
`f(x_8)=f(3.4629)=3.4629^2-12=-0.0084 < 0`
`10^(th)` iteration :
Here `f(3.4629) = -0.0084 < 0` and `f(3.4648) = 0.0051 > 0`
`:.` Now, Root lies between `3.4629` and `3.4648`
`x_9=(3.4629+3.4648)/2=3.4639`
`f(x_9)=f(3.4639)=3.4639^2-12=-0.0016 < 0`
`11^(th)` iteration :
Here `f(3.4639) = -0.0016 < 0` and `f(3.4648) = 0.0051 > 0`
`:.` Now, Root lies between `3.4639` and `3.4648`
`x_10=(3.4639+3.4648)/2=3.4644`
`f(x_10)=f(3.4644)=3.4644^2-12=0.0018 > 0`
`12^(th)` iteration :
Here `f(3.4639) = -0.0016 < 0` and `f(3.4644) = 0.0018 > 0`
`:.` Now, Root lies between `3.4639` and `3.4644`
`x_11=(3.4639+3.4644)/2=3.4641`
`f(x_11)=f(3.4641)=3.4641^2-12=0.0001 > 0`
Approximate root of the equation `x^2-12=0` using Bisection method is `3.4641` (After 12 iterations)
`n` | `a` | `f(a)` | `b` | `f(b)` | `c=(a + b)/2` | `f(c)` | Update |
1 | 3 | -3 | 4 | 4 | 3.5 | 0.25 | `b = c` |
2 | 3 | -3 | 3.5 | 0.25 | 3.25 | -1.4375 | `a = c` |
3 | 3.25 | -1.4375 | 3.5 | 0.25 | 3.375 | -0.6094 | `a = c` |
4 | 3.375 | -0.6094 | 3.5 | 0.25 | 3.4375 | -0.1836 | `a = c` |
5 | 3.4375 | -0.1836 | 3.5 | 0.25 | 3.4688 | 0.0322 | `b = c` |
6 | 3.4375 | -0.1836 | 3.4688 | 0.0322 | 3.4531 | -0.0759 | `a = c` |
7 | 3.4531 | -0.0759 | 3.4688 | 0.0322 | 3.4609 | -0.0219 | `a = c` |
8 | 3.4609 | -0.0219 | 3.4688 | 0.0322 | 3.4648 | 0.0051 | `b = c` |
9 | 3.4609 | -0.0219 | 3.4648 | 0.0051 | 3.4629 | -0.0084 | `a = c` |
10 | 3.4629 | -0.0084 | 3.4648 | 0.0051 | 3.4639 | -0.0016 | `a = c` |
11 | 3.4639 | -0.0016 | 3.4648 | 0.0051 | 3.4644 | 0.0018 | `b = c` |
12 | 3.4639 | -0.0016 | 3.4644 | 0.0018 | 3.4641 | 0.0001 | `b = c` |
This material is intended as a summary. Use your textbook for detail explanation.
Any bug, improvement, feedback then