Question: The algorithm given below describes the bisection method. INPUT: endpoints a; b; tolerance TOL; maximum number of iterations N 0 . OUTPUT: approximate solution p

The algorithm given below describes the bisection method.
INPUT: endpoints a; b; tolerance TOL; maximum number of iterations N0.
OUTPUT: approximate solution p or message of failure.
Step 1: Set i =1;
FA = f(a).
Step 2: While i <= N0 do Steps 2:1-2:4.
{ Step 2.1: Set p = a +(b a)=2; (Compute pi.)
FP = f(p).
{ Step 2.2: If FP =0 or (b a)=2< TOL then
OUTPUT (p); (Procedure completed successfully.)
STOP.
{ Step 2.3: Set i = i +1.
{ Step 2.4: If FA FP >0 then set a = p; (Compute ai; bi.)
FA = FP
else set b = p.
Step 3 OUTPUT (Method failed after N0 iterations, N0=, N0);
(The procedure was unsuccessful.)
STOP.
Show the first three iterations for f(x)= x25x +4 and [a; b]=[2; 5] and
N0=5, tolerance "=103

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!