Math 128a, Homework 8

Math 128a, Homework 8
1. Let Φ(x) =
will converge.
due November 6.
− e + x ). Determine an interval [a, b] on which the fixed-point iteration
2. Let f (x) = x3 − x2 − x and x0 = 10. This polynomial has three real roots. So in addition
to Newton’s method, in order to find the largest root we can also apply the “double-step”
method described on page 293. Apply both methods, and write down the number of iterations
each one takes before finding the largest zero with precision < 10−6 . Apply the methods only
to this one function, i.e. you don’t have to write a procedure to implement them (although
you can).
(a) If a function f has a double zero at ξ, i.e. f (x) = (x − ξ)2 g(x) with g(ξ) 6= 0, we
showed that Newton’s method is locally convergent only linearly, with constant 0.5.
Show that if we know that the root is a double root, a modified Newton’s method
xn+1 = xn − 2 · f (xn )/f 0 (xn ) converges quadratically.
(b) Let f (x) = x3 − x2 − x + 1. Then f has a double root at 1. Let x0 = 1.1. Using
the facts about the order of convergence of the methods, how many iterations would
you expect Newton’s method to take to converge to the root within 10−6 ? How many
iterations would you expect the method of part (a) to take?
(c) Now run these two methods, and see how many iterations are needed in reality to
achieve this tolerance. Again, since you only need to run these methods for one
function, you can do this “by hand” if you want to.
4. Problem 5.7.
5. Write Matlab functions to implement the bisection method, secant method, the method
of false position, and if you have time, Newton’s method. It makes sense to implement these
as a single function with the method fed in as a parameter. Your procedure should take
as a parameter a function and an interval such that the function has different signs at the
endpoints of the interval. It should stop when the zero is found to within a prescribed absolute
tolerance. Test your procedure on the function f (x) = tan(πx) − 6, with the initial interval
[0, 0.48]. Note that the function has in this interval a root ξ = (1/π) arctan 6 ≈ 0.447431543.
Run the procedure for 10, 20, and 50 iterations, and compare the results of the different
methods. Discuss.