Bisection Method Algorithm and Flowchart

8 Min Read

The bisection method is the most popular programming method used in the field of mathematics. It is a very simple and simple way to solve any problem which is based on division. In this article, we will discuss the basics of this method and how it can be used in the field of mathematics.

What is Bisection Method?

This method is based on the concept of dividing an interval into two parts. If we divide the whole interval, then the result will be the midpoint of the interval.

If the result is not the midpoint, then it will be the endpoint. Let’s take a look at an example of how this method works.

Example # 1

We have an interval of length 6. If we want to find the midpoint of the interval, then we can divide the interval into 2 parts. If the first part is 1 and the second part is 5, then the midpoint of the interval is 3. If the first part is 1 and the second part is 5, then the midpoint of the interval is 3.

Example # 2

We have an interval of length 6. If we want to find the midpoint of the interval, then we can divide the interval into 2 parts. If the first part is 1 and the second part is 5, then the midpoint of the interval is 3. If the first part is 1 and the second part is 5, then the midpoint of the interval is 3.

As you can see in the above example, the midpoint is 3. So, this is the basic concept of the Bisection Method.

How to Use the Bisection Method

The basic idea of the bisection method is very simple, so, if you can understand the above example, you will be able to understand the process of this method. Now, let’s take a look at a real-life example of the bisection method.

Example # 1

Suppose you have an interval of the length of 10. Now, you want to find the midpoint of the interval. So, we need to divide the interval into 2 parts.

Example # 2

Suppose you have an interval of the length of 10. Now, you want to find the midpoint of the interval. So, we need to divide the interval into 2 parts.

If the first part is 1 and the second part is 5, then the midpoint of the interval is 3. If the first part is 1 and the second part is 5, then the midpoint of the interval is 3.

Now, we will find the midpoint of the interval by calculating the midpoint of the interval, and then we will find the midpoint again.

Example # 3

Suppose we have an interval of the length of 10. We will calculate the midpoint of the interval.

Midpoint = (1 + 5) / 2 = 2.5

Midpoint = (2.5 + 2.5) / 2 = 3

If the first part is 2 and the second part is 8, then the midpoint of the interval is 3

In Another word

Suppose you are looking for the midpoint of the interval (0,2). The first step is to choose any point (x,y) inside the interval and then divide it into two equal parts by creating two points (a,b) and (c,d).

If you find the midpoint is between these two points then you will be able to calculate the midpoint.

So, this is the basic idea behind the bisection method. In this method, you are dividing the given interval into two equal parts and searching for the midpoint of the two parts.

The bisection method is used to find the real roots of a nonlinear equation. The process is based on the ‘Intermediate Value Theorem‘. According to the theorem “If a function f(x)=0 is continuous in an interval (a,b), such that f(a) and f(b) are opposite or opposite signs, then there exists at least one or an odd number of roots between a and b.”

In this post, the algorithm and flowchart for the bisection method have been presented along with its salient features.

The bisection method is a closed bracket method and requires two initial guesses. It is the simplest method with a slow but steady rate of convergence. It never fails! The overall accuracy obtained is very good, so it is more reliable in comparison to the Regula-Falsi method or the Newton-Raphson method.

Features of Bisection Method:

  • Type – closed bracket
  • No. of initial guesses – 2
  • Convergence – linear
  • Rate of convergence – slow but steady
  • Accuracy – good
  • Programming effort – easy
  • Approach – middle point

Bisection Method Algorithm:

  1. Start
  2. Read x1, x2, e
    *Here x1 and x2 are initial guesses
    e is the absolute error i.e. the desired degree of accuracy*
  3. Compute: f1 = f(x1) and f2 = f(x2)
  4. If (f1*f2) > 0, then display initial guesses are wrong and goto (11).
    Otherwise, continue.
  5. x = (x1 + x2)/2
  6. If ( [ (x1 – x2)/x ] < e ), then display x and goto (11).
    * Here [ ] refers to the modulus sign. *
  7. Else, f = f(x)
  8. If ((f*f1) > 0), then x1 = x and f1 = f.
  9. Else, x2 = x and f2 = f.
  10. Goto (5).
    *Now the loop continues with new values.*
  11. Stop

Bisection Method Flowchart:


The algorithm and flowchart presented above can be used to understand how the bisection method works and to write programs for the bisection method in any programming language.

Also, see,
Bisection Method C Program
Bisection Method MATLAB Program

Note: The bisection method guarantees the convergence of a function f(x) if it is continuous on the interval [a,b] (denoted by x1 and x2 in the above algorithm. For this, f(a) and f(b) should be opposite i.e. opposite signs.

The slow convergence in the bisection method is because the absolute error is halved at each step. Due to this, the method undergoes linear convergence, which is comparatively slower than the Newton-Raphson method, Secant method, and False Position method.

Share This Article
1 Comment

Leave a Reply

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

English
Exit mobile version