bisection-algo-img

Bisection Algorithm

For any continuous function f(x),

  • Find two points, say a and b such that a < b and f(a) x f(b) < 0
  • Find the midpoint of a and b, say 't'
  • 't' is the root of the given function if f(t)=0;
  • else follow the next step Divide the interval[a, b]
  • If f(t) x f(a) < 0, there exist a root between 't' and 'a' , else if f(t) x f(b) < 0, there exist a root between 't' and 'b' Repeat above three steps until f(t)=0.
    The bisection method is an approximation method to find the roots of the given equation by repeatedly dividing the interval. This method will divide the interval until the resulting interval is found, which is extremely small.

Calculate
nrm-algo-img

Newton Rapson Algorithm


  • 1. Define function as f(x)
  • 2. Define first derivative of f(x) as g(x)
  • 3. Input initial guess (x0), tolerable error (e) and maximum iteration (N)
  • 4. Initialize iteration counter i = 1
  • 5. If g(x0) = 0 then print "Mathematical Error" and goto (12) otherwise goto (7)
  • 6. Calcualte x1 = x0 - f(x0) / g(x0)
  • 7. Increment iteration counter i = i + 1
  • 8. If i >= N then print "Not Convergent" and goto (11) otherwise goto (9)
  • 9. If |f(x1)| > e then set x0 = x1 and goto (5) otherwise goto (10)
  • Print root as x1
    Newton Raphson Method is an open method and starts with one initial guess for finding real root of non-linear equations.

Calculate
nrm-algo-img

Fixed Point Iteration Algorithm


  • Choose the initial value x0
  • to choose x0 is to find the values x = a and x = b for which f(a) < 0 and f(b) > 0
  • To narrow down the selection of a and b, take xo as the average of a and b.
  • Express in the form x = g(x) such that |g’(x)| < 1 at x = x0
  • choose the g(x) which has the minimum value of g’(x) at x = x0
  • applying the successive approximations xn = g(xn – 1)
  • if f is a continuous function, we get a sequence of {xn} which converges to a point l0, which is the approximate solution of the given equation.
    The method is useful for finding the real roots of the equation, which is the form of an infinite series. The type of convergence seen is linear.

Calculate