150k views
1 vote
Find n for which the nth iteration by the Bisection Method guarantees to approximate the root of f(x) = 2x^2 − 3x − 2 on [−2, 1] with accuracy within 10^−8 .

User Yjshen
by
6.6k points

1 Answer

5 votes

Answer:

n = 29 iterations would be enough to obtain a root of
f(x)=2x^2-3x-2 that is at most
10^(-8) away from the correct solution.

Explanation:

You can use this formula which relates the number of iterations, n, required by the bisection method to converge to within an absolute error tolerance of ε starting from the initial interval (a, b).


n\geq (log((b-a)/(\epsilon) ))/(log(2))

We know

a = -2, b = 1 and ε =
10^(-8) so


n\geq (log((1+2)/(10^(-8)) ))/(log(2))\\n \geq 29

Thus, n = 29 iterations would be enough to obtain a root of
f(x)=2x^2-3x-2 that is at most
10^(-8) away from the correct solution.

You can prove this result by doing the computation as follows:

From the information given we know:


  • f(x)=2x^2-3x-2

  • \epsilon = 10^(-8)

This is the algorithm for the Bisection method:

  1. Find two numbers a and b at which f has different signs.
  2. Define
    c=(a+b)/(2)
  3. If
    b-c\leq \epsilon then accept c as the root and stop
  4. If
    f(a)f(c)\leq 0 then set c as the new b. Otherwise, set c as the new a. Return to step 1.

We know that
f(-2)=2(-2)^2-3(-2)-2=12 and
f(1)=2(1)^2-3(1)-2=-3 so we take
a=-2 and
b=1 then
c=(-2+1)/(2) =-0.5

Because
1-(-0.5)\geq 10^(-8) we set
c=-0.5 as the new b.

The bisection algorithm is detailed in the following table.

After the 29 steps we have that
6\cdot 10^(-9)\leq 10^(-8) hence the required root approximation is c = -0.50

Find n for which the nth iteration by the Bisection Method guarantees to approximate-example-1
User Vincenzo Manto
by
7.0k points
Welcome to QAmmunity.org, where you can ask questions and receive answers from other members of our community.