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 N
OUTPUT: approximate solution p or message of failure.
Step : Set i ;
FA fa
Step : While i N do Steps ::
Step : Set p a b a; Compute pi
FP fp
Step : If FP or b a TOL then
OUTPUT p; Procedure completed successfully.
STOP.
Step : Set i i
Step : If FA FP then set a p; Compute ai; bi
FA FP
else set b p
Step OUTPUT Method failed after N iterations, N N;
The procedure was unsuccessful.
STOP.
Show the first three iterations for fx xx and a; b; and
N tolerance
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
