This article is contributed by Abhiraj Smit. Introductory Methods of Numerical Analysis by S.S. We will soon be discussing other methods to solve algebraic and transcendental equations Then faster converging methods are used to find the solution.
In general, Bisection method is used to get an initial rough approximation of solution. Disadvantage of bisection method is that it cannot detect multiple roots. Time complexity :- Time complexity of this method depends on the assumed values and the function.Īdvantage of the bisection method is that it is guaranteed to be converged. Since root may be a floating point number, we repeat above steps while difference between a and b is less than a value ? (A very small value).
In this method we are given a function f(x) and we approximate 2 roots a and b for the function such that f(a).f(b) # include double F ( double x ) /*A sample run of the program was carried out and the results were found as:- This program illustrates the bisection method in C x^3 + 3*x - 5 = 0 Enter the first approximation to the root 1 Enter the second approximation to the root 2 Enter the number of iterations you want to perform 9 The root after 1 iteration is 1.500000 The root after 2 iteration is 1.250000 The root after 3 iteration is 1.125000 The root after 4 iteration is 1.187500 The root after 5 iteration is 1.156250 The root after 6 iteration is 1.146025 The root after 7 iteration is 1.148438 The root after 8 iteration is 1.152344 The root after 9 iteration is 1.154297 The root is 1. Bisection method is one of the many root finding methods.
*This program in C is used to demonstarte bisection method.