Posts

Root Finding Using Bisection Method

Image
Bisection Method: Many problems require to find the roots/zeros of the function:                                                                   f(x) = 0          --------(i) If the function f(x) is continuous between two limits, x = a and b, and f(a) and f(b) are of opposite signs, means f(a)*f(b) < 0, then there exists a root between a and b. Let us think the root is δ, then   f(δ) = 0 From the above figure, we can see that if f(a)*f(b) < 0 means f(a) and f(b) are of opposite signs, then we can approximated the root by midpoint, xm = (a + b)/2. Then if f(xm) = 0, the root is xm .If not, we have to search the root in either of interval [xm, a] or [xm, b] if f(xm)*f(a) < 0 then we will take b = xm and if f(xm)*f(b) < 0, then a = xm, and the guessed root as, xm = (a +b)/2, we h...