Bisection Method C Program


2 Ways For Bisection Method in C Programming

Let’s understand the root finding bisection method in numerical analysis and implement Bisection method in C programming language.

What is Bisection method?

The bisection method is a root-finding method based on simple iterations. It bisects (or divides) the intervals, and thereby, selects another sub-interval in which the root must probably occur. The bisection method is used to solve transcendental equations.


The bisection method is used to find the real roots of a non-linear function. An interval basically consists of an end value and a start value, with which the mid-point is calculated.

The bisection method is based on the Intermediate Value Theorem. The bisection method is also popularly known as binary search method, dichotomy method and internal halving method.

The non-linear function used here is: x3 – 4x – 9

The convergence of bisection method is very slow compared to other iterative methods. The approximate rate of convergence of bisection method is 0.5. One thing to note here is that the bisection method usually converges in a linear fashion.

Bisection Method Theorem

An equation f(x) = 0, where f(x) is a real continuous function, has at least one root between a and b, if f(a) f(b) < 0.

The first method describes the implementation of bisection method in C programming using For loop whereas the second method demonstrates the use of If-Else method.

Bisection Method Algorithm



  • Input an interval(start and end values), continuous function and function values f(a) and f(b).
  • Find the mid-point value of the function.
  • If the transformation is satisfactory, return the mid-point and then stop the iteration.
  • Check the sign value of f(c) and replace the appropriate function and values.
Bisection Method Algorithm and Example

In another way, the algorithm of bisection method can also be represented in the following way:


Given a function f (x) continuous on an interval [a,b] and f (a) * f (b) < 0

Note: This C program to find roots of an interval using Bisection method has been compiled with CodeLite IDE with GNU GCC compiler in Microsoft Windows 10 operating system.

Must Read: Simpson’s 3/8th Rule C Program

Method 1: Bisection Method in C Programming using For Loop

Must Read: Secant Method C Program

Method 2: C Program For Bisection Method using Functions


Implement Bisection Method in C Programming using For Loop

Let’s discuss more on bisection method C program in the comment section below if you have any compilation errors and any doubts about the same.

6 thoughts on “Bisection Method C Program

  1. Vikas Nair

    The bisection methods seems to be very similar to Newton Raphson method though.

  2. Vijay Kumar

    Thanks for the bisection method. I, now, get to understand the power of C programming. Its really amazing.

  3. Drishti Suri

    The false position method is much faster than bisection method.

  4. John Tuli

    This bisection method C program is so informative. Thank you so much for the flowchart.

  5. Anil Soni

    The bisection method in C programs are described in such an easy manner. Thanks for it. I could now understand the algorithm.


Let's Discuss