Prof. Ch. Schwab F. Henriquez J. Zech Spring Term 2017 Numerische Mathematik I ETH Zürich D-MATH Homework Problem Sheet 11 Problem 11.1 Fixed-point Iterations [Exam Summer 2016] (11.1a) Let D ⊆ Rn open and Φ : D → D. What is necessary in order for the corresponding fixed point iteration to be locally convergent to x∗ ∈ D? (11.1b) Let (xk )k∈N be a sequence in Rn , n ∈ N, and k·k a norm on Rn . Define what it means for this sequence to i) linearly converge to x∗ . ii) converge to x∗ with order p > 1. Does “convergence of order p” imply convergence of the sequence? Why (not)? (11.1c) Give an example of a sequence (xn )n∈N ⊆ R that converges to 0 ∈ R with order 6 but not with order 7, and show it. (11.1d) We wish to find x ∈ R s.t. y = x exp(x) with y > 0 given. Find a (nontrivial) function Φ : R → R s.t. the fixed point iteration xk+1 := Φ(xk ) converges locally of 2nd order to x. Give a complete proof of this fact (i.e. without referring to results from the lecture). (11.1e) Let Φα : R → R with Φα (x) := arctan(xα). For α ∈ (0, ∞) answer the following questions and prove your claims: i) How many fixed points does Φα have? ii) For which x0 ∈ R does the fixed point iteration xk+1 := Φα (xk ) converge (and to which fixed point)? iii) What can you say about the speed of convergence in this case? Give lower and upper bounds for the convergence rate. π π 1 H INT: arctan(0) = 0; arctan0 (x) = 1+x 2 ; limx→∞ arctan(x) = 2 ; limx→−∞ arctan(x) = − 2 ; Distinguish between the cases i) α ∈ (0, 1), ii) α = 1 and iii) α ∈ (1, ∞). Problem 11.2 Rootfinding [Subtask from Exam Winter 2017] Let f : R → R. Problem Sheet 11 Page 1 Problem 11.1 (11.2a) Implement the secant and Newton iterations to solve the (nonlinear) equation f (x) = 0: • Secant method: Write a M ATLAB function [x, nitS] = Secant(f, x0, x1, tol, nmax) which takes as input the initial guesses x0 and x1, the function handle f, the tolerance tol and the maximum number of iterations nmax. Convergence is attained when the absolute error computed with respect to the previous iterate err:= |x(k+1) − x(k) | is smaller than the fixed tolerance tol. The convergence should stop as soon as either convergence is reached or nmax iterations have been performed. As output, the iterates until convergence are stored in the vector x and nitS contains the number of iterations required to achieve convergence. • Newton method: Write a M ATLAB function [x, nitN] = Newton(f, df, x0, tol, nmax), where df is the function handle corresponding to f 0 , x0 is the initial guess, and tol and nmax are as above. As output, the iterates until convergence are stored in the vector x and nitN contains the number of iterations required to achieve convergence. How many iterations do your codes require in order to achieve convergence? Compute nitS and nitN for the following data and write down your results (on your sheet of paper): x0 = 1, Problem 11.3 x1 = 3, tol = 5 · 10−5 , nmax = 50, f (x) = sin(x) − x. (11.2.1) Identification of Zeros Consider f (x) = exp(2x) − sin(x) − 2. (11.3a) One example of a fixed point equation to determine the zeros of f is f (x) + x = x. Find two further fixed-point equations to determine the zeros of f (x). (11.3b) Do your proposed maps Φ1 , Φ2 satisfy the conditions of the Banach fixed-point theorem? Show that f (x) has a unique real zero. (11.3c) Give a number n ∈ N, s.t. with the starting point x(0) := 0.1, the absolute error of the nth iterate in determining the root of f (x) (on the fixed-point equation found in subproblem (11.3b)) is less than 10−8 . Problem 11.4 Computing an Important Function using Newton’s Method In this problem you are confronted with a task of “reverse engineering” and you will be asked to explain an undocumented M ATLAB code. Unfortunately, one is often confronted with such challenges, because programmers of numerical software may not have documented their codes properly. Explain the following M ATLAB code line by line. What is its purpose? Problem Sheet 11 Page 2 Problem 11.3 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 f u n c t i o n y = myfn(x) l o g 2 = 0.693147180559945; y = 0; w h i l e (x > s q r t (2)) x = x/2; y = y + l o g 2 ; end w h i l e (x < 1/ s q r t (2)) x = x*2; y = y - l o g 2 ; end z = x-1; dz = x* exp(-z)-1; w h i l e (abs(dz/z) > e p s ) z = z+dz; dz = x* exp(-z)-1; end y = y+z+dz; Published on May 12, 2017. To be submitted on May 23, 2017. M ATLAB: Submit all files in the online system. Include the files that generate the plots. Label all your plots. Include commands to run your functions. Comment on your results. References [NMI] Lecture Notes for the course “Numerische Mathematik I”. Last modified on May 12, 2017 Problem Sheet 11 Page 3 References
© Copyright 2026 Paperzz