Theory For BISECTION METHOD:
In mathematics, the bisection method is a root-finding algorithm which repeatedly divides an
interval in half and then selects the subinterval in which a root exists. It is a very simple and
robust method, but it is also rather slow.Suppose we want to solve the equation f(x)=0,where f is a continuous function.
The bisection method starts with two points xl and xu such that f(xl) and f(xu) have opposite
signs. The intermediate value theorem says that f must have at least one root in the interval
[xl,xu]. The method now divides the interval in two by computing
xr = (xl+xu) / 2.
There are now two possibilities: either f(xl) and f(xu) have opposite
signs, or f(xr) and f(xl) have opposite signs. The bisection algorithm is then
applied recursively to the sub-interval where the sign change occurs.
To determine in which sub-interval the root lies: - If f(xl).f(xr)<0,then we set xu=xr
- If f(xl).f(xr)>0, then we set xl=xr
- If f(xl).f(xr)=0, then we set xt=xr
According to the condition we have to iterate again and again till then whenever |%error| or
|ea|=es. Then we have to find out the %error. The rule for determine %error
is %error or ea = (xrnew-xrold)/
xrnew*100%
|
No comments:
Post a Comment