Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

MATH256  Problem Sheet 5

5.1  This problem has been moved to the week 5 group activity.  The number has been left in place to maintain parity with the video content.

5.2   (a) Write a Maple procedure which implements the secant method. The procedure should take as its arguments a function f , initial estimates c0  and c1 , a positive number δ and a positive integer max_its. If the procedure nds estimates cj+1  and cj  such that

1cj+1 - cj 1 < δ,

then it should  return cj+1   as its  result.   Otherwise,  if the  number of iterations exceeds max_its, then it should report an error.  Your procedure should store no more than three estimates cj  at any one time.

Use your secant procedure to find all solutions to the following equations.

(i) e-x sin x - 4x2 + 12 = 0,    -5 < x < 5,

(ii) x2 - 5x - 3 - arctan x = 0,    -10 < x < 10.

(iii) 4 + 4 cos x = 0,    0 < x < 5.

Use the value δ = 0.5 × 10-9  in each case. You may nd it helpful to

plot graphs of the functions; the Maple command for this is

plot(  f  , x0  . . x1  )

for a function f and real numbers x0  and x1 .

5.3 Apply the Newton– Raphson method to the function f (x) = sin(x) - k , where k is a constant with 1k1 < 1.  Try the resulting iteration scheme in Maple, using different numerical values for k and different initial estimates. Towards what value does it converge?

5.4  Determine whether the following iteration functions produce sequences that converge towards the xed point x = ^a (with a > 0). For each iteration that converges, find the rate of convergence (i.e. linear, quadratic, etc.). You may assume that x  0.

(a) φ(x) =  ,    (b) φ(x) = 2x -  ,    (c) φ(x) =  x + .(、) , (d) φ(x) =  3x - .(、) ,    (e) φ(x) =   -  + 15x.(、) .

5.5 The iteration function

φ(x) = 2x - kx2 + w(x)(kx - 1)2

can be used to nd 1/k using only addition, subtraction and multiplication. (a) Show that φ(k-1 ) = k-1  and φ\ (k-1 ) = 0.

(b)  Find w(x) such that φ\\ (k-1 ) = 0, and simplify the expression for φ in this case. Finally, find φ\\\ (k-1 ) and predict the behaviour of the errors in the iteration.

(c)  In Maple, use a do loop to apply the iteration 6 times, using the function w found in part (b). Display the relative error in each iterate and also the prediction for the next error based on the final result of part (b). Try some different values for k and different initial estimates. Do the numerical values support your theoretical prediction?

Hint: you will probably need a large setting for Digits to see the rate of convergence.

5.6 Suppose f (x) has a double root at x = c, that is f (c) = f\ (c) = 0, but f\\ (c)  0.

Use L’Hôpital’s rule to show that

lx   = 0.

Again using L’Hôpital’s rule, find the value of the limit

c = lim _ d   f (x)  

Hint: the product rule for limits, i.e.

lx f (x)g(x) = lx f (x) × lx g(x)

can be used to simplify the algebra (provided the limits on the right-hand side exist).

(c)  In view of your answers to parts (a) and (b), what can be said about the convergence rate of the Newton– Raphson iteration applied to a function with a double root? Explain your answer.

(d)  Find an iteration function φ that achieves quadratic convergence towards double roots. Your answer should not involve f// (x).

5.7 The function f(x) is such that f(c) = 0 and f/ (c)  0. The root at x = c is to be located using the xed point iteration formula

φ(x) = x -  .

(a) Show that φ/ (c) = 0.

(b)  Find v(x) such that φ// (c) = 0, and hence obtain the iteration formula for Halley’s method, which is

φ(x) = x -  .

Hint: look for simplications when x = c; there is at least one derivative that you need not calculate.

(c)  Use a do loop to apply  Halley’s method and the  Newton– Raphson method N times to the function f(x) starting with an initial guess x0 .

Set Digits to 20 and run your worksheet for

f(x) = 2 + x - ex ,

N = 10 and x0  = 0.2.  Display the estimates produced by the two methods at each step. Which performs better?

5.8  By differentiating the iteration scheme for the two-dimensional Newton– Raphson method with  respect to x, show that if det 7 (c, d)  0 then φx (c, d) = ψx (c, d) = 0. The same argument will work for the derivatives in y, but there is no need to write this out.

Hint: there is no need to dierentiate 7-1 .