
|
CSCI 4100 SPRING 2005 ASSIGNMENT 4 DUE MARCH 22 NO LATER THAN 9:40 AM
1. Write a program which finds the positive root of f(x) = x2 -5 using bisection, Newton's method, and the secant method. Input .0000005 as the maximum error, and also input the endpoints “a” and “b” of the interval. Use a=2 and b=3. For Newton’s method, use “a” as your first guess. For the secant method, use “b” as a first guess and “a” as a second guess. For each method, output the root, the error, and the number of iterations required to obtain the answer with the desired error.
2. Solve the problem above “by hand.” Stop when either the answer, when rounded to two decimal places, is 2.24 OR after 4 iterations, whichever comes first.
|