Sunteți pe pagina 1din 4

Mapua Institute of Technology

Math16L/B2


Machine problem no. 1
Bisection Method




Dela Cruz, Richelle


Prof. Carlos C. Hortinela

Technique Discussion:

BISECTION METHOD
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 .
Consider a transcendental equation f (x) = 0 which has a zero in the interval [a,b] and f (a) * f (b) < 0.
Bisection scheme computes the zero, say c, by repeatedly halving the interval [a,b]. That is, starting with
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 | / 2
N
.
C2. By testing the condition | c
i
- 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 (c
i
) | less than some tolerance limit alpha again fixed a priori.

Algorithm - Bisection Scheme
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.
The graph of this equation is given in the figure.
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.
Consider the function f (x) in the interval [0, 0.5] since f (0) * f (0.5) is less than zero.
Then the bisection iterations are given by

Iteration
No.
a b c f(a) * f(c)
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)
So one of the roots of 3x + sin(x) - exp(x) = 0 is approximately 0.3605.



Reference:
http://mat.iitm.ac.in/home/sryedida/public_html/caimna/transcendental/bracketing%20methods/bisec
tion/bisection.html



User manual:
The user is asked to enter two initial values that satisfy the bracketing condition. Then it will
compute for the root using the Bisection method. The process will not stop until the absolute error is
satisfied. The output is displayed as a matrix in the SCILAB console.

S-ar putea să vă placă și