Wednesday, April 20, 2016

Algorithm of Bisection Method

  • Inputs: (i) f(x) -The given function
  •                  (ii) a; b -The two numbers such that f(a)f(b) < 0
  • Output: An approximation of the root of f(x)= 0 in [a; b].
  • For k = 0; 1; 2; : : :, do until satised:
                Compute ck= (ak+ bk)/2.
  • Test if ckis the desired root, if so, stop.
  • If ckis not the desired root,
              test if f(ck)f(ak) < 0
             If so, set bk+1= ck and ak+1= ak.
                Otherwise, set ak+1= ck; bk+1= bk.
  • End
  • No comments:

    Post a Comment