Bisection method-numerical analysis

  • MHB
  • Thread starter evinda
  • Start date
  • Tags
    Analysis
In summary, the bisection method uses two criteria, namely $|x_{k}-x_{k-1}| < TOL$ and $|f(x_{k})| < TOL$, as termination conditions to approximate the root of a function. The first condition ensures the accuracy of the approximation, while the second condition verifies the existence of a root. The choice of $x_{k}$ and $x_{k-1}$ is somewhat arbitrary, as long as their absolute difference is within the tolerance $TOL$. In some implementations, the termination criteria may be optimized to avoid an unnecessary function evaluation at the final approximation.
  • #36
evinda said:
So,if they are not equal,why do we use the termination criteria |a-b|<TOL?I don't get it... :(

We don't.
See your previous post:

evinda said:
Nice.. :eek: And..something else..I found implementations of the bisection method and there the termination criteria is
Code:
 while(fabs((b-a)/2)>TOL)
.

Why is it like that?? :confused:

See?
 
Mathematics news on Phys.org
  • #37
So,is it wrong when I write fabs(b-a)<TOL?
 
  • #38
evinda said:
So,is it wrong when I write fabs(b-a)<TOL?

Depends on the rest of your algorithm.
If you return (a+b)/2, then your result will still be within TOL.
So then it is right!
 
  • #39
Could you give me an example for this condition?
If for example the maximum number of iterations is 15,TOL is 0.001
and the initial interval is [0,2]

what is equal to the first

$\big|x_k-x_{k-1}\big|$ we have to use? :confused: :confused::confused:
 

Similar threads

Replies
15
Views
4K
Replies
6
Views
990
Replies
1
Views
9K
Replies
8
Views
1K
Replies
1
Views
10K
Replies
1
Views
10K
Replies
1
Views
2K
Replies
21
Views
3K
Replies
7
Views
2K
Back
Top