YORK UNIVERSITY

FACULTY OF ARTS

FACULTY OF PURE & APPLIED SCIENCE

MATH3242/COSC3122

FINAL EXAMINATION - FW98

Thursday, April 22, 1999 12:00 - 15:00 am

1. All questions should be attempted.

2. A non-programmable calculator is allowed as an aid.

3. The marks are given at the beginning of each question.

4. The total number of marks for this examination is 90.

5. Note that pertinent formulae and theorems are given on separate sheets at the end of this

examination.

1. (10 marks)

(a) Derive the approximate formula for the second derivative of a function

f"(x) ~ [f(x+h) - 2f(x) + f(x-h)]/h2

(b) Show that the error term in the formula of part (a) is of the form K1h2 + K2h4 + ..., i.e. it contains only even powers of h.

(c) Use this formula to find an approximate value for the second derivative of x sin(2x) at x = 1.5. Take h = 0.1.

2. (4 marks) There are three methods that we have considered for obtaining the numerical value of an integral to a specified accuracy:

i) use the error term to find the required stepsize h;

ii) use adoptive integration;

iii) use Romberg integration.

Order these three methods according to the amount of computation required on average to evaluate an integral numerically to within a specified accuracy with the method requiring the least computation first. Give reasons for your ordering.

3. (7 marks) The Composite Trapezoidal Rule can be used to approximate the integral of f(x) from x = a to x = b. This formula has an error term which can be written as

K1h2 + K2h4 + K3h6 + …

where h = (b-a)/h .

(a) Romberg integration uses Richardson extrapolation to improve the accuracy of numerical integration. If Rk(1) represents the result obtained from the Composite Trapezoidal Rule using a value n = 2k, show that

Rk(2) = Rk(1) + [Rk(1) - Rk-1(1)]/3

gives a value for the integral which has an error of O(h4).

(b) If Rk(n) represents the approximate value of the integral obtained by applying Richardson extrapolation n-1 times then

Rk(n+1) = Rk(n) + [Rk(n) - Rk-1(n) ]/(4n - 1)

Use this formula to complete the following table for the evaluation of an integral via Romberg integration by calculating the appropriate values for Rk(2), Rk(3) and Rk(4).

k h Rk(1) Rk(2) Rk(3) Rk(4)

1 1. 3.000000

2 0.5 3.100000

3 0.25 3.131176

4 0.125 3.138988

4. (10 marks)

(a) Put the integral

into the standard form for a Gauss-Laguerre integral.

(b) Put the integral

into the standard form for a Gauss-Legendre integral.

5. (12 marks) Evaluate the improper integral

using the Elementary Simpsons Rule as the quadrature rule. Work to 5 decimal places.

6. (5 marks) Given the boundary-value problem

y" = p(x)y' + q(x)y + r(x), a < x < b, y(a) = y0, y(b) = y1

describe the steps required to solve this problem using the linear shooting method.

7. (11 marks) Use the Runge-Kutta Midpoint Method to find a solution to the inital value problem

y" = 2xy' + y2, 0 < x < 1, y(0) = 2, y'(0) = 1

Take h = 0.5

8. (6 marks) Which of the following initial-value problems satisfies the conditions of the theorem guaranteeing a unique solution? Justify your answer in each case.

(a) y' = (x + y)2, -2 < x < 2, y(-2) = 2;

(b) y' = 2x2y - e–2x, 1 < x < 2, y(1) = -1;

(c) y' = (3x2 + 1)y + x sec(x), 0 < x < pi, y(0) = 0.5.

9. (8 marks)

(a) Derive the formula for the backward Euler method

wi+1 = wi + hf(xi+1, wi+1)

which can be used to solve the initial-value problem y' = f(x, y), a < x < b, y(a) = y0,

(b) If the function in part (a) is a linear function of the form f(x, y) = p(x)y + q(x) write out the explicit formula for calculating wi+1 using the backward Euler method.

(c) Use the backward Euler method to solve the initial-value problem

y' = -2y + 3x2, 0 < x < 1, y(0) = 2

Take h = 0.25.

10. (8 marks)

(a) Describe how fixed-point iteration can be used to solve a system of non-linear equations f(x) = 0.

(b) Why are finite-difference methods generally more reliable than shooting methods for solving boundary-value problems?

(c) Define what is meant the statement that a one-step difference-equation method for solving an initial-value problem is consisent?

(d) Outline the steps involved in solving a first-order initial-value problem using the Bulirsch-Stoer method.

11. (9 marks) Use the finite-difference approximation to set up the system of linear equations Aw = b for the solution of the boundary-value problem

y" + xy' - (x+1)y/2 = 2x + 1, 1 < x < 2; y(1) = 4, y(2) = 2

Take n = 4. DO NOT ATTEMPT TO SOLVE THESE EQUATIONS.

THE END

4