EXAM-Introduction to scientific computing math

nimab8
SAMPLEHW2.pdf

Math 551 Homework Assignment 2 Page 1 of 2

Name and section:

ID number:

E-mail:

1. (30 points) Assume the following fixed point iterations (xk+1 = g(xk)):

(a) xk+1 = −16 + 6xk + 12xk with x ∗ = 2,

(b) xk+1 = 2

3 xk +

1

x2 k

with x∗ = 31/3,

(c) xk+1 = 12

1+xk with x∗ = 3,

where x∗ corresponds to the respective fixed point.

Then, which of the above iterations will converge to the fixed point x∗ indicated above, provided that x0 ≈ x∗, i.e., the initial iterate x0 is sufficiently close to x∗? If it does converge, then find the order of convergence. Hint: You need to use the definition of the rate of convergence where you must exam-

ine the derivatives of g(x) at x∗. Furthermore, make sure to check that x∗ is indeed a fixed point!

2. (20 points) Using the m-file “fixed point.m”, find the three roots of

e x − 2x2 = 0,

with |xk+1 − xk| < 10−10 as a convergence criterion. Note that plotting will help here. Furthermore, explain your choices for the g(x) utilized in order to ensure convergence.

3. (20 points) Consider Newton’s method for finding + √ α with α > 0 by finding the

positive root of f(x) = x2 − α = 0. Assuming that x0 > 0, show the following: (a) (10 points)

xk+1 = 1

2

(

xk + α

xk

)

,

(b) (10 points)

x 2

k+1 − α = (

x2k − α 2xk

)2

,

for k ≥ 0 and therefore xk > √ α for k ≥ 1.

4. (30 points) Implement Newton’s method in MATLAB (or in any programming language). In particular, create a function, which utilizes the method, and store it as an m-file. Then, use your function to estimate

√ 7 by finding the positive root

Math 551 Homework Assignment 2 Page 2 of 2

of f(x) = x2 − 7. Try two different initial guesses: (i) x0 = 2 and (ii) x0 = 500 and consider |xk+1 − xk| < 10−10 as a convergence criterion. Attach your codes and provide MATLAB output for both cases.

5. (25 points) Assume that f ∈ C3 [a, b] and there is a root x∗ ∈ [a, b] such that f(x∗) = 0 and f ′(x∗) 6= 0. Show that Newton’s method converges quadratically.

6. (25 points) For x > 0, consider the equation

x + ln x = 0.

Implement the secant method in MATLAB (or in any programming language) and find the root of the above equation. Use x0 = 0.5, x1 = 0.6 and |xk+1 − xk| < 10−10 as a convergence criterion. In addition, use your function from Question 4 employing Newton’s method and repeat the calculation with same initial guess x0 and convergence criterion as before. Attach your code for the secant method and provide MATLAB outputs for both cases. Which method converges faster? Briefly explain.