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

May/June 2018

MATH260101

Numerical Analysis with Computation

1.   (a)  Find the exact value of the root, x* , of the function f (x) = ex - 2 and show that x*  is also a xed point of the function g(x) =  + x - ex .

(b) Starting with the initial guess x0  = 1, calculate the next four approximations to x* using xed-point iteration with the function g .  Explain how the numerical results suggest that the ratio En /En-1 , where En  = Ixn - x* I is the absolute error, tends towards 1/2 as n increases.

(c)  By writing the Taylor series of g(x) about x = x*  as        g(xn ) = g(x* ) + (xn - x* )g\ (ξn ),

where ξn  is a number between xn  and x* , explain why the ratio En /En-1  tends towards 1/2.

(d) Write down Newton’s method for solving the equation f (x) = ex  - 2 = 0 and, taking x0  = 1 as the initial guess, calculate the next three iterates.  Explain what these data suggest about the speed of convergence.

2. The value of a function f (x) is known at the points x1  = 1, x2  = 3 and x3  = 5, and is given by

f (x1 ) = 2,    f (x2 ) = 8   and   f (x3 ) = -2.                           (1)

(a) Write down the Lagrange polynomials for interpolation through the points given in (1), and hence nd the quadratic polynomial P that interpolates f at these points. Use P to approximate f (x) at x = 2.

(b)  Use piecewise linear interpolation to approximate f (x) at x = 2.

(c)  Consider a spline function of the form

S(x) =

if x e [x1 , x2], if x e [x2 , x3].

Write down the conditions for S1  and S2  to be the natural cubic spline that inter- polates f at the points given in (1).  Hence, find the coefficients. To simplify the algebra, you are given that a1  = -  . Use S to approximate f (x) at x = 2.

(d) The formula for the error in polynomial interpolation is

f (n) (ξ)  n

n!

Use this formula to bound the error in approximating f (x) at x = 2 for

i. the interpolating polynomial P (x) found in part (a), and

ii. the piecewise linear interpolation function found in part (b),

assuming that f and its derivatives satisfy the following bounds for all x:

If (x)I ≤ 10,  If\ (x)I ≤ 20,  If\\ (x)I ≤ 30,  If\\\ (x)I ≤ 50 and If\\\\ (x)I ≤ 100.

3.   (a)  Describe the secant method for solving the equation f (x) = 0.

(b)  Use two iterations of the secant method to solve the equation cos x = x, using the initial guesses x0  = 0 and x1  = π .

(c)  Let the function f be defined by f (x) = x - cos x.  Find the linear polynomial P which interpolates f (x) at x = 0 and x = π; in other words, P should satisfy P (0) = f (0) and P (π) = f (π). Then solve the equation P (x) = 0.

(d)  Now generalize part (c): Find the linear polynomial P which interpolates f (x) for an arbitrary function f at x = x0  and x = x1 , and then solve P (x) = 0.  Show that the result can be written as

x0 - x1       

x = x1 - f (x1 )

(e)  Briefly describe how you would design a root-finding method based on quadratic interpolation.

4.   (a)  Derive the forward Euler method

yn+1  = yn + hf (tn , yn )                                        (2)

with step size h = tn+1 - tn  (for all n) for solving the ordinary differential equation  = f (t, y) with initial condition y(t0 ) = y0 .

(b)  Obtain an expression for the local error of the forward Euler method (2) which shows that the method is first order.

(c)  Consider the initial value problem

dy

dt

Use the forward Euler method (2) with a step size of h =  1/2 to calculate an approximation of y(t) at t  =  1.   Calculate the absolute error from the exact solution y(t) = (t + 1)et .

(d) The two-step Adams– Bashforth method is given by

yn+1  = yn +  3f (tn , yn ) - f (tn-1 , yn-1 ).

(4)

Using this method, with h = 1/2 and the value of y1  obtained from the forward Euler method, approximate y(1) where y(t) satisfies equation (3).

(e)  Explain what it means that the two-step Adams– Bashforth method (4) has order 2, and show that this is indeed the case for autonomous equations, i.e., equations of the form  = f (y) where f does not depend on t.

5.   (a)  Consider the system of three linear equations

-x1  + 3 x2  - 3 x3  =    4,

x1  - 2 x2  + 5 x3  =    1,

3 x1  - 8 x2  + 9 x3  = -9.

Write down this system in matrix form as

Ax = b,                                                   (5)

where A is a 3 × 3 matrix and x = (x1 , x2 , x3 )T .

Explain what is meant by an LU-factorization of a square matrix.

Showing all your calculations throughout, find an LU-factorization of the matrix A and use this to solve equation (5) for x.

(b)  Explain what is meant by (row) pivoting in the context of matrix factorization, and briefly discuss the advantages and disadvantages of using pivoting.

Show that the linear system

3(0)   2(2)┐ ┌x(x)2(1)= 4-1

cannot  be solved  by  LU-factorization without  pivoting even though the  matrix is non-singular.  Show how pivoting overcomes this problem and hence nd the solution.