Write the program for finding aprroxiamate root of a function by Bisection method
The method is applicable for numerically solving the equation f ( x ) = 0 for the real variable x , where f is a continuous function defined on an interval [ a , b ] and where f ( a ) and f ( b ) have opposite signs. In this case a and b are said to bracket a root since, by the intermediate value theorem , the continuous function f must have at least one root in the interval ( a , b ). At each step the method divides the interval in two by computing the midpoint c = ( a + b ) / 2 of the interval and the value of the function f ( c ) at that point. Unless c is itself a root (which is very unlikely, but possible) there are now only two possibilities: either f ( a ) and f ( c ) have opposite signs and bracket a root, or f ( c ) and f ( b ) have opposite signs and bracket a root. [5] The method sele...