sorry it took so long, i had a quiz and for those interested in how well i did, i did awesome on it. well, here are the algorithms:
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 3 - 6
Step 3:
set p = a + (b-a)/2; (Compute p
i .)
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 a
i , b
i .)
FA = FP
else set b = p.
Step 7:
OUTPUT ('Method failed after N
0 iterations, N
0 =', N
0);
(The procedure was unsuccessful.)
STOP.
Newton's Method:
INPUT: initial approximation p
0; tolerance
TOL; maximum number of iterations
N0 .
OUTPUT: approximate solution
p or message of failure.
Step 1:
Set i = 1;
Step 2:
While
i <=
N0 do
Steps 3 - 6
Step 3:
Set p = p
0 - f(p
0) / f'(p
0). (Compute p
i.)
Step 4:
If | p - p
0| < TOL then
OUTPUT (p); (The procedure was successful.)
STOP.
Step 5:
Set i = i + 1.
Step 6:
Set p
0 = p; (Update p
0.)
Step 7:
OUTPUT ('Method failed after N
0 iterations, N
0 =', N
0);
(The procedure was unsuccessful.)
** i will add the other two, this one is getting too long, plus it'll give me a way to up my post count
**