Math 170B HW #2 Partial Solutions ================================= 1a. p_3 = 2.828427125. 1b. |p_3 - sqrt(8)| = 2.5 x 10^(-10). 1c. p_4 = 2.828431373. (2.82843137254902 using MATLAB). 1d. |p_4 - sqrt(8)| = 4.248 x 10^(-6). 2a. Using p_0 = 2 and p_1 = 3 and MATLAB, p_2 = 2.80000000000000, p_3 = 2.82758620689655, p_4 = 2.82840236686391. 2b. The absolute error is -2.475788228029074e-005. 2c. No. Although we know the root is bracketed, we are never guaranteed any specific reduction in size of |p_n - p|. Consider f(x) = -1 + 1/x. 3a. d(x) = (x-3)^2 + (x^3 + 1)^2. 3b. p_2 = 1.24780486488897 (due to MATLAB). 4a. Since f'(x) = a, just compute p_0 - f(p_0)/f'(p_0) using f(p_0) = a*p_0 - b and f'(p_0) = a. The answer should be -b/a which is exactly what you get in finding the root of a linear function. 4b. For any p_0 and p_1 just plug in to the Secant method formula and you will get p_2 = -b/a. 5. Again, just plug into the Secant method formula. You answers should look similar to those of 4a and 4b. Why? 6a. p_1 = -p_0, p_2 = p_0, p_3 = -p_0. 6b. Examine what would happen if we chose p_0 < 0 (rather than > 0 in part a). All in all, Newton's method will not converge for any nonzero initial guess. This does not violate the theorem on Newton's method convergence because our function f does not even satisfy the hypotheses of the theorem; hence, it can not violate the theorem. Which hypothesis or hypotheses are not satisfied? (Hint: Take a derivative of f and note the first hypothesis given in Thm 2.5 on Pg. 66.) 7. For all of these, g(x) = x - f(x)/f'(x). 8. We convert to a fixed point problem. (WHY???). Show that g(x) := x - f(x)/f'(x) satisfies the hypotheses of the fixed point theorem. This means you must show three things: (i) g is continuous on [3/4, 5/4]. (ii) g(x) is in [3/4, 5/4] for all x in [3/4, 5/4]. (iii) g' exists on (3/4, 5/4) and |g'(x)| <= k < 1 for all x in (3/4, 5/4). Showing these three items is just calculus so I leave it to you.