Bisection Method: Please explain Step 6 for me in DETAILS, here is the algorithm
ID: 2963985 • Letter: B
Question
Bisection Method:
Please explain Step 6 for me in DETAILS, here is the algorithm:
Step 1 Set i = 1
FA = f(a)
Step 2 While i<=No do Steps 3-6
Step 3 Set p = a + (b - a )/2; ( Compute pi.)
FP = f(p).
Step 4 If FP = 0 or (b-a)/2 < TOL then
OUTPUT (p); (Procedure completed successfully.)
STOP.
Step 5 Set i = i + 1.
Step 6 if FA*FP > 0 then set a = p; (Compute ai, bi.)
FA = FP
else set b = p. (FA is unchanged.)
Step 7 OUTPUT ('Method failed after No iterations, No =', No);
(The procedure was unsuccessful.)
STOP.
PLEASE EXPLAIN STEP 6 FOR ME IN DETAILS FOR NEWTON'S METHOD:
Newton's Method:
INPUT initial approximation p0; tolerance TOL; maximum number of iterations No.
OUTPUT approximate solution p or message of failure.
Step 1 Set i = 1.
Step 2 While i<= No do Steps 3-6.
Step 3 Set p = po - f(po)/f '(po). (Compute pi.)
Step 4 If |p - po | < TOL then
OUTPUT (p); (The procedure was successful.)
STOP.
Step 5 Set i = i + 1.
Step 6 Set po = p. (Update po.)
Step 7 OUTPUT (' The method failed after No iteration, No =', No);
(The procedure was unsuccessful.)
STOP.
Explanation / Answer
Bisection method
Consider a transcendental equation f (x) = 0 which has a zero in the interval [a,b] and f (a) * f (b) < 0. Bisection scheme computes the zero, say c, by repeatedly halving the interval [a,b]. That is, starting with
c = (a+b) / 2
the interval [a,b] is replaced either with [c,b] or with [a,c] depending on the sign of f (a) * f (c) . This process is continued until the zero is obtained. Since the zero is obtained numerically the value of c may not exactly match with all the decimal places of the analytical solution of f (x) = 0 in the interval [a,b].
FA*FP > 0 means that lower bound and uper bound are of same sign. either negative or positive.
i.e, in [a,b], both are either positive or negative. As such 0 doesnot lie between a and b. So we try to find a new interval [e,f] where 0 lies between lower and upper bound.
Newton Method
The Newton
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.