Fakultät für Mathematik und Informatik 29. April 2013 TU Bergakademie Freiberg
Prof. Dr. O. Rheinbach/Dr. M. Helm
Numerical Analysis of Differential Equations Initial Value Problems (II)
Exercise 1
Determine an approximate solution for the initial value problem y0=−(y+ 1)(y+ 3), 0≤t≤2 y(0) =−2
applying
a) the explicitEulerscheme, b) the modifiedEulermethod, c) the improvedEuler method
with step sizeh= 0.5 andh= 0.2. Compare your approximations with the corresponding values of the exact solutiony(t) =−3 + 2(1 +e−2t)−1.
Hint: For the improved Euler method take yn+1 =yn+h2[f(tn, yn) +f(tn+h, yn+hf(tn, yn))]
withy0=y(0) given.
Exercise 2
Rewrite each of the followingButcher/Runge-Kuttatableaus as a set of explicit formulae for the calculation ofyj+1. Do they describe explicit or implicit methods?
a) four-stageEnglandformula 0
1/2 1/2 1/2 1/4 1/4
1 0 -1 2
1/6 0 2/3 1/6
b) Butcher’s formula 0
1/8 1/8
1/4 0 1/4
1/2 1/2 -1 1
3/4 3/16 0 0 9/16
1 -5/7 4/7 12/7 -12/7 8/7
7/90 0 32/90 12/90 32/90 7/90 c) (one)RadauIIA method
1/3 5/12 -1/12
1 3/4 1/4
3/4 1/4
Initial Value Problems II 2 Exercise 3
For the solutiony(x)of the initial value problem
y0 =−(y+ 1)(y+ 3), 0≤x≤1 y(0) =−2
find an approximation ofy(1) using the classicalRunge–Kuttamethod with step size h= 0.5.
Compare with the solutions in Exercise 1.
Exercise 4
Determine an approximate solution to the following system of ODEs
˙ y(t) =
6 −3 2 1
y(t), y(0) = 5
3
, 0≤t≤1.
Therefor apply
a) the explicitEulermethod with step sizeh= 0.25, b) Heun’s method with step size h= 0.5.
Compare the approximations with the exact solution y(t) =
exp(3t) 3 exp(4t) exp(3t) 2 exp(4t)
−1 2
.
Hint: You have to use vector versions of both methods, for instanceyn+1 =yn+hf(tn,yn) and y0=y(0)in the Euler case.
Exercise 5
Check the consistency order of Heun’s method by verification of the order conditions (for explicit Runge-Kuttamethods up to order three) known from the lecture.
0 1/3 1/3
2/3 0 2/3 0
1/4 0 3/4