Numerical Methods for Differential Equations
and Applications
Camile Fraga Delfino Kunz
15th January 2019
Exercises
1) Consider the Initial Value Problem (IVP):
(
u0 (t) = λu(t) , t ∈ (0, 1]
u(0) = η
in which λ and η are constants.
Write a pseudo-code for computing approximations at successive times t1 , t2 , . . ..
Use k to denote the time step, so tn = nk for n ≥ 0. Use each one of the fol-
lowing methods:
U n+1 − U n
a) Forward Euler: = f (U n )
k
U n+1 − U n
b) Backward Euler: = f (U n+1 )
k
U n+1 − U n 1
c) Trapezoidal: = [f (U n ) + f (U n+1 )]
k 2
U n+1 − U n−1
d) Leapfrog (midpoint): = f (U n )
2k
2) For each one of the methods on 1), calculate the Local Truncation Er-
ror (LTE) and show the order of convergence of the method. Is the method
consistent?
3) Consider the methods from 1), apply them to the problem
(
u0 (t) = 0
u(0) = 0
and solve the difference equation associated to it. Looking to it’s eingenvalues,
how can you conclude that the method is zero-stable?
1
4) Find the stability region for each one of the methods.
5) Why despite the methods being consistent and zero-stable, we don’t have
convergence for every choice of k and λ?
References
1. Leveque, R. J. Finite difference methods for ordinary and partial differen-
tial equations. SIAM, 2007.