Appl Diff Eqs
Appl Diff Eqs
Appl Diff Eqs
Thomas Götz
1 Introduction 5
2
3 CONTENTS
4 Numerical Methods 42
4.1 Convergence Theory . . . . . . . . . . . . . . . . . . . . . . . . . 45
4.2 Runge–Kutta Methods . . . . . . . . . . . . . . . . . . . . . . 51
4.3 Extrapolation Methods . . . . . . . . . . . . . . . . . . . . . . . . 57
4.4 Adaptive Step Size Selection . . . . . . . . . . . . . . . . . . . . . 60
5 Stability 63
5.1 Continuous Dependence on Initial Data . . . . . . . . . . . . . . . 63
5.2 Asymptotic Behavior of Solutions . . . . . . . . . . . . . . . . . . 67
5.3 Lyapunov Functions . . . . . . . . . . . . . . . . . . . . . . . . . 74
A Preliminaries 88
A.1 Eigenvalues and Eigenvectors . . . . . . . . . . . . . . . . . . . . 88
A.2 Taylor’s Theorem . . . . . . . . . . . . . . . . . . . . . . . . . . 91
Bibliography
The above list is just a small selection of literature and references suitable for
self studying, intensive reading or exam preparation. This list does not claim to
be complete.
4
Chapter 1
Introduction
yk+1 = yk + Increase
yk+1 = yk + r · δt · yk .
The constant r ∈ R is called the growth rate (in case of r > 0); it measures the
number of newborns per individual and per unit time step. In case of r < 0, one
calls the constant the death or mortality rate.
Given an initial population y0 at initial time t0 , we can predict the population at
any later time based on the above recursion or difference equation.
# Parameters
5
1.1. MODELING WITH DIFFERENTIAL EQUATIONS 6
5 n = 40
T = 1.0
dt = T/n
t = l i n s p a c e ( 0 ,T, n+1)
10 y = z e r o s ( n+1)
r = 1.2
y0 = 1000
y [ 0 ] = y0
15 for k in range ( n ) :
y [ k+1] = y [ k ] + r ∗ dt ∗y [ k ]
# Plot
plt . figure ()
20 p l t . p l o t ( t , y , ’ bo− ’ )
p l t . x l a b e l ( ’ Time $ t $ ’ )
p l t . y l a b e l ( ’ P o p u l a t i o n $y$ ’ )
plt . grid ()
p l t . show ( )
y 0 = ry (1.1)
An educated guess helps finding a solution to Eqn. (1.1). We use the ansatz
y(t) = c · eαt with two yet undetermined real constants c and α. Plugging this
ansatz into the ODE yields
!
y 0 (t) = cαeαt = ry = rceαt
which leads us to
0 = ceαt (α − r) .
!
y(t0 ) = cert0 = y0 .
y(t) = y0 er(t−t0 ) .
Example 1.3 (Logistic growth model). We can improve the previous population
model by assuming, that the reproduction rate r is not constant, but decreases
with the current population, e.g. r = K · (M − y). The term M − y can be
interpreted as the available resources. For a population y = M , no resources are
available and the reproduction rate equals zero. The threshold M is also called
the carrying capacity of the model. The resulting ODE reads as
y 0 = K(M − y) y .
Introducing the scalings t = s/(KM ) und y(t) = M u(s) in the logistic equation,
i.e. introducing the new time scale s and measuring the population y in fractions
of the carrying capacity M , we get
dy du
0= − K(M − y)y = KM 2 − K(M − M u) M u = KM 2 [u0 − (1 − u)u] .
dt ds
The prototypic equation is given by
u0 = u(1 − u) .
1.1. MODELING WITH DIFFERENTIAL EQUATIONS 8
5 u0 = 0 . 3
T = 5
def r h s ( t , u ) :
return u∗(1. −u )
10
S o l = s o l v e i v p ( rhs , [ 0 , T] , [ u0 ] ,
t e v a l=l i n s p a c e ( 0 ,T, 1 0 1 ) )
t = Sol . t
u = Sol . y [ 0 , : ]
15
plt . figure ()
p l t . p l o t ( t , u , ’ b− ’ )
p l t . x l a b e l ( ’ $t$ ’ )
p l t . y l a b e l ( ’ $u$ ’ )
20 plt . grid ()
p l t . show ( )
to the available prey and to their own population. These assumptions lead to the
following system of coupled ODEs for the prey u and predators v
u0 = αu − βuv ,
v 0 = −δv + γuv .
δ α
u = u∗ + small perturbation = + x and v = + y
γ β
where x, y 1, i.e. both functions x(t) and y(t) are assume to be that small,
such that quadratic terms like x2 , xy, y 2 can be neglected compared to the linear
ones. Plugging this into the ODE and keeping only terms up to first order, we
arrive at
βδ
x0 = − y = −k1 y
γ
αγ
y0 = x = k2 x .
β
Later on, we will see that this differential equation of second order describes the
so–called harmonic oscillator x00 +k 2 x = 0 and its solutions are periodic functions
of the form
x(t) = c1 cos kt + c2 sin kt .
1.1. MODELING WITH DIFFERENTIAL EQUATIONS 10
This implies, that our solutions u and v oscillate periodically around the equilib-
rium u∗ , v ∗ .
Drawing the two equilibria as well as the qualitative behaviour of the solutions,
i.e. the signum of u0 and v 0 in the uv–plane, we obtain what is called the phase
portrait of the ODE.
B If a susceptible and an infected individual meet, the susceptible one get also
infected at a rate β.
N0 = 0 .
2
acceleration ml · ddtϕ2 driving the mass back to its position at rest. Newton’s law
”Mass × Acceleration = Force” leads to the ODE
g
ϕ00 = − sin ϕ .
l
For small angles ϕ 1 we linearize sin ϕ ≈ ϕ and hence
g
ϕ00 = − ϕ .
l
Again, we arrive at a differential equation of second order of the form
ϕ00 + k 2 ϕ = 0
where k 2 = g/l > 0. A straight forward calculation shows, that the periodic
functions
ϕ(t) = c1 cos kt + c2 sin kt
p
are solutions for c1 , c2 ∈ R. The constant k = g/l equals to the frequency of
the harmonic oscillator, i.e. the pendulum.
Remark 1.1. In the script we write (most of the time) vectors u ∈ Rn in boldface
and matrices A ∈ Rm×n in bold upright letters.
Remark 1.2. In physical or technological applications where the independent vari-
able t can be interpreted as time, the derivative is often written with a dot,
du d2 u
i.e. u̇ = and for the second derivative ü = 2 . We will not use this notation.
dt dt
Example 1.7 (Some ODEs).
∂ 2u ∂ 2u
But the Laplace equation + = 0 is a partial differential equation (PDE).
∂x2 ∂y 2
0.2
ODE determines the slopes of the trajec-
0 tories at the points (x, u).
−0.2
Drawing for ”all” points (x0 , u0 ) ∈ Ω
−0.4
−0.6
a line element with slope f (x0 , u0 ),
−0.8
we obtain the directional field of the
−1 ODE (1.6), see Fig. 1.1.
0 0.2 0.4 0.6 0.8 1 A solution to the ODE ”fits” to the di-
rectional field. The direction of the tan-
Figure 1.1: Directional field of the
gents to the solution curve is given by
ODE u0 = x + u.
the line elements of the directional field.
The above geometrical concept of the directional field raises the question:
Given an arbitrary point (ξ, η) ∈ Ω. Does there exist a unique solution u passing
through that point (ξ, η) ?
This leads us to the following
Definition 1.7 (Initial value problem). Let I ⊂ R be an interval, Ω = I × R,
f : Ω → R and (ξ, η) ∈ Ω. The problem:
Find a function u : I → R diff’able, such that
is called an initial value problem (IVP). The second equation u(ξ) = η is called
the initial condition.
Python Example 1.3 (Numerical solution of an IVP).
To solve the IVP u0 = f (t, u), u(t0 ) = u0 for a scalar–valued right hand side
f : [t0 , T ] → R using python, we can use the following commands
from s c i p y . i n t e g r a t e import solve ivp
def f ( t , u ) : # D e f i n i t i o n of rhs
...
S o l = s o l v e i v p ( f , [ t0 , T] , [ u0 ] ) # S o l v e
5 t = Sol . t # t−c o o r d i n a t e s
u = Sol . y [ 0 , : ] # solution values
In chapter 2, Section 2.3 and 2.4 we will deal with the existence and uniqueness
of solutions to initial value problems (IVP).
1.3. THE DIRECTIONAL FIELD OF AN ODE 14
u0 = f (x), u(ξ) = η
0.8
Z x
0.6
Φ(x) = f (s) ds 0.4
ξ
0.2
0
as a solution of the ODE. We obtain all −0.2
−0.6
−1
Z x
u(x) = η + f (s) ds .
ξ
Remark 1.3. If I is not compact (i.e. not bounded and closed), f may be not
bounded on I and hence not integrable over I. However, the integral Φ(x) exists
for all x ∈ I, since [ξ, x] is a compact interval and since f as a continuous function
is integrable on this part.
u0 = g(u), u(ξ) = η
du du
= g(u) ⇐⇒ = dx 0.8
dx g(u) 0.6
0.4
0
Z Z
du −0.2
= dx = x + C . −0.4
g(u) −0.6
−0.8
dv
x(u) = ξ + . Figure 1.3: Directional field of u0 =
η g(v)
2u. Initial value (ξ, η) = (0, 0.2).
This is an implicit solution x = x(u) of the IVP. Applying the inverse function
theorem leads to the solution u = u(x). Examples can be seen in the tutorials.
Example 1.10 (A non–unique ODE). As a special case of the previous exam-
ple 1.9 we consider the ODE »
u0 = |u| . (1.7)
Thanks to symmetry v(x) := −u(−x) is also a solution, if u(x) is a solution.
Wlog we just consider positive solutions and obtain formally
√
Z
du
√ =2 u=x+C
u
(x + C)2
u(x; C) = for x > −C ∈ R .
4
Furthermore u ≡ 0 is a solution and −u(−x; C) are negative solutions. Using
these three possibilities, we can construct even more solutions by concatenating
them smoothly, i.e. such that they are at least diff’able.
Considering the initial value u(2) = 1, then all solutions are of the form
2
x /4
for x > 0
u(x; K) = 0 for K ≤ x ≤ 0 ,
2
−(x − K) /4 for x < K
where K ≤ 0 is arbitrary.
The IVP (1.7) allows for all initial values u(ξ) = η non unique solutions. For
η = 0 they branch immediately at x = 0, for η 6= 0 at some distance from the
initial value. We say, that the IVP has locally unique solutions for η 6= 0. For
η = 0 the solutions are not even locally unique.
1.4. SEPARATION OF VARIABLES 16
−1
−2
−3
−4
−4 −3 −2 −1 0 1 2
p
Figure 1.4: Directional field of the ODE u0 = |u| and solution trajectories for
the initial value (ξ, η) = (2, 1).
Example 1.11 (Separable ODE). Examples for such ODEs with separated vari-
ables or separable ODEs are
g(η) 6= 0 ,
Z x
Z u
ds
Proof. Assume (1.9) holds and define G(u) = and F (x) = f (t) dt.
η g(s) ξ
Then G : Iu → R exists in a neighborhood of η, since g(η) 6= 0. Furthermore, G
is diff’able in this neighborhood and it holds that G0 (u) = 1/g(u). Due to the
inverse function theorem exists a function H = G−1 : R → Iu where u = H(G(u)).
Due to (1.9) we get u = H(F (x)) or F (x) = G(u(x)).
Differentiation w.r.t. x yields G0 (u) · u0 = F 0 , thus u0 = f (x) · g(u). So u satisfied
the ODE (1.8).
Moreover G(η) = 0, F (ξ) = 0 and H(0) = η, therefore u(ξ) = H(F (ξ)) = η;
hence also the initial condition of (1.8) holds.
Let v be another solution, i.e. v 0 (x)/g(v(x)) = f (x). Integration w.r.t. x yields
x x v(x)
v 0 (t) dt
Z Z Z
ds
f (t) dt = = .
ξ ξ g(v(t)) v(ξ) g(s)
Theorem 1.2. Consider the same situation as in Thm. 1.1, but let g(η) = 0 and
g(u) 6= 0 for η < u ≤ η + α resp. η − α ≤ u < η for α > 0. Furthermore assume
Z η+α Z η
ds ds
=∞ or resp. =∞.
η g(s) η−α g(s)
Then there exists no solution u(x) approaching the constant u ≡ η from above or
below.
Corollary 1.3. Let u(x) be a solution of (1.8) where u(x0 ) ≶ η for some x0 ∈ Ix .
Then the estimate u(x) ≶ η holds true for all x ∈ Ix .
If η ∈ int Iu and both integrals in Thm. 1.2 diverge, then the IVP (1.8) admits a
locally unique solution.
This is the case, if g(s) has an isolated root at η and if g is Lipschitz–continuous
around η, i.e. |g(u) − g(η)| = |g(u)| ≤ K |u − η|; e.g. if g 0 (η) exists.
Remark 1.4. The opposite direction of Thm.1.2 is in general not true, i.e.
both integrals converge 6=⇒ IVP not uniquely solvable.
A special case of an ODE with separated variables in given by the linear ODE of
first order
u0 (x) = a(x)u + b(x) . (1.10)
To construct solutions of (1.10) we start with the homogeneous problem
To construct the solution of the inhomogeneous problem (1.10), we use the ”vari-
ation of constants”. This approach goes back to Lagrange and starts from the
general solution (1.12). We replace the constant C by a function C(x) and obtain
u(x) = C(x)eA(x)
u0 (x) = C 0 (x)eA(x) + C(x)A0 (x)eA(x)
C 0 (x) = b(x)e−A(x)
Z
C(x) = C0 + b(t)e−A(t) dt .
The solution of the IVP u0 (x) = a(x)u + b(x), u(ξ) = η can now be written as
ñ Z x ô Z x
−A(t) A(x) A(x)
u(x) = η + b(t)e dt e = ηe + b(t)eA(x)−A(t) dt
ξ ξ
Z t Z x
where A(t) = a(τ ) dτ and especially A(x) − A(t) = a(τ ) dτ .
ξ t
Chapter 2
One can check, that k·k∞ defines a norm on C and that kuk∞ < ∞ holds for all
u ∈ C.
Let p : I → R be a weighting function satisfying 0 < a ≤ p(x) ≤ b < ∞ for all
x ∈ I. Then
kukp,∞ := ku pk∞ = max (p(x) · |u(x)|∞ )
x∈I
20
21 CHAPTER 2. EXISTENCE AND UNIQUENESS
is called weighted maximum norm. One can check that k·kp,∞ also defines a norm
on C.
As a special case we consider the exponential weighting function p(x) := e−α|x−ξ|
for α > 0 und ξ ∈ I. In the sequel we frequently make use of the norm induced
by this weight and use the notation
kukα,∞ := max |u(x)|∞ · e−α|x−ξ| .
x∈I
Definition 2.3 (Banach space). Let (V, k·k) be a normed vector space. We
call V complete or Banach space, if all Cauchy sequences converge in V .
Lemma
Ä 2.1. Letä I ⊂ R be a compact interval and m ∈ N. The vector space
m
C(I, R ), k·kp,∞ is complete for any weighting function p : I → R.
Ä ä
In particular, for any α > 0, the spaces (C(I, Rm ), k·k∞ ) and C(I, Rm ), k·kα,∞
are Banach spaces.
Proof. As an exercise.
Definition 2.4 (Operator). Let (V, k·kV ) and (W, k·kW ) be two real normed
vector spaces. Let D ⊂ V and T : D → W be a mapping (operator).
We call T a functional, if W = R, C. Furthermore, we call T
Remark 2.1. Let T be a linear operator. Then the following holds true:
T cont. in u0 ∈ V ⇐⇒ T cont. in 0
T L–cont. ⇐⇒ kT [u]kW ≤ q kukV ∀u ∈ D
Lipschitz–cont. operators are continuous. The minimal L–constant of a linear
operator is called the operator norm of T .
Note, that the definition of continuity and L–continuity involve two different
norms: k·kV for the arguments and k·kW for the images.
2.2. BANACH FIXPOINT THEOREM 22
is affine linear and L–continuous w.r.t. the k·kα,∞ –norm in V and W with the
L–constant 1/α. Check this as an exercise.
un+1 = T [un ]
∗ 1 qn
kun − u k ≤ kun+1 − un k ≤ ku1 − u0 k ,
1−q 1−q
where k·k denotes the norm in B and q < 1 equals to the L–constant of T .
1
kun+p − un k ≤ [kun+p+1 − un+p k + kun+1 − un k]
1−q
1 n+p 2 ku1 − u0 k n
≤ (q + q n ) ku1 − u0 k ≤ q .
1−q 1−q
To apply the Banach Fixpoint Theorem, we let B = C(I, Rm ) and use the
exponentially weighted norm k·kα,∞ on B for some α > 0 to be specified later on.
1
kT [u] − T [v]kα,∞ ≤ q ku − vkα,∞ for q = .
2
Hence we can apply the Banach Fixpoint Theorem to (FPP) and obtain the
desired result.
In many cases f is not defined on the entire set I × Rm but just on a subset I × G.
25 CHAPTER 2. EXISTENCE AND UNIQUENESS
B We have already shown that T [u](x) ∈ G, hence graph T [u] ∈ Ω for all
u ∈ D and therefore T (D) ⊂ D.
The following result deals with the global existence and uniqueness of solutions.
Corollary 2.5. Let Ω ⊂ Rm+1 be a domain (non–empty, open and simply con-
nected). Let f : Ω → Rm be continuous and Lipschitz–continuous w.r.t. u for
all (x, u) ∈ Ω. Then:
The initial value problem (IVP) has a unique solution. This solution can be
extended up to the boundary of Ω.
Remark 2.2. The above Corollary states, that the solution u exists e.g. on an
interval ξ ≤ x ≤ b right of ξ, where b = ∞ is also possible. Depending on the
value of b we have one of the following cases:
(1) b = ∞ : The solution exists for all x ≥ ξ, i.e. the solution can be extended
up to the boundary of Ω in x–direction.
(2) b < ∞ and sup |u(x)| → ∞ for x → b : The solution blows up, i.e. it can
be extended up to the boundary of Ω in u–direction.
2.4. PEANO’S THEOREM 26
(3) b < ∞ and dist ((x, u(x)), ∂Ω) → 0 for x → b : The solution gets arbitrarily
close to the boundary of Ω.
In particular this implies that the maximal interval of existence of the solution u
is open. The same holds true for values of x left of ξ.
All these results also hold true for initial value problems for ordinary differential
equations of order n. Consider an IVP of order n
Ä ä
F x, u, u0 , . . . , u(n) = 0 ,
Proof. The proof utilizes Schauder’s fixpoint theorem instead of Banach. For
details we refer to [Wal98, §7].
Corollary 2.7. Let Ω ⊂ Rm+1 be a domain. Let f ∈ C(Ω, Rm ). For any initial
value (ξ, η) ∈ Ω there exists a solution to the IVP (IVP). This solution can be
extended to the boundary of Ω.
Proof. If Case 1 is not true, then due to the assumptions and the continuity
of Φ and Ψ there exists x0 ∈ I0 such that Φ(x) < Ψ(x) for ξ < x < x0 and
Φ(x0 ) = Ψ(x0 ). In remains to show, that Φ0 (x0 ) ≥ Ψ0 (x0 ). Consider the left
sided difference quotient at x0
Φ(x0 ) − Φ(x) Ψ(x0 ) − Ψ(x)
>
x0 − x x0 − x
where ξ < x < x0 . Passing to the limit x % x0 yields Φ0 (x0 ) ≥ Ψ0 (x0 ).
Definition 2.5. Let Ω ⊂ R2 , f ∈ C(Ω). We consider the IVP
u0 = f (x, u), u(ξ) = η (IVP)
on an interval I = [ξ, ξ + a] for some a > 0.
A function v or resp. w is called a lower– or upper function of the IVP, if
v 0 < f (x, u(x)) on I and v(ξ) ≤ η resp. w0 > f (x, u(x)) on I and w(ξ) ≥ η .
2.5. UPPER– AND LOWER FUNCTIONS 28
Proposition 2.9. Let u be a solution of (IVP) and let v and w be lower– and
upper functions. Then
v(x) < u(x) < w(x) on I0 = (ξ, ξ + a) .
Proof. For v: If v(ξ) < η, then due to the assumption v 0 < f (x, u(x))it holds
that v(x) < u(x) for all x ∈ I0 .
If v(ξ) = η, then v 0 (ξ) < f (ξ, u(ξ)) = f (ξ, η) = u0 (ξ) implies the existence of
ξ˜ < ξ where v(ξ)
˜ < u(ξ).˜ Now we are in the situation of the first case.
0.6
The ODE v 0 = −v together with v(0) = 1 yields
0.5 v(x) = e−x as a lower function.
0.4
0.3
The ODE w0 = −w/5 with w(0) = 1 yields the
0.2 upper function w(x) = e−x/5 .
0.1
0
The solution of the original IVP is given by
0 1 2 3 4 5
u(x) = exp(− arctan x).
Chapter 3
u(t = 0, x) = u0 (x) ,
29
30
Introducing the vectors u(t) = (u1 (t), . . . , un−1 (t)) and f (t) = (f1 (t), . . . , fn−1 (t)),
we can write (3.2) as
u0 = Au + b , (3.3)
using the matrix
â ì
á
−2 1 0
ë κ/h2 uL (t)
.. .. 0
κ 1 . . ..
A= ... ... and b = f + . .
h2 1 0
0 1 −2 2
κ/h uR (t)
The dimension of this ODE system depends on the number n of spatial grid
points; in applications one often works with n = 106 or even more nodes.
Definition 3.2 (Matrix norms). Let |·| be a vector norm in Rn and k·k a matrix
2
norm in Rn×n ' Rn . The norm k·k is called compatible with |·|, if
The L1 –normP
P
|x| = |x|1 = i |xi | is compatible with the column sum norm
kAk1 = maxj i |aij |.
ÄP 2
ä1/2
The Euclidean norm |x| = |x|2 = i |xi | is compatible with the spectral
norm kAk2 = ρ(AH A). Here AH = AT denotes the conjugate transposed
(Hermitean) matrix and ρ(A) denotes the spectral radius, i.e. the magnitude of
the largest eigenvalue.
Theorem 3.1. Let I ⊂ R be a compact interval, A : I 7→ Rn×n , b : I 7→ Rn
continuous and ξ ∈ I, η ∈ Rn . Then the IVP
Thanks to the Picard–Lindelöf Theorem 2.3, there exist for every initial value
u(ξ) = η ∈ Rn a unique solution u(·; η) of the homogeneous IVP (3.8). Let
SH := u ∈ C 1 (I, Rn ) : u0 = Au
3.2. INHOMOGENEOUS SYSTEMS 32
denote the set of all solutions to the homogeneous linear ODE. Now, we can
define the mapping Φ : Rn 7→ SH by Φ(η) := u(·; η). In other words, Φ which
maps an initial value η onto the solution u(·; η) of the homogeneous IVP (3.8).
It is immediate to see, that this map is a bijection and hence the set SH can be
viewed as a vector space of dimension n.
Lemma 3.2. Let u ∈ SH and u(t) = 0 for some t ∈ I. Then u ≡ 0.
Definition 3.3 (Solution matrix and fundamental matrix). A family u1 (t), . . . , un (t)
of linear independent solutions to the linear homogeneous ODE u0 = A(t)u is
called a fundamental system. The matrix
u(t) = X(t) η .
Definition 3.4 (Wronski–determinant). Let U(t) = (u1 (t)| · · · |un (t)) be a solu-
tion matrix. We call its determinant w(t) = det U(t) the Wronski–determinant.
Lemma 3.3. The Wronski–determinant satisfies the homogeneous linear ODE
w0 = tr A(t) w .
we define the set of all solutions to the inhomogeneous ODE u0 = A(t)u + b(t)
as
SI := u ∈ C 1 (I, Rn ) : u0 = Au + b .
33 CHAPTER 3. LINEAR DIFFERENTIAL EQUATIONS
u0 (t) = X0 (t) c(t) + X(t) c0 (t) = A(t) X(t) c(t) + X(t) c0 (t)
!
= A(t) u(t) + b(t)
and hence
Integration leads to
Z t
c(t) = c(ξ) + X−1 (s) b(s) ds .
ξ
Theorem 3.5. The unique solution of the inhomogeneous initial value prob-
lem (3.9) is given by
Ç Z t å
u(t) = X(t) η + X−1 (s) b(s) ds .
ξ
Remark 3.2. We compare the scalar and the vectorial case (both with constant
coefficients) :
3.3. THE MATRIX–EXPONENTIAL FUNCTION 34
scalar vectorial
homogen. x0 = ax, x(0) = η x0 = Ax, x(0) = η
solution x = eat η x = X(t) η
converges for every initial guess X0 ∈ Rn×n to the solution X(t) of (3.10),
i.e. to the fundamental matrix.
A2 t2 Ak tk
Xk (t) = E + At + + ··· + .
2 k!
Its scalar analogue
a2 t2 ak tk
xk (t) = 1 + at + + ··· +
2 k!
converges to x(t) = eat . This motivates the following
35 CHAPTER 3. LINEAR DIFFERENTIAL EQUATIONS
converges for all constant matrices A ∈ Rn×n or Cn×n . It defines the so–called
matrix–exponential–function
∞
A
X Ak
exp(A) = e := ∈ Rn×n or Cn×n .
k=0
k!
Theorem 3.6. The fundamental matrix of the homogeneous ODE with constant
coefficients is given by
X(t) = eAt .
Remark 3.3. Based on the analogy to the scalar case, one may assume, that the
fundamental matrix for a problem with non–constant coefficients
X0 = A(t) X
d At
(1) e = A · eAt
dt
(2) Let Λ = diag (λ1 , . . . , λn ) be a diagonal matrix. Then
eB+C = eB eC = eC eB .
(7) eA+λE = eA eλ = eλ eA
The properties (2), (4) and (7) show an efficient way to compute eA .
What to do, if A is not diagonalizable? Use the Jordan normalform (Thm. A.3)
Proof. As an exercise.
Proof. As an exercise.
Comparing coefficients yields (up to scalar multiples) the following two cases
Å ã Å ã
x1 1 −t
(1) b = 0, d = 0, a = 1, c = 2, hence = e .
y1 2
Å ã Å ã
x2 t
(2) b = 1, d = 2, a = 0, c = −1, hence = e−t .
y2 −1 + 2t
y 0 = Ay + b(t), y(ξ) = η
u0 = A(t) u + b(t) ,
á ë
0 1 0
.. ..
A(t) = . . .
0 1
−a0 (t) −a1 (t) · · · −an−1 (t)
a unique solution.
The set SH := u ∈ C n (I) : u(n) + an−1 (t)u(n−1) + · · · + a1 (t)u0 + a0 (t)u = 0 of
(k)
Let x0 , . . . , xn−1 be a fundamental system to the initial values xi (0) = δik for
i, k = 0, . . . , n − 1. The resulting fundamental matrix is given by
á ë
x0 (t) x1 (t) · · · xn−1 (t)
x00 (t) x01 (t) x0n−1 (t)
X(t) = .. .. .
. .
(n−1) (n−1) (n−1)
x0 (t) x1 (t) · · · xn−1 (t)
w0 = −an−1 (t)w .
39 CHAPTER 3. LINEAR DIFFERENTIAL EQUATIONS
In the sequel we restrict to the case of constant coefficients, i.e. we assume the
matrix A ∈ Rn×n to be constant.
u0 = A u + b(t)
where
á ë
0 1 0
.. ...
A= . .
0 0 1
−a0 −a1 · · · −an−1
The characteristic polynomial χA (λ) = det (A − λE) is also called the charac-
teristic polynomial of the ODE (†).
Remark 3.4. There might appear complex roots λ = α + iω. Since all the coef-
ficients a0 , . . . , an−1 are assumed to be real, the roots appear in pairs with their
complex conjugate λ = α − iω. A real–valued fundamental system can be ob-
tained replacing the pairs of complex conjugate solutions
¶ ©
eλt , teλt , . . . , tk−1 eλt ; eλt , teλt , . . . , tk−1 eλt
The ODE
mz 00 = −kz .
mz 00 = −βz 0 − kz ,
(1) The overdamped case δ 2 > 0. Here we have two real roots λ1 = −a + δ and
λ2 = −a − δ. The fundamental system reads as u1 = eλ1 t and u2 = eλ2 t .
The general solution is therefore given by
u = αeλ1 t + βeλ2 t
where α, β ∈ R.
(2) The critically damped case δ 2 = 0 with one root λ = −a of multiplicity two.
The fundamental system equals u1 = eλ1 t and u2 = teλ2 t and the general
solution is given by
u = αeλ1 t + βteλ2 t
where α, β ∈ R.
41 CHAPTER 3. LINEAR DIFFERENTIAL EQUATIONS
(3) The oscillatory case for δ 2 < 0. In this situation we encounter two complex
conjugate roots λ, λ = −a ± i |δ|. The complex–valued fundamental system
0
The following Figure 3.2 shows √ the solutions using b = 1, u(0) = 2, u (0) = 0
and damping parameter a = 2 (overdamped), a = 1 (critically damped) and
a = 1/4 (damped oscillation). The left hand side shows the solution u(t); the
right hand side depicts the trajectories in the u u0 –phase space.
2 1
1.5
0.5
1
0
u'
0.5
u
-0.5
0
-1
-0.5
-1 -1.5
0 5 10 15 20 -1 -0.5 0 0.5 1 1.5 2
Time t u
Numerical Methods
In the sequel we consider the following initial value problem for a first order ODE
u0 = a u, u(0) = 1
is given by u(t) = exp(at). Using python, the following code–snippet solves this
IVP on the interval t ∈ [0, 3].
from numpy import ∗
from s c i p y . i n t e g r a t e import s o l v e i v p
def f ( t , u , a ) :
return a∗u
5
a = 1.5
S o l = s o l v e i v p ( f , [ 0 , 3 ] , [ 1 ] , a r g s =(a , ) )
t = Sol . t
u = Sol . y [ 0 , : ]
10 print ( t )
print ( u )
When running this code, we observe, that the t–values are strangely spaced inside
the interval [0, 3]. For different values of the parameter a, the solver solve ivp
even chooses different time points for computing the solution. Why?
42
43 CHAPTER 4. NUMERICAL METHODS
u(t) = Φt,t0 u0 .
The operator Φt,t0 : Rn → Rn maps the initial value u0 ∈ Rn at time t0 onto the
solution u(t) ∈ Rn evaluated at time t. The two–parameter family of maps Φ·,·
is called the evolution of the differential equation.
Lemma 4.1. Let Φ be the evolution of a differential equation. Then for all initial
values (t0 , u0 ) ∈ Ω the following holds
Proof. As an exercise.
uk+1 = uk + hf (tk , uk ) .
def e u l e r ( f , t , u0 ) :
# f : f ( t , u ) , t s c a l a r , u v e c t o r ; r h s o f th e ODE
5 # t : v e c t o r o f d i s c r e t e time p o i n t s
# u0 : v e c t o r o f i n i t i a l v a l u e s
44
n = len ( t )
10 m = len ( u0 )
U = z e r o s ( (m, n ) )
U [ : , 0 ] = u0
return U
and try to evaluate the integral over an interval [t0 , t0 + h] by a suitable numerical
quadrature.
The left–sided rectangle rule
Z t0 +h
f (s, u(s)) ds ' h · f (t0 , u(t0 ))
t0
leads to
Here the new value u(t0 + h) appears on both sides of the equations. Hence it
is only given implicitly and in general we need to solve a non–linear system for
u(t0 + h).
The midpoint–rule
Z t0 +h
f (s, u(s)) ds ' h · f (t0 + h/2, u(t0 + h/2))
t0
leads to
For the sake of simplicity, we are just considering scalar ODEs in this section.
All the results also apply for systems of ODEs, replacing the scalar values of u
by appropriate vectors.
Definition 4.2 (Grid). Consider an interval [t0 , T ] ⊂ R and a subdivision called
grid Th = {ti : i = 0, . . . , n} ⊂ [t0 , T ] where t0 < t1 < · · · < tn = T . We
define the step size hi = ti+1 − ti for i = 0, . . . , n − 1 and the step size vector
h = (h0 , . . . , hn−1 ). The maximal step size is denoted by hmax = |h| = maxi hi .
If the step sizes are constant, i.e. hi = h for all i, we call the grid equidistant.
A second grid S = {sj : j = 0 . . . m} is called refinement of T , if T ⊂ S and
hmax (S) < hmax (T ).
Let u : [t0 , T ] → R be a function. We call the vector
For the sake of shorter notation, we often denote the grid function uh also by u,
if it is clear, that we are speaking about a grid function and if confusion with the
function itself can be excluded.
4.1. CONVERGENCE THEORY 46
uj+1 = uj + hj ψ(tj , uj ; hj )
ψ(t, u, h) = f (t, u) .
For a given IVP (4.1) with (exact) evolution Φ we will try to construct a numerical
evolution Ψ which is as close as possible to the exact evolution Φ. This leads us
to the following
Definition 4.4 (Consistency). Let u(t) denotes the exact solution of the IVP.
We call
1 t+h,t u(t + h) − u(t)
δh (t, u) = Φ u(t) − Ψt+h,t u(t) = − ψ(t, u(t), h)
h h
the local discretization error or consistency error of the numerical evolution Ψ.
We call the numerical evolution Ψ or its defining method consistent, if
δh (t, u) = O(hp ) .
Remark 4.1. Some authors, cf. Deuflhard [DB02], define the local discretiza-
tion error alternatively by δh (t, u) = Φt+h,t u(t) − Ψt+h,t u(t). However, then the
condition for consistency order p reads as δh (t, u) = O(hp+1 ).
Proof. As an exercise.
Theorem 4.3. The explicit Euler–method is consistent of order p = 1.
h 00
δh = u (t) + O(h2 ) = O(h) .
2
Definition 4.5 (Convergence). Let v(t) = Φt,t0 u0 denote the exact solution of
the IVP (4.1) and let uh be a numerical solution. We call
eh = O(hp ) .
en+1 ≤ (1 + qn )en + pn
holds for all n, then the elements of the sequence (en ) can be estimated by
n−1
! " n−1 #
X X
en ≤ e0 + pj · exp qj .
j=0 j=0
4.1. CONVERGENCE THEORY 48
Proof. As an exercise.
Theorem 4.5 (Convergence of one–step methods). Consider the IVP (4.1) and
its solution u(t) = Φt,t0 u0 . Furthermore let Ψ be the numerical evolution of a
one–step method with increment ψ. Assume that
(2) Next, we consider the numerical solution ũh generated by the extended
increment ψ̃ on a grid Th with step size |h| < h0
u(ti+1 ) − u(ti )
u(ti+1 ) = u(ti ) + hi .
hi
Now, the error ẽi = ũi − u(ti ) satisfies
u(ti+1 ) − u(ti )
ï ò
ẽi+1 = ẽi + hi ψ̃(ti , ũi , hi ) −
hi
î ó
= ẽi + hi ψ̃(ti , ũi , h) − ψ̃(t, u(ti ), h)
u(ti+1 ) − u(ti )
ï ò
+ hi ψ̃(ti , u(ti ), h) −
hi
(3) Since we assume the method to be consistent, i.e. max δhj −→ 0 for h → 0,
there exists h1 , 0 < h1 ≤ h0 , such that |ẽi | ≤ γ for all i and all step sizes
|h| < h1 .
Now we can choose a grid Th with step size |h| < h1 and consider the
4.1. CONVERGENCE THEORY 50
numerical solution on that grid. Then we can skip the extension of the
increment, i.e. ψ = ψ̃ and we finally obtain
eh −→ 0 or eh = O(hp ) .
where ρj denotes the round–off error in the j–th step. The global error Ej = Uj −
u(tj ) satisfies the following recursive estimate which can be obtained analogously
to the above proof
j−1
" #
X
|Ej | ≤ ρ0 + (h · max δh + ρ) eM (T −t0 )
i=0
T − t0
ï ò
≤ ρ + (T − t0 ) max δh + ρ eM (T −t0 )
h
ρ
'O δ+ .
h
Hence there exists an optimal step size hopt for which the influence of the local
discretization error balances with the round–off errors. For smaller step sizes
h < hopt the local discretization error gets smaller, but the round–off errors start
51 CHAPTER 4. NUMERICAL METHODS
to accumulate, since we have to do many steps. For larger step sizes h > hopt , the
round–off error is less important, but the local discretization error gets dominant.
If the method is consistent of order p, the the overall error will be of order hp + hρ .
Minimizing this overall error, we obtain the optimal step size to be of order
»
hopt ' p+1 ρ/p
The larger the order p of the method, the larger the optimal step size will be.
Hence we aim to construct higher order methods.
Replacing the unknown function value u(t + h2 ) again by its integral form, we
obtain
Z t+h Ç Z t+h/2 å
h
f (s, u(s)) ds = h f t + 2 , u(t) + f (s, u(s)) ds + O(h3 ) .
t t
Now, we have to approximate the inner integral maintaining the overall approx-
imation order. It is sufficient to approximate the inner integral up to first order,
i.e. the rectangle rule is sufficient. This yields
Z t+h
f (s, u(s)) ds = hf t + h2 , u(t) + h2 f (t, u(t)) + O(h2 ) + O(h3 )
t
= hf t + h2 , u(t) + h2 f (t, u(t)) + O(h3 ) .
4.2. RUNGE–KUTTA METHODS 52
This is the Runge method (1895), which can be written as a two–stage method
i−1
!
X
ki = f t + ci h, u + h aij kj , i = 1...s .
j=1
c A
b
Due to the construction, the matrix A is a strict lower triangular matrix, i.e. aij =
0 for j ≥ i.
0 0
1
Number of stages s = 1.
Order of consistency p = 1.
0 0 0
1/2 1/2 0
0 1
Number of stages s = 2.
Order of consistency p = 2.
53 CHAPTER 4. NUMERICAL METHODS
n = len ( t )
10 m = len ( u0 )
U = z e r o s ( (m, n ) )
U [ : , 0 ] = u0
20 return U
Number of stages s = 4.
Order of consistency p = 4.
4.2. RUNGE–KUTTA METHODS 54
Besides these methods, there exist may more, see e.g. Dormand–Prince.
How to construct these Runge–Kutta methods systematically?
Here are some ideas and remarks.
Lemma 4.7 (Stage number s vs. consistency order p). The consistency order p
of an s–stage Runge–Kutta method satisfies
p≤s.
Idea of the proof. To see this, we consider the IVP u0 = u, u(0) = 1. The solution
after one step of size h satisfies
h2 hp
Φh,0 1 = eh = 1 + h + + ··· + + O(hp+1 ) .
2 p!
The ith–stage ki of the RK–method is a polynomial of degree deg ki ≤ i − 1 in
h. Hence the increment function ψ is also a polynomial of deg ψ ≤ s in h. If ψ
is consistent of order p in the above IVP, the ψ approximates the exponential up
to an error O(hp ); i.e. p ≤ s.
The following table due to Butcher (1963,1965,1985) contains the minimal num-
ber of stages s necessary for achieving consistency order p
p 1 2 3 4 5 6 7 8 ≥9
smin 1 2 3 4 6 7 9 11 ≥ p + 3
θi = 1 .
Lemma
P 4.8. Consider a Runge–Kutta–method (b, c, A).
If P bi = 1, then the method is consistent.
If j aij = ci , then the method is invariant under autonomization.
Example 4.8 (Constructing a two–stage method of second order). We consider
a general two–stage Runge–Kutta method with increment
ψ = bi k1 + b2 k2
k1 = f (t, u)
k2 = f (t + c2 h, u + ha21 k1 ) = f (t + c2 h, u + ha21 f (t, u)) .
A Taylor–expansion of k2 yields
c22 a221 2
ï ò
2
k2 = f +h [c2 ∂t f + a21 f · ∂u f ]+h ∂tt f + f · ∂uu f + c2 a21 f · ∂tu f +O(h3 )
2 2
and hence for the increment
u(t + h) − u(t) h
= f + [∂t f + f · ∂u f ]
h 2
h2 2
f · ∂uu f + 2f · ∂tu f + (∂u f )2 · f + f · ∂u f · ∂t f + ∂tt f + O(h3 ) (∗)
+
6
The consistency error
u(t + h) − u(t)
δ= −ψ
h
can be obtained by comparing the two expansions (†) and (∗). This yields the
conditions
B To cancel h0 : b1 + b2 = 1.
1
B To cancel h1 : b2 c 2 = 2
and b2 a21 = 12 .
0 0 0
1/2 1/2 0
0 1
Remark 4.3. The following table (also due to Butcher) contains the number of
conditions that have to be satisfied constructing a RK–method of order p.
p 1 2 3 4 5 6 7 8 9 10
# conditions 1 2 4 8 17 37 85 200 486 1205
(1) Choose a step size h and consider the centered difference approximation
f (x0 + h) − f (x0 − h)
df (h) := .
2h
Using Taylor, we obtain the following expansion of the error
2 4
0
h (3) h (5)
ef (h) := |f (x0 ) − df (h)| ≤ f (x0 ) + f (x0 ) + . . .
3! 5!
The error admits a power series expansion in even powers of h and the
original approximation df (h) is of second order. How to do better?
(2) Consider a step size sequence h0 > h1 > . . . hk > 0.
(3) Construct the interpolating polynomial D for the data points (hi , df (hi )).
(4) Evaluate the interpolating polynomial at h = 0, i.e. D(0).
Remark 4.4. The last two steps can be done effectively using the Neville–
Aitken–scheme
d(h0 ) := D00
&
d(h1 ) := D11 → D11
.. ..
. .
d(hk−1 ) := Dk−1,1 → ··· → Dk−1,k−1
& & &
d(hk ) := Dk1 → ··· → Dk,k−1 → Dkk ≈ D(0)
Here
hj−l+1 r
Å ã
1
Djl = Dj,l−1 + (Dj,l−1 − Dj−1,l−1 ) , µj,l = −1
µjl hj
where r = 2 is due to the expansion of the error in even powers of h.
4.3. EXTRAPOLATION METHODS 58
Now, we transfer this idea to the numerical solution of ODEs. Our goal is to
compute the solution u(t + h) = Φt+h,t u(t) after one base step of step size h up
to a desired order q.
We choose a base method ψ of order p and a sequence F = (n0 , n1 , . . . ) with
nk → ∞, e.g. the Romberg–sequence nk = 2k or the harmonic sequence nk =
k + 1. We define the step sizes hk = h/nk and compute uhk (t + h) using the base
method with local step size hk . Next, we apply the Neville–Aitken–scheme
to obtain an extrapolation of the u(t + h) up to the order hp+k .
What is a suitable base–scheme?
The following table compares the number of function evaluation necessary for
order q of the extrapolation scheme using a base scheme of order p.
q
p 1 2 3 4 5 6 7 8
1 1 2 4 7 11 16 22 29
2 2 5 10 17 26 37
3 3 8 16 27 41
4 4 11 22 37
5 6 17 34
6 7 20
7 9 26
For j = 0 . . . K do
hj := h/nj
(j)
u0 := u(t)
(j) (j)
Ä (j)
ä
ul+1 := ul + hj f t + lhj , ul , l = 0 . . . nj − 1
Uj0 := u(j)
nj
|u(t + h) − Ukk | ≤ δ .
The following idea is due to Deuflhard and Hohmann [DH03, Chapter 9.5]:
We use
Why? It holds that ejl ej,l−1 , since Ujl is of higher order. Due to
we obtain
and therefore
εk,k−1 ≈ ek,k−1 .
If the estimator εk,k−1 is small enough, i.e. εk,k−1 ≤ ρ · δ for some safety factor
ρ ∼ 1/4, 1/5, then we accept the numerical solution Ukk as approximation of the
exact solution u(t + h). Otherwise, we add an additional row to the Neville–
Aitken–scheme, i.e. we use an additional extrapolation step to increase the order
and re–check the accuracy afterwards.
In general we cannot choose the step size of a numerical method a priori but we
need an adaptive choice of the step size. The step size shall be small to allow
accurate computation, if the solution undergoes large and rapid changes. On the
other hand the step size can be large to allow fast computation, if the solution
does not change much. However, we do not know the solution in advance, hence
we cannot compute the needed step sizes in advance; we need adaptivity. To
construct an adaptive step size method, we need the following ingredients
δ̂ = O(hp+1 ) .
61 CHAPTER 4. NUMERICAL METHODS
Since
it holds that
How to determine a suitable the step size? Our goal is to determine an optimal
step size h∗ such that the error ε equals a desired tolerance τ
τ = c(h∗ )p+1 .
ε = chp+1 .
Combining the above two equations, we can get rid of the unknown constant c
and obtain for the optimal step size
»
h∗ = h p+1 τ /ε .
Here hmax > 0 denotes an upper bound for the step size, q > 1 is a factor limiting
the maximal increase of the step size (q ∼ 5) and 0 < ρ < 1 denotes a safety
factor (ρ ∼ 1/2, 3/4).
If, for a given step size h, the error estimator ε is amller than the tolerance τ ,
then (∗) shows how much can we can to increase the step size, without violating
the accuracy constraint. If ε > τ , then (∗) shows how much we have to decrease
the step size to fulfill the accuracy constraint.
In order to get an efficient computation, we must be able to obtain the lower order
auxiliary solution u with almost no additional effort compared to computing the
high–order solution û. The embedded Runge–Kutta methods due to Fehlberg
and Dormand/Prince are designed for this purpose. They use two Runge–
Kutta methods with s and s + 1 stages that share the same intermediate stages,
but differ just in the weighting coefficients b for the increment.
4.4. ADAPTIVE STEP SIZE SELECTION 62
Stability
We have touched these issues already in chapter 2. The upper– and lower func-
tions introduced in chapter 2.5 serve as an important tool.
In general we distinguish between the local behavior (e.g. on a compact interval
I) of the solution and the long–term behavior on unbounded intervals. First, we
will analyze the situation on compact (i.e. bounded) intervals.
on a compact interval I ⊂ R.
63
5.1. CONTINUOUS DEPENDENCE ON INITIAL DATA 64
The above theorem contains even more information summarized by the following
Theorem 5.2 (Continuous dependence). Let u = u(t) be the solution of (5.1).
For α > 0 let
Sα := {(t, y) : t ∈ I, |y − u(t)| ≤ α}
denote the α–neighborhood of the solution trajectory. Assume, that there exists
some α0 > 0, such that f satisfies the Lipschitz–condition (L) on Sα0 . In partic-
ular, f is assumed to be continuous on Sα0 .
Then the solution u depends continuously on both the initial value η and the right
hand side f . In mathematical terms: For all ε > 0, there exists some δ > 0, such
that all solutions z of the perturbed IVP
z 0 = g(t, z), z(ξ) = η̃ (5.4)
where the right hand side g is continuous on Sα0 and
|g(t, y) − f (t, y)| ≤ δ in Sα0 , |η̃ − η| ≤ δ (5.5)
exist on entire I and the estimate
|z(t) − u(t)| ≤ ε (5.6)
holds for all t ∈ I.
65 CHAPTER 5. STABILITY
Proof; Sketch. Let z satisfy (5.4) and (5.5). As long as z is contained in Sα0 , the
estimate (5.2) holds for γ = δ, hence (5.6) also holds setting γ = δ. Choosing
γ = δ small enough, we can guarantee, that the right hand side of (5.3) is
bounded by α0 /2. As long as z is inside Sα0 the estimate (5.6) holds and therefore
|u0 − z| ≤ α0 /2. Hence the solution trajectory z cannot leave Sα0 .
Let ε > 0. Choosing γ = δ in (5.2) and (5.3) small enough, we can bound the
right hand side of (5.3) by ε.
In applications one frequently encounters the situation, that right hand side f
and/or the initial value u0 of an IVP
u0 = f (t, u; λ), u(t0 ) = u0 (λ)
depend on a parameter λ ∈ Rp . The dependence of the solution u(t; λ) of this
parameter is called the sensitivity of the solution w.r.t. λ.
Definition 5.1 (Sensitivity). Let I ⊂ R be a compact interval and t0 ∈ I. Let
f : I × Rn × Rp → Rn and u0 : Rp → Rn be twice continuously differentiable. We
consider the IVP
u0 = f (t, u; λ), u(t0 ) = u0 (λ)
depending on the parameter λ = (λ1 , . . . , λp ) ∈ Rp with the unique solution
u(t; λ). We call
d
Sk (t) := u(t; λ), k = 1, . . . , p
dλk
the sensitivity of the solution u(t; λ) with respect to the parameter λk .
Proof; Sketch. Differentiating Sk (t) = dλdk u(t; λ) with respect to t and applying
Schwarz theorem to interchange the order of differentiation, we obtain
d2 d d d ∂f du ∂f
Sk0 (t) = u(t; λ) = u(t; λ) = f (t, u(t; λ); λ) = · +
dt dλk dλk dt dλk ∂u dλk ∂λk
∂f ∂f
= · Sk (t) +
∂u ∂λk
together with the initial condition
∂ ∂
Sk (t0 ) = u(t0 ) = u0 (λ) .
∂λk ∂λk
5.1. CONTINUOUS DEPENDENCE ON INITIAL DATA 66
the terminal value of the solution u, Figure 5.1: Logistic model and sen-
has a high sensitivity only for large sitivities.
times t.
67 CHAPTER 5. STABILITY
u0 = λu, u(0) = 1 .
z(0) = 1 + ε ,
B For λ > 0 this difference grows for arbitrary small ε > 0 exponentially
without bounds, lim (z − u)(t) = ∞.
t→∞
stable (in the sense of Lyapunov), if for all ε > 0 there exists δ > 0, such that
all solutions z with |z(0) − u(0)| < δ exist for all t ≥ 0 and satisfy
asymptotically stable , if it is stable and there exists δ > 0 such that for all
solutions z with |z(0) − u(0)| < δ it holds that
Proof; Sketch. The cases γ > 0 and γ < 0 are easy to see when recalling the
fundamental system in its exponential form eAt .
Let γ = 0 and assume there exists an eigenvalue λ whose geometric multiplicity is
strictly less then its algebraic multiplicity. Then, the Jordan normalform contains
a Jordan block of dimension m > 1. This Jordan block corresponds in the
fundamental system to an unstable solution of the form
Å ã
λt 1 2 1 m−1
e 1 + t + t + ··· + t .
2 (m − 1)!
If all eigenvalues with Re λ = 0, i.e. λ = iω have equal algebraic and geometric
multiplicities, the according Jordan blocks are all of dimension 1 and the corre-
sponding fundamental solutions are given by eλt = eiωt = cos ωt + i sin ωt. Those
solutions are stable but not asymptotically stable.
69 CHAPTER 5. STABILITY
β < Re λ < α .
Å ã
λ 0
B R(λ, µ) = with two real eigenvalues.
0 µ
ã Å
λ 1
B Ra (λ) = with one eigenvalue with simple geometric multiplicity.
0 λ
Å ã
α ω
B K(α, ω) = with a pair of conjugate eigenvalues λ = α ± iω.
−ω α
0
y
0 0
y
−1
−0.5
−1
−2 −1
−2
−1.5
−3 −1.5 −1 −0.5 0 0.5 1 1.5 2
−3 −3 −2 −1 0 1 2 3
x
−3 −2 −1 0 1 2 3 x
x
3 0.8
0.6
2
0.4
1
0.2
y
0
y
0
−1 −0.2
−2 −0.4
−3 −0.6
−0.8
−4 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8
−4 −3 −2 −1 0 1 2 3 4 x
x
in I. Then
Φ(t) ≤ αeβt
holds for all t ∈ I.
Rt
Proof. We define ψ = α + β 0 Φ(τ ) dτ . Then ψ 0 = βΦ and due to Φ ≤ ψ we get
ψ 0 ≤ βψ and ψ(0) = α. Let w be the solution of w0 = βw, w(0) = α, the w is an
upper function to ψ and hence Φ ≤ ψ ≤ w = αeβt .
The next theorem renders information on the stability of ODEs with linear prin-
ciple part
u0 = Au + g(t, u) . (5.11)
Here we assume, that for small u the function g(t, u) is small compared to u.
|g(t, z)|
lim =0
|z|→0 |z|
Re λ < 0 ∀λ ∈ σ(A) .
for |u| ≤ δ. Let u be the solution of (5.11) for |u0 | < ε and define Φ = |u| eβt .
Then |u| ≤ δ leads to
β t
Z
Φ(t) ≤ cε + Φ(s) ds .
2 0
Applying Gronwall yields Φ(t) ≤ cεeβt/2 and hence |u(t)| ≤ cεe−βt/2 ≤ δ.
The above theorem is typically applied when analyzing the stability of autonomous
systems
u0 = f (u); .
Definition 5.3 (Stationary point). Let f : Rn → Rn be continuously diff’able
and consider the autonomous system u0 = f (u). We call u∗ ∈ Rn a singular or
stationary point or equilibrium of the system, if f (u∗ ) = 0.
Remark 5.1. Let f : Rn → Rn be continuously diff’able and let u∗ be a stationary
point of u0 = f (u). Then u(t) ≡ u∗ is the unique solution of the IVP
u0 = f (u), u(0) = u∗ .
where g(u) = O(|u − u∗ |2 ). This linearization leads to the following ODE with
linear principle part
u0 = u (1 − u) = f (u)
with the two equilibria u0 = 0 and u1 = 1. The derivative of the right hand side
is given by Df (u) = 1 − 2u. For the stability of these two we get
Example 5.6. We analyze the stability of the stationary solution u ≡ 0 for the
problem
u0 = βu3 := f (u) ,
where β ∈ R is an arbitrary parameter. Linearizing around u = 0 leads to the
trivial ODE u0 = 0 with the constant and stable solution u(t) = u0 . This may lead
us to assume, that u = 0 is also a stable equilibrium for the nonlinear problem.
But: Consider the exact solution of the ODE obtained by separation of variables
u0
u(t) = p .
1 − 2u20 βt
73 CHAPTER 5. STABILITY
This shows, that the analogy to the linearization is not valid. It holds that for
> 0 :
limt→1/(2u0 β) |u(t)| = +∞ unstable
β =0 : u(t) ≡ u0 stable
<0 : limt→∞ u(t) = 0 asymptotically stable .
The stability (but not asymptotic stability) of the linearization does not imply
the stability of the nonlinear problem.
Example 5.8 (Predator–Prey model with Allee effect). We consider the modified
predator–prey model
where 0 < ξ, η < 1 and α > 0. This model shows four equilibria
(x, y) = (0, 0), (x, y) = (ξ, 0) (x, y) = (1, 0), (x, y) = (η, y ∗ )
5.3. LYAPUNOV FUNCTIONS 74
B E(u, u0 ) ≥ 0
B E(u, u0 ) = 0 iff u ≡ 0
damping , i.e. k > 0, then dtd E(u, u0 ) < 0 along trajectories. Hence, the energy
is decreasing along solutions.
Can this energy help to decide, whether a solution is stable or not? To answer
this question, we consider a real autonomous system of the form
u0 = f (u) , (5.12)
V 0 := (grad V, f ) = f1 · ∂1 V + · · · + fn · ∂n V
≤0 in D .
Remark 5.4. The energy E(u, u0 ) = u02 /2 + P (u) is a Lyapunov–function for the
nonlinear oscillator u00 + ku0 + p(u) = 0.
Often, for ODEs describing physical systems, Lyapunov functions can be con-
structed when looking for energies of the system. However, there is no general
rule or recipe —at least to my knowledge— on how to construct a Lyapunov
function for a given ODE.
Why are Lyapunov–functions important for stability analysis? Due to the fol-
lowing
Theorem 5.10 (Stability Theorem). Let D ⊂ Rn be open and 0 ∈ D, let f
be Lipschitz–continuous and f (0) = 0 and let V be a Lyapunov–function for
u0 = f (u). If
5.3. LYAPUNOV FUNCTIONS 76
Ad (2). Let u(t) be the solution of (5.12) as in part (1) of the proof. Then, there
exists limt→∞ |u(t)| = β ≤ γ. We will show, that
¶ β = 0. ©
Assume the contradiction β 6= 0. Let M = x ∈ Bε (0) : β ≤ V (x) ≤ γ . The
set M is a compact (closed and bounded) subset of Bε (0) \ {0} and hence the
maximum of V 0 exists on M , i.e. maxx∈M V 0 (x) = −α < 0. The solution tra-
jectory u is contained in M and Φ0 (t) = dt d
V (u(t)) < −α. However, this is a
contradiction to β ≤ V (x) in M .
Therefore limt→∞ Φ(t) = 0, and hence β = limt→∞ |u(t)| = 0 as well. Now, let
0 < ε0 < ε. Then minε0 ≤|x|≤ε V (x) = δ and |u(t)| < ε0 for Φ(t) < δ.
Ad (3). we have b |u(t)|β ≤ V (u(t)) =: Φ(t) and Φ0 (t) ≤ −αΦ(t). Hence we arrive
at Φ(t) ≤ Φ(0)e−αt and
Å ã1/β
Φ(0) 1/β
|u(t)| ≤ e−αt ≤ ce−γt .
b
d
E = −ku02 (t) ≤ 0 .
dt
Hence, the zero–solution is stabil.
In case of k > 0 it is even asymptotically stable; his does not directly follow from
the previous theorem.
Proof. Let u(t) by the solution of (5.12) for u(0) = xk , hence Φ(0) := V (u(0)) =
α > 0.
Ad (1). Let ε > 0 such that V < α in Bε (0). Since Φ0 ≥ 0 we obtain α = Φ(0) ≤
Φ(t) and therefore |u(t)| > ε. Let r > ε, such that Br (0) ⊂ D. For ε ≤ |x| < r we
have that V 0 (x) ≥ β > 0, hence Φ0 ≥ β and Φ ≥ α + βt as long as u(t) ∈ Br (0).
Since V is bounded in Br , the solution trajectory u(t) has to leave the ball Br in
finite time.
Ad (2). Let Φ(t) := V (u(t)). Due to assumption Φ0 ≥ λΦ, and therefore Φ(t) ≥
αeλt . Hence we obtaind |u(t)| > r for large times t similar to the proof of part (1).
Since xk converges to zero, there exist solutions u for arbitrary small initial values
xk , such that |u(t)| > r in finite time t.
This short introduction the Lyapunov–functions is just the starting point for a
deeper look into stability theory.
Chapter 6
∂ |α| u
Dα u := α1 α
= ∂xα11 . . . ∂xαnn u
∂x1 . . . ∂xnn
78
79 CHAPTER 6. PARTIAL DIFFERENTIAL EQUATIONS
ut + aux = 0 .
∂u ∂u
Here, ut = ∂t u = and ux = ∂x u = denote the partial derivative of u with
∂t ∂x
respect to time t and space x. The linear advection equation is a first order PDE.
It is easy to check, that for a given initial profile
u(t = 0, x) = u0 (x)
u(t, x) = u0 (x − at) .
ut + f (u)x = 0
For a scalar conservation law ut + f (u)x = 0 with density u and flux f , we call
Z b
M[a,b] (t) := u(t, x) dx
a
the mass inside the interval or domain [a, b]. The mass inside an interval changes
in time according to the equation
d b
Z Z b Z b
d ∂u ∂f (u)
M[a,b] = u(t, x) dx = dx = −
dt dt a a ∂t a ∂x
= f (u(t, a)) − f (u(t, b)) .
Here f (u(t, a)) denotes the influx into the interval [a, b] at x = a and −f (u(t, b))
denotes the outflux out of [a, b] through the boundary at x = b.
6.1. DEFINITION OF PDES 80
Proof.
Z Z
d ∂u ∂f (u)
M (t) = dx = − dx = lim f (u(t, −R)) − f (u(t, R)) = 0 .
dt R ∂t R ∂x R→∞
If all vehicles travel, independent of the density, with the same velocity a, then
f = au and we recover the linear advection equation
∂t u + a∂x u = 0 .
More realistic is the following model: At low density vehicles travel faster than
umax − u
at high density, i.e. v = vmax · . Then the flux is given by
umax
f = f (u) = βu · (umax − u)
∂t u + β · ∂x (u (umax − u)) = 0 .
If we scale the car density u with the maximal density umax , i.e. u = umax ũ, the
space coordinate x = Lx̃ and time t = T t̃, we obtain
vmax T
∂t̃ ũ + ∂x̃ (ũ(1 − ũ)) = 0 .
L
Choosing the time scale T = L/vmax leads to the dimensionless equation (after
dropping the tilde)
∂t u + ∂x u(1 − u) = 0 .
81 CHAPTER 6. PARTIAL DIFFERENTIAL EQUATIONS
ha(y, u) , grad ui − b = 1 · ut + a · ux = 0 .
The PDEs presented so far are of first order. In applications also second order
equations play an important role. Here are three classical examples.
−∆u = 0
βu + ∂n u = g .
Example 6.4 (Poisson equation on the unit circle). Let Ω = B1 (0) ⊂ R2 denote
the unit circle and consider the Poisson problem
∆ u = 1 in Ω
u = 1 on ∂Ω.
1 x2 + y 2 + 3
u(x, y) = (r2 + 3) = .
4 4
Definition 6.6 (Parabolic PDE; Diffusion equation). Let Ω ⊂ Rn be a domain
with boundary Γ = ∂Ω. Let T > 0. Let α > 0 and f : [0, T ) × Ω → R be
continuous. We call the PDE
ut − α ∆ u = f
diffusion (heat) equation. Its solution u(t, x) depends on the time variable t ∈
[0, T ] ⊂ R+ and the spatial variables x ∈ Ω ⊂ Rn . Note, that the Laplacian is
taken with respect to the spatial variables x. To solve the diffusion equation, we
have to prescribe both
The heat equation describes the evolution of a temperature profile u(t, x) over
time t ∈ [0, T ). At the starting time t = 0, we have given an initial temperature
distribution u0 (x) and at the boundary of the domain Ω we have either a fixed
temperature u = g (Dirichlet condition), a fixed heat flux −α∂n u = g (Neumann
condition) or a heat flux, that is proportional to the temperature, e.g. Newton’s
cooling law −α∂n u = k(u−u∞ ). The constant α > 0 denotes the heat conductivity
of the material and k > 0 is the heat transfer coefficient through the boundary.
83 CHAPTER 6. PARTIAL DIFFERENTIAL EQUATIONS
Example 6.5 (Heat equation). Let Ω = [0, 2π] and consider the heat equation
ut − uxx = 0 in R+ × Ω
u(0, x) = sin x
For the above examples, the solution of the PDEs can be found by educated
guesses or try–and–error. For first order PDEs there exists a systematic approach
discussed next.
ut + f (u)x = b(t, x, u)
both supplemented by an initial condition u(0, x) = u0 (x) can be written in
quasi–linear from as
ut + a(t, x, u) · ux = b(t, x, u), u(0, x) = u0 (x) .
where a(t, x, u) = f 0 (u). The solution u = u(t, x) can be viewed as a surface over
the two–dimensional tx–plane.
6.2. METHOD OF CHARACTERISTICS 84
Definition 6.8. The initial value problem (IVP) for a quasi–linear PDE is given
by:
Find a (classical) solution of
∂t u + a(t, x, u) · ux = b(t, x, u)
where the solution u(t, x) satisfies
u(0, x) = u0 (x) .
Let us consider the following nonlinear scalar conservation law with flux f (u) =
u2 /2 Å 2ã
u
ut + = 0, u(0, x) = u0 (x) .
2 x
This equations is called Burger’s equation. Using the method of characteristics
we obtain x0 = u0 (x0 ) with initial condition x(0) = x0 . The solution reads as
x = u0 (x0 )t + x0 which has to be solved for x0 .
Example 6.8 (Shock). Considering the initial condition
1 :
x<0
u0 (x) = 1 − x : 0 ≤ x ≤ 1
0: x>1
If t < 1, the characteristic equations are solvable and we obtain the classical
solution
1 :
x<t
1−x
u(t, x) = 1−t : 0 ≤ t ≤ x ≤ 1
0: x>1
But for t ≥ 1, the characteristic equations are not solvable anymore; the charac-
teristic ground curves intersect!
What happens? The solution steepens up and finally shows a jump discontinuity.
This is called a shock wave. Does there exist any concept of a solution for t > 1?
Example 6.9 (Rarefaction wave). Now, let’s consider Burger’s equation with a
different, increasing initial condition. If u0 is smooth, the characteristics cover
the whole (t, x)–plane; the characteristic system is solvable for all t ≥ 0 and we
obtain a classical solution for all times t. But if the initial solution has a jump,
e.g.
®
0: x<0
u0 (x) =
1: x≥0
But what happens in the domain 0 < x < t, where we have no characteristic
ground curves at all? This phenomenon is called a rarefaction wave.
But this is just the starting point for the course on Numerical Methods for Partial
Differential Equations.
Appendix A
Preliminaries
In this section we recall some results from Linear Algebra without proving them.
Av = λv .
The set Eigλ (A) := {v : Av = λv} of all eigenvectors to the eigenvalue λ is called
the eigenspace to the eigenvalue λ. The eigenspace Eigλ (A) is a vector space.
Its dimension dim Eigλ (A) is called geometric multiplicity of the eigenvalue λ.
The set σ(A) = {λ ∈ C : λ is an eigenvalue of A} consisting of all eigenvalues of
A is called the spectrum of A. The largest eigenvalue (by absolute value) defines
the spectral radius ρ(A) := max {|λ| : λ ∈ σ(A)}.
det(A − λE) = 0 ,
(A − λE)v = 0 .
88
89 APPENDIX A. PRELIMINARIES
then
P νk is called the algebraic multiplicity of the eigenvalue λk . It holds that
νk = n.
Let λ 6= µ be two different eigenvalues of A to eigenvectors v and w. Then v
and w are linear independent.
A = Q · D · Q−1 .
Q = (v1 | · · · | vn ) ∈ Cn×n .
Due to the linear independence of the columns, the matrix Q is regular, i.e. in-
vertible. The diagonal matrix D is defined by the eigenvalues
D = diag (λ1 , . . . , λn ) .
Then the eigenvalue equations Avk = λk vk hold for each component, or in matrix
form
AQ = QD .
has a double eigenvalue λ = 0 but only (up to linear multiples) one eigenvector
T
v = 1 0 . Hence the matrix A is not diagonalizable. However, one can show
that the so–called Jordan normalform exists.
Theorem A.3 (Jordan Normalform). For every matrix A ∈ Cn×n there exist
Q ∈ Cn×n , det Q 6= 0, such that
á ë
λk 1 0
.. ..
. .
Q−1 AQ = diag (J1 , . . . , Jn ) where Jk = .. .
. 1
0 λk
The matrix Jk is called Jordan–block to the eigenvalue λk .
Theorem A.4 (Further Results). It holds that
hence
n
X f (k) (x0 )
Tn (x) = αk (x − x0 )k where αk = .
k=0
k!
is called remainder. For all x ∈ Df the remainder can be expressed in the La-
grange form
f (n+1) (x̃)
Rn (x) = (x − x0 )n+1
(n + 1)!
for suitable x̃ ∈ [x, x0 ] or resp. x̃ ∈ [x0 , x].
Remark A.3. Some remarks to Taylor’s Theorem.
(1) In the special case of n = 0 we obtain the mean value theorem from the
Lagrange remainder. The result on the remainder itself can be derived from
Rolle’s theorem similarly to the mean value theorem .
∂x21 f
á ë
∂ x1 x2 f . . . ∂ x1 xn f
∂x2 x1 f ∂x22 f . . . ∂x1 xn f
(Hf (x0 ))ij = ∂xi xj f (x0 ) , i.e. Hf = .. ... .. .
. .
2
∂xn x1 f ∂xn x2 f . . . ∂xn f
the remainder. For all x ∈ Ω the remainder can be written in Lagrange form
X ∂α f (x̃) Ä ä
Rk (x) = (x − x0 )α = O kx − x0 kk+1
α!
|α|=k+1
Remark A.5. In the special case of f : R2 → R the linear and quadratic Taylor–
polynomials around (x0 , y0 ) are given by
and
1 2
T2 (x, y) = T1 (x, y) + ∂ f (x0 , y0 ) · (x − x0 )2
2 x
+2 ∂xy f (x0 , y0 ) · (x − x0 )(y − y0 ) + ∂y2 f (x0 , y0 ) · (y − y0 )2
1
= f (x0 ) + hgrad f (x0 ) , x − x0 i + (x − x0 )T Hf (x0 ) · (x − x0 ) .
2
The linear Taylor–polynomial T1 equals to the tangential plane to the graph of
f at (x0 , y0 ).