Numerical Analysis/Bisection Method Worked Example

From testwiki
Jump to navigation Jump to search

X^3=20 ,f(X), X4=4, X1=1 take four iterations .

Example

Find an approximation of 3 correct to within 10-4 by using the bisection method on f(x)=x23 . starting on [1, 2].

Analysis of the Problem

The number of iterations we will use, n, must satisfy the following formula:
n>log2baϵ=log221104=log21104=log2104=log104log2=4.3010=13.29.
Thus, we will use 14 iterations of the bisection method.

Iteration #1

First, we find the midpoint of the interval [1, 2]:

c1=1+22=1.5 

Then we check if f(c1)  is positive or negative:

f(c1)=1.523=0.75 

The value of f(c1)  is negative, which means that c1  is less than 3.

We therefore use c1  as the left endpoint of our new interval and keep 2 as the right endpoint.

yes

Iteration #2

Repeat the process from Iteration #1 to do Iteration #2:


Iteration #3 - Iteration #14

Complete Iteration #3 - Iteration #14:


the final answer is follow or describe below

Conclusion

Thus, we have found that

is an approximation of

3

correct to within 10-4.