next up previous
Next: About this document ...

ESC 251 HW 17 Due: Oct. 22

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. Use a maximum iteration count of 50. Also, you only need to print out 1 code for Problem 2 since all 3 codes will be similar.

1)
(2 pts) Prove that the function f(x) = x3 + x + 1 has exactly one real root. HINT: Compute f'(x) and remember what the sign of the derivative tells you.
2)
(10 pts) Modify the bisection method we had in class to include each of the improvements listed in Section 2.4 of the notes. Use your method to find the root of the equations below. Use the given starting interval. Record the number of iterations it takes for the method to converge.
a)
$\displaystyle{x - 2^{-x} = 0}, \quad x \in [0,1].$
b)
$\displaystyle{\cos{t} - t = 0}, \quad t \in
\displaystyle{\left[0,\frac{\pi}{2} \right]}.$
c)
$\displaystyle{x^4-2x^3-4x^2+4x+4 = 0}, \quad x \in [2,3].$
3)
(2 pts) What do you notice about the number of iterations required for each of the problems in Question 2 to converge?




next up previous
Next: About this document ...
2018-10-19