# Exercises on Initial Value Problems for Ordinary Differential Equations

## Contents

# Exercises on Initial Value Problems for Ordinary Differential Equations#

## Exercise 1#

Show that for the integration case \(f(t, u) = f(t)\), Euler’s method is the same as the composite left-hand endpoint rule, as in the section Definite Integrals, Part 2.

## Exercise 2#

A) Verify that for the simple case where \(f(t, u) = f(t)\), the explicit trapezoid method gives the same result as the composite trapezoid rule for integration.

B) Do one step of this method for the canonical example \(du/dt = ku\), \(u(t_0) = u_0\). It will have the form \(U_1 = G U_0\) where the growth factor \(G\) approximates the factor \(g=e^{kh}\) for the exact solution \(u(t_1) = g u(t_0)\) of the ODE.

C) Compare to \(G=1+kh\) seen for Euler’s method.

D) Use the previous result to express \(U_i\) in terms of \(U_0=u_0\), as done for Euler’s method.

## Exercise 3 (a lot like Exercise 2)#

A) Verify that for the simple case where \(f(t, u) = f(t)\), explicit midpoint method gives the same result as the composite midpoint rule for integration (same comment as above).

B) Do one step of this method for the canonical example \(du/dt = ku\), \(u(t_0) = u_0\). It will have the form \(U_1 = G U_0\) where the growth factor \(G\) approximates the factor \(g=e^{kh}\) for the exact solution \(u(t_1) = g u(t_0)\) of the ODE.

C) Compare to the growth factors \(G\) seen for Euler and explicit trapezoid methods, and to the growth factor \(g\) for the exact solution.

## Exercise 4#

A) Apply Richardson extrapolation to one step of Euler’s method, using the values given by step sizes \(h\) and \(h/2\).

B) This should give a second order accurate method, so compare it to the above two methods.

## Exercise 5#

A) Verify that for the simple case where \(f(t, u) = f(t)\), this gives the same result as the Composite Simpson’s Rule for integration.

B) Do one step of this method for the canonical example \(du/dt = ku\), \(u(t_0) = u_0\). It will have the form \(U_1 = G U_0\) where the growth factor \(G\) approximates the factor \(g=e^{kh}\) for the exact solution \(u(t_1) = g u(t_0)\) of the ODE.

C) Compare to the growth factors \(G\) seen for previous methods, and to the growth factor \(g\) for the exact solution.

## Exercise 6#

Write a formula for \(U_h\) and \(e_h\) if one starts from the point \((t_i, U_i)\), so that \((t_i + h, U^h)\) is the proposed value for the next point \((t_{i+1}, U_{i+1})\) in the approximate solution — but only if \(e_h\) is small enough!

## Exercise 7#

Implement the error control version of the explicit trapezoid method from section on Error Control and Variable Step Sizes and test on the two familiar examples

(\(K=1\) is enough.)

This work is licensed under Creative Commons Attribution-ShareAlike 4.0 International