Bisection Method (Bolzano Method)

Bisection Method :

ALGORITM :
  1. [Start]
  2. Input the variables x1, x2
  3. CHECK if f(x1) *f(x2) < 0, then proceed

    else  exit and PRINT error message

  4. Repeat 5and 6 if conditions are not satisfied
  5.  x0 = (x1 + x2)/2
  6. If f(x0) *f(x1) < 0, then x2 = x0.
    else  x1 = x0
  7. if | (x1-x2)/x1 | < maximum possible error or f(x0) = 0, then PRINT output
  8. [End of program.]

C SOURCE CODE :


 OUTPUT :

Leave a Reply

Your email address will not be published. Required fields are marked *