MHB Bisection method-numerical analysis

  • Thread starter Thread starter evinda
  • Start date Start date
  • Tags Tags
    Analysis
Click For Summary
The Bisection Method's termination criteria are based on two conditions: the difference between successive approximations must be less than ε, and the function value at the current approximation must also be close to zero. The first condition ensures that the approximation is sufficiently close to the actual root, while the second confirms that a root is indeed found rather than a singularity. The method guarantees that the real root lies between the two approximations, and the absolute difference between them is indicative of the error. Overall, the Bisection Method is effective for finding roots of functions by iteratively narrowing down the interval where the root lies.
  • #31
Could you explain it further to me?
Because I found this:
When the interval is [a_{k-1},b_{k-1}]

x_{k-1}=\frac{a_{k-1}+b_{k-1}}{2}

when the interval is [a_{k},b_{k}]

x_{k}=\frac{a_{k-1}+\frac{a_{k-1}+b_{k-1}}{2}}{2}=\frac{3a_{k-1}+b_{k-1}}{4}

So,|x_{k}-x_{k-1}|=|\frac{3a_{k-1}+b_{k-1}}{4}-(\frac{a_{k-1}+b_{k-1}}{2})|=|\frac{a_{k-1}-b_{k-1}}{4}|

But |a_{k}-b_{k}|=|\frac{a_{k-1}-b_{k-1}}{2}|

so they are not equal..what have I done wrong?
 
Mathematics news on Phys.org
  • #32
evinda said:
Could you explain it further to me?
Because I found this:
When the interval is [a_{k-1},b_{k-1}]

x_{k-1}=\frac{a_{k-1}+b_{k-1}}{2}

when the interval is [a_{k},b_{k}]

x_{k}=\frac{a_{k-1}+\frac{a_{k-1}+b_{k-1}}{2}}{2}=\frac{3a_{k-1}+b_{k-1}}{4}

So,|x_{k}-x_{k-1}|=|\frac{3a_{k-1}+b_{k-1}}{4}-(\frac{a_{k-1}+b_{k-1}}{2})|=|\frac{a_{k-1}-b_{k-1}}{4}|

But |a_{k}-b_{k}|=|\frac{a_{k-1}-b_{k-1}}{2}|

so they are not equal..what have I done wrong?

I see nothing wrong.
That looks entirely correct! ;)

What you have matches with what I wrote:
I like Serena said:
$$| x_k - x_{k-1} | = \frac{b_{k-1} - a_{k-1}}{4} = \frac{b_{k} - a_{k}}{2} = b_{k+1} - a_{k+1}$$
 
  • #33
I like Serena said:
I see nothing wrong.
That looks entirely correct! ;)

What you have matches with what I wrote:
|x_{k}-x_{k-1}|=|\frac{3a_{k-1}+b_{k-1}}{4}-(\frac{a_{k-1}+b_{k-1}}{2})|=|\frac{a_{k-1}-b_{k-1}}{4}|

|a_{k}-b_{k}|=|\frac{a_{k-1}-b_{k-1}}{2}|

How can they be equal?I don't understand :confused::(:confused:
 
  • #34
evinda said:
|x_{k}-x_{k-1}|=|\frac{3a_{k-1}+b_{k-1}}{4}-(\frac{a_{k-1}+b_{k-1}}{2})|=|\frac{a_{k-1}-b_{k-1}}{4}|

|a_{k}-b_{k}|=|\frac{a_{k-1}-b_{k-1}}{2}|

How can they be equal?I don't understand :confused::(:confused:

They are not equal.
|x_{k}-x_{k-1}| is half of |a_{k}-b_{k}|.

If you want equality, pick |a_{k+1}-b_{k+1}|.
 
  • #35
So,if they are not equal,why do we use the termination criteria |a-b|<TOL?I don't get it... :(
 
  • #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.. :o 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?
 
  • #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 ·
Replies
15
Views
4K
  • · Replies 6 ·
Replies
6
Views
1K
Replies
16
Views
838
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 1 ·
Replies
1
Views
10K
  • · Replies 1 ·
Replies
1
Views
10K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 21 ·
Replies
21
Views
4K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 7 ·
Replies
7
Views
2K