1
$\begingroup$

When using linear interpolation, with similar triangles, to find the root of a function you narrow down the interval the root is in.

If $f(1) < 0$ and $f(2) > 0$ then the root is in $[1, 2]$

Then you do linear interpolation to find $1.460, f(1.460) < 0$, then the root is in $[1.460, 2]$

Then again linear interpolation is done to find $1.467$, say $f(1.467) < 0$, so the root is in $[1.467, 2]$

Why is it that you stop and find the answer because $1.460 = 1.467$ (to 1 dp)? (ie the last two attempts are equal when rounded to 1 dp)

Why don't you stop when in the interval $[a, b], a = b$ when $a$ and $b$ are rounded to $1$ d.p.?

  • 0
    No it is a different method, and you seem to stop in the exactl the opposite circumstances. (there you stop when [a,b] a = b, and not when you get 2 consecutive (a+b)/2)2012-05-08

1 Answers 1

1

It looks like the method you mention is the one usually called the false position method or regula falsi method. After every iteration, you look at the interval that is guaranteed to contain the root and then you do linear interpolation using the end points of the interval. In your example, the next step would be to do interpolation using 1.467 and 2.

There is another method based on linear interpolation, usually called the secant method, in which after every iteration you do linear interpolation on the last two points you found. In your example, when using the secant method the next step would be to do interpolation using 1.460 and 1.467.

To answer your question, the false position method has a disadvantage: in some cases, one of the end points of the interval stays the same while the other one gets closer and closer to the root. It looks like that might be true in your example, the left end point goes to the root which seems to be somewhere around 1.5, while the right end point is stuck at 2 (I'd suggest you try some more iterations to see whether this is indeed the case).

In such cases, it would be bad to stop when the end points of the interval are close together, because that will never happen. In the example, one of the end points is close to the root at approximately 1.5 and the other is at 2, so you will never have that the end points are equal when rounded to 1 d.p. That is presumably why the other stopping criterion is used.