Bisection PDF
Bisection PDF
Bisection PDF
S
SOOL
LUUTTIIO
ONN O
OFF N
NOON
N--L
LIIN
NEEA
ARR E
EQQU
UAATTIIO
ONN
Bisection Method
The bisection method in mathematics is a root-finding method which
#_> #_>
repeatedly bisects an interval and then selects a subinterval in which a root
#_> #_>
must lie for further processing. It is a very simple and robust method, but it is
also relatively slow. Because of this, it is often used to obtain a rough
approximation to a solution which is then used as a starting point for more
rapidly converging methods.
We may repeat this process numerous times, each time halving the size
of the interval.
Numerical Example :
Find a root of f (x) = 3x + sin(x) - exp(x)=0.
ϭ
It's 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
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.25 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)
program bisection
implicit none
real,parameter::error=1e-4
real::a,b,f,c
10 read(*,*) a,b
15 if (f(a)*f(b).lt.0)then
c=(a+b)/2.0
else
Ϯ
goto 10
endif
if(f(a)*f(c).lt.0)then
b=c
else
a=c
endif
if(abs(b-a).gt.error)goto 15
end
implicit none
real::x
end