MCS 471 Computer Project 2

Due: Friday  September 21, 2001 in class.

Problems turned in late (i.e. not in class) will be penalized 10% per day.


Write a well-documented Maple (or you may use some other language) program that implements a hybrid root finding algorithm based on bisection and the secant method as described in this …

Hand-out (in pdf format- you need Adobe Acrobat Viewer)

or Hand-out (in PostScript - you need Ghostview) see here for ghostview help.

You should set the digits in Maple to 6 and use a tolerence of 2.e-6. or use single precision arithmatic.

Your program should print a table (including the starting point) of the form:

 
X(K)     ABS(X(K)-X(K-1))      F(X(K))

Test Examples: For each of the examples, use (1,2) as the initial sign change interval (double check this of course). You should compare your answers with the roots found using Maple's root finder fsolve.

  1. F1(x) = exp(-100.0*x) - 1/(x-0.98)^3+10.0
  2. F2(X) = X^8 - 8*X^7 + 28*X^6 - 56*X^5 + 70*X^4 - 56*X^3 + 28*X^2 - 8*X + 1 - 0.00001 Note: you should know in advance from cp1 that you can not do this problem. After you have determined that, please do the problem (x-1)**8 - 0.00001.
  3. Consider p(x) = 170.4*x^3 - 356.41*x^2 + 168.97*x + 18.601 which has three real zeros. The two positive zeros lie in the interval [1.091607, 1.091608 ] can you find them with any accuracy? You may want to try using some of the techniques mentioned in class for finding zeros located near each other. Note  these are simple zeros, but are close together. You will need to increase the number of digits that Maple uses to actually find them, or if you are using C you will need to use quad precision..

Back to Cover Page