next up previous
Next: About this document ...

ESC 251 HW 19 Due: Oct. 24

Remember to indent the bodies of your IF-THEN and looping structures.

For the problems below that require you to implement the bisection method you should use a value of 10-10 for each of the tolerances. Note, in order to assign a value of 10-10 in MATLAB, you should do

     tol = 1.0e-10
If you enter
     tol = 10.0e-10
then your tolerance will be 10-9. Also, you should allow a maximum of 50 iterations.

(3 pts) Write a function to implement Newton's Method. Use the approach from Problem 2 of HW 18. You will need to create functions to evaluate both f(x) and its derivative and send both of these in as inputs.
(8 pts) Repeat Problem 3 of HW 18. Use Newton's Method to find the roots of the three problems below using the indicated initial guess:
$\displaystyle{x - 2^{-x} = 0}, x_1 = 2.$
$\displaystyle{\cos{t} - t = 0}, \quad t_1 = 3.$
$\displaystyle{x^4-2x^3-4x^2+4x+4 = 0},
\quad x_1 = \displaystyle{\frac{1}{2}}.$
You should only have 1 driver script that runs all 3 cases.

For each case, you should print out the value of the root, the value of the function at the root, the number of iterations, the status variable and create plots of the convergence histories. How do the iteration counts for Newton's Method compare to the bisection method? For Part c), does Newton's method converge to the same root as the bisection method?

(3 pts) Use Newton's Method to solve

\begin{displaymath}x^3 - 2x + 2 = 0, \quad x_1 = 0.\end{displaymath}

What happens in this case? Verify your conjecture by computing the first few steps of Newton's Method by hand. Can you fix this problem by changing the initial guess?

next up previous
Next: About this document ...