Skip to main content

Exercises 9.7 Homework

1.

(Theoretical problem.) Suppose that Newton's method is used to solve \(f(x)=0\) with \(f(x) = e^x + e^{-x} - 2\text{.}\) Show that the function \(g(x)=x-f(x)/f'(x)\) (extended by \(g(0)=0\)) has a nonzero derivative at \(0\text{.}\) (Hence, \(0\) is not a super-attracting point for Newton's method in this example.)

Hint

Hint: To simplify \(f(x)/f'(x)\text{,}\) you can multiply the numerator and denominator by \(e^x\) and recognize that they both can be factored. One possible approach to computing \(g'(0)\) is to take the limit of \(g(x)/x\) as \(x\to 0\) using L'Hospital's rule.

2.

(Theoretical problem.) Show that if we use \(g(x)=x-2f(x)/f'(x)\) in the previous problem, this function \(g\) has \(g'(0)=0\text{,}\) which makes \(0\) a superattracting fixed point.

3.

Write a script that attempts to solve the equation \(\arctan x - 1 = 0\) using Newton's method (Note that Matlab's notation for arctangent is atan.) Similarly to Example 9.3.1 and Example 8.2.1, the script should show the number of steps it took to find a solution, or report that it failed to converge. Allow the algorithm up to 10000 steps before giving up. As the initial point x0, use the number formed by the first two digits of your SUID. (Note: it is expected that your script will fail to converge.)

Introduce a relaxation parameter \(\omega\) in your script to help it converge. What value of \(\omega\) achieves convergence? Be careful: \(\omega\) should be small, but if it is too small, the algorithm will fail to converge because it takes too long.

Include a comment on what values of \(\omega\) you found to be too large for convergence, what value was too small for convergence, and what value achieved convergence.