Chapter 5 Exercises

5.4. Chapter 5 Exercises#

You should try the following exercise questions first, then check with the answers.

Exercise 5.1

Use a Gregory-Newton interpolation formula to derive the error term for the following integration formulae:

  1. \(\displaystyle y_{{j}} ~=~ y_{j-1} + \tfrac{h}{12}(5f_{{j}} + 8f_{j-1} - f_{{j-2}})\) Hint: G-N backward \(0\) to \(-1\)

  2. \(\displaystyle y_{j+1} ~=~ y_j + \tfrac{h}{2}(f_{j+1} + f_j)\)

Exercise 5.2

Use the method described in the text (see Example 5.3) to find the order and the error constants of the following formulae:

  1. \(\displaystyle y_{j+1} ~=~ y_j + \tfrac{h}{12}(5f_{j+1} + 8f_j - f_{j-1})\)

  2. \(\displaystyle y_{j+1} ~=~ y_{j-1} + \tfrac{h}{3}(f_{j+1} + 4f_j + f_{j-1})\)

  3. \(\displaystyle y_{j+1} ~=~ y_j + \tfrac{h}{24}(55f_j - 59f_{j-1} + 37f_{j-2} - 9f_{j-3})\)

  4. \(\displaystyle y_{j+1} ~=~ y_j + \tfrac{h}{720}(1901f_j - 2774f_{j-1} + 2616f_{j-2} - 1274f_{j-3} + 251f_{j-4})\)

You can use the Matlab or Python program given in Section 5.2.1.

Exercise 5.3

Derive a Milne’s Device local error estimate for the Milne-Simpson Predictor-Corrector method:

\[\begin{split}\begin{aligned} y^{(p)}_{j+1} ~&=~ y_{j-3} + \tfrac{h}{3}(8f_j - 4f_{j-1} + 8f_{j-2}) + \tfrac{28}{90}h^5y^{(v)}(z_1) \\ y^{(c)}_{j+1} ~&=~ y_{j-1} + \tfrac{h}{3}(f_{j+1} + 4f_j + f_{j-1}) - \tfrac{1}{90}h^5y^{(v)}(z_2) \end{aligned}\end{split}\]

Exercise 5.4

Modify Program 2 (Matlab and Python) for Adams–Bashforth method (Chapter 2) to implement Milne-Simpson Predictor-Corrector method given in Exercise 5.3. Use your program to find solution for the initial–value–problem

\[\begin{aligned} && y' ~&=~ -y + x + 1 & y(0) &= 1, & &0 \leq x \leq 1 && \end{aligned}\]

with \(h \!=\! 0.1\). Use the Milne’s Device error formula, derived in question 3 above to find an error estimate at \(\,x \!=\! 1.0\,\). Compare the error with the actual error and that of the Adams–Bashforth–Moulton method calculated in the lecture notes, Example 5.5, and comment.