Math 471 Computer Project 1
Due: Friday Feb 11 in class.
Problems turned in late (i.e. not in class) will be penalized 10% per day.
Write a well-documented
Matlab function (m-file) that implements a hybrid root
finding algorithm based on
bisection and the secant method as described in class and in the
supplement.
You should set the default arithmetic in Matlab and use a tolerance of
.5e-10 in the stopping criteria.
Your program should display the following table including the
starting point:
K 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 Matlab's root finder fzero.
- F1(X) = exp(-4.5*X) -X/200.
- 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 - 1e-14
Note: you should know in advance from computer problem
0 that you can not do this problem.
Use fplot over the interval [.99,1.03] to illustrate the
problem.
After you have determined that, please do the problem (x-1)**8 - 1e-14
- p(x) = 170.4*x^3 - 356.41*x^2 + 168.97*x + 18.601 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 that these are simple zeros, but are close together.
You should submit your Matlab function along with a separate
sheets for each of the above examples. For the examples, you
should use your function and Matlab's fzero as
a comparison. The diary command might be useful.
Back to Cover Page