Problem 1 Create flowcharts that would be used to generate p

Problem 1: Create flowcharts that would be used to generate pseudocode for the Bisection and False Position Methods. This may be done by hand or digitally.

Solution

Pseudocode for Bisection Method

Input:
A                            Left-hand endpoint of the interval containing the root
B                             Right-hand endpoint of the interval containing the root
Epsilon Error tolerance
Func                      Pointer to function whose root is desired
Max                       Maximum number of iterations
Answer                Best estimate obtained for desired root
Verbose               Boolean indicator of whether or not to print results of each iteration

Initialize:
a = A, b = B, fa = Func(a), fb = Func(b).
(Note: If fa*fb >= 0, then the interval [a, b] may not contain the root)

Begin Iterations:
For i = 1 to Max
Answer = (a + b) / 2
fx1 = Func( Answer )
If ( Verbose )
Output: I, a, Answer, b, and fx1, with appropriate labels
END
If ( |fx1| < Epsilon OR |b - a| < Epsilon )
Return
END

If ( fa * fx1 < 0 )
b = Answer
ELSE
a = Answer
fa = fx1
END
END

Return.

Similarly you can create pseudocode for the False Position Method.

 Problem 1: Create flowcharts that would be used to generate pseudocode for the Bisection and False Position Methods. This may be done by hand or digitally. Sol

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site