**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)]/h^{2}

(b) Show that the
error term in the formula of part (a) is of the form K_{1}h^{2
}+ K_{2}h^{4 }+ ..., 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

K_{1}h^{2}
+ K_{2}h^{4} + K_{3}h^{6} + …

where h = (b-a)/h .

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

R_{k}^{(2)}
= R_{k}^{(1)} + [R_{k}^{(1)} -
R_{k-1}^{(1)}]/3

gives a value for
the integral which has an error of O(h^{4}).

(b) If R_{k}^{(n)}
represents the approximate value of the integral obtained by applying
Richardson extrapolation n-1 times then

R_{k}^{(n+1)}
= R_{k}^{(n)} + [R_{k}^{(n)} -
R_{k-1}^{(n)} ]/(4^{n} - 1)

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

k h R_{k}^{(1)} R_{k}^{(2)} R_{k}^{(3)}
R_{k}^{(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) = y_{0}, y(b)
= y_{1}

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' + y^{2}, 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' = 2x^{2}y^{
} - e^{–2x}, 1 < x < 2, y(1) = -1;

(c) y' = (3x^{2}
+ 1)y + x sec(x), 0 < x < pi, y(0) = 0.5.

9. (8 marks)

(a) Derive the
formula for the **backward Euler method**

w_{i+1}
= w_{i} + hf(x_{i+1}, w_{i+1})

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

(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 w_{i+1} using
the backward Euler method.

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

y' =
-2y + 3x^{2}, 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**