Bisection Method Theory
Bisection Method Theory
Bisection method is the simplest among all the numerical schemes to solve the
transcendental equations. This scheme is based on the intermediate value
theorem for continuous functions .
c = (a+b) / 2
the interval [a,b] is replaced either with [c,b] or with [a,c] depending on the sign
of f (a) * f (c) . This process is continued until the zero is obtained. Since the zero
is obtained numerically the value of c may not exactly match with all the
decimal places of the analytical solution of f (x) = 0 in the interval [a,b]. Hence
any one of the following mechanisms can be used to stop the bisection iterations
:
C1. Fixing a priori the total number of bisection iterations N i.e., the length of the
interval or the maximum error after N iterations in this case is less than | b-a | /
2N.
C2. By testing the condition | ci - c i-1| (where i are the iteration number) less
than some tolerance limit, say epsilon, fixed a priori.
C3. By testing the condition | f (ci ) | less than some tolerance limit alpha again
fixed a priori.
Given a function f (x) continuous on an interval [a,b] and f (a) * f (b) <
0
Do
c = (a+b)/2
if f (a) * f (c) < 0 then b = c
else a = c
while (none of the convergence criteria C1, C2 or C3 is satisfied)
Numerical Example :
Find a root of f (x) = 3x + sin(x) - exp(x) = 0.
Its clear from the graph that there are two roots,
one lies between 0 and 0.5 and the other lies
between 1.5 and 2.0.
Iteration
a b c f(a) * f(c)
No.
1 0 0.5 0.25 0.287 (+ve)
2 0.25 0.5 0.393 -0.015 (-ve)
3 0.65 0.393 0.34 9.69 E-3 (+ve)
4 0.34 0.393 0.367 -7.81 E-4 (-ve)
5 0.34 0.367 0.354 8.9 E-4 (+ve)
6 0.354 0.367 0.3605 -3.1 E-6 (-ve)
Work out with the Bisection method here
Note : Please enter equation like 3x+sin[x]-exp[x]. Use "[ ]" brackets for transcendentals and "( )" for others eg.,
3x+sin[(x+2)]+(3/4). 'a' and 'b' are the limits within which you are going to find the root. Few examples of how to
enter equations are given below ...