**MATH3242.03/COSC3122.03**

**FW03**

**Assignment 5 Due: Friday, April
2, 2004**

1. The Modified Midpoint Method applied to the initial-value problem

y' = f(x,y), a £ x £ b, y(a) = a

has an error term that contains only even powers of the step size.
Thus if y_{n,1} is an approximate

solution to y(a+H) using step size h_{n} = H/n we have

y(a+H) = y_{n,1}
+ c_{1} h_{n}^{2} + c_{2} h_{n}^{4}
+ c_{3} h_{n}^{6} + ...

Using Richardson extrapolation show that

y_{2j,2}
= [(2j)^{2}y_{2j,1} -
(2j-2)^{2}y_{2j-2,1}]/[(2j)^{2} -
(2j-2)^{2}], j = 2, 3, ...

y_{2j,3}
= [(2j)^{2}y_{2j,2} -
(2j-4)^{2}y_{2j-2,2}]/[(2j)^{2} -
(2j-4)^{2}],
j = 3, 4, ...

2. Use the extrapolation method with the Modified Midpoint Method to calculate the value of the solution of the initial-value problem

y' + 2y = 2x, y(0) = 1

at the point 0.3. Take steps of size 0.3/n with n = 2, 4 and 6 to produce an extrapolation table similar to the one obtained with Romberg integation. Carry out your calculations to 6 decimal places. Compare your final answer with the exact solution 0.623217.

The algorithm for the (Modified) Midpoint Method for the initial-value problem

y' = f(x,y), a £ x £ a + H

is given by

w_{0} = y(a)

w_{1} = w_{0} + h f(x_{0},w_{0})

w_{i}_{+1} = w_{i-1} + 2h f(x_{i},w_{i});
i = 1, n-1

y_{n,1} = 0.5[w_{n} + w_{n-1} + hf(x_{n},
w_{n})]

where x_{i} = a + ih; i = 0, n.

3. Apply both the Euler method and the Backward Euler method to solve the initial-value problems:

(a) y' = -15y, 0 £ x £ 0.5, y(0) = 1 {exact solution is y = exp (-15x)}

(b) y' = -15y + 225x, 0 £ x £ 0.5, y(0) = 0 {exact solution is exp(-15x) + 15x - 1}

Use a step size h = 0.1 and compare your results with the exact solution. For part (a) redo the calculations with h = 0.05.

4. Show that the nonlinear system

x^{3} - 2z = 2

5y^{2} - x^{3} = 7

y^{2}z = 1

can be converted into the fixed-point problem

x = (2z + 2)^{1/3}

y = ((x^{3} + 7)/5)^{1/2}

^{ }z = y^{-2}

Prove that this system has a unique fixed point in the domain {1.3 £ x £ 1.6, 1.3 £ y £ 1.7,

0.3 £ z £ 0.8}. Write a C, Fortran or Maple program to find this fixed point using fixed-point interation to an accuaracy of 4 decimal places. Try several sets of starting values in the domain given above and compare the number of iterations required to converge in each case.

5. Apply the linear shooting method to solve the following boundary-value problem:

y" - 2xy' +sin(x)y = (1-x)^{2}, 0 £
x £ 2, y(0) = 1, y(2) = 1.5

Output the solution at steps of 0.2.

First convert the two initial value problems into systems of first-order equations. Write a program to solve these systems of equations using the Maple procedure dsolve You may wish to have a look at Algorithm 11.1 of the text in order to see the structure of the program. Step 4 will be replaced by calls to the Maple procedure. Treat the first-order equations as one set of four equations.

6. Write down the differential equations plus the initial conditions required to solve the boundary-value problem

y" - 2y'y + xy^{2} = xcos(x), -1 £
x £ 1, y(-1) = 1, y(1) = -1

with the nonlinear shooting method. Also write down the recursion relation for calculating the new initial slope by Newton's Method along with the differential equation for the derivative. You are not required to solve this problem numerically.

7. Solve the boundary-value problem given in question 5 by constructing the system of linear equations resulting from the application of the finite-difference method and solving it using the Maple procedure linalg[linsolve]. Take the step size h = 0.1.