Mini-Course On Geometric Numerical Integration: David Cohen Umeå University and University of Innsbruck
Mini-Course On Geometric Numerical Integration: David Cohen Umeå University and University of Innsbruck
David Cohen
Umeå University and University of Innsbruck
B david.cohen@umu.se
m http://snovit.math.umu.se/~david/
Contents
1 Background: Ordinary differential equations and first numerical schemes 2
1.1 Problem setting and first examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.2 Euler’s method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.3 Order conditions and Runge-Kutta methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1
Mini-course on GNI February 2016
David Cohen Fundação Getulio Vargas
References 28
Definition 1.1. Let n ∈ N, y 0 ∈ Rn and f : R × Rn → Rn (sufficiently differentiable). One seek for a function
y := y(x) = (y 1 (x), . . . , y n (x))T ∈ Rn , x 0 ≤ x ≤ x̄, which solves the following (system) of ordinary differential
equations (ODE) (also called initial value problem (IVP))
{
y ′ (x) = f (x, y(x))
(1)
y(x 0 ) = y 0 .
Observe that the function f and the initial values y 0 are given.
In what follows, we will always assume that (1) has a unique solution y(x).
Example 1.1. Let us first look at a scalar differential equation and then at a system of differential equations.
q Scalar case (n = 1). Population dynamics: Let y(t ) be the number of individuals of a given popula-
tion at time t .
In biology, one often models the growth of a population (of bacteria for example) with the differential
equation {
y ′ (t ) = a y(t ),
y(0) = y 0 ,
2
Mini-course on GNI February 2016
David Cohen Fundação Getulio Vargas
8
exp(t)
−2exp(t)
6 exp(−3t)
exp(2t)
4 exp(0.1t)
−2
−4
−6
0 0.2 0.4 0.6 0.8 1
Time
where the growth factor a ∈ R is given. The exact solution to the above problem reads
y(t ) = eat y 0 .
In Figure 1, one can observe an exponential growth of the population (or a decrease in the case a < 0).
We also need the initial values y 1 (0) und y 2 (0) and the solution to our ODE is now a vector
( )
y 1 (t )
y: t → .
y 2 (t )
Observe that, in general, there are no explicit representation for the above solution.
Figure 2 shows an example taken from http://www.wikipedia.org.
3
Mini-course on GNI February 2016
David Cohen Fundação Getulio Vargas
Figure 2: Progression of the two species (baboons vs cheetahs) in time (courtesy of http://www.
wikipedia.org).
x̄ − x 0
h := >0
N
and consider a partition of the interval [x 0 , x̄] as follows
where
x i +1 − x i = h for i = 0, 1, 2, . . . , N .
For h small enough, we can approximate the derivative of the exact solution at x 0
y(x 1 ) = y(x 0 + h) ≈ y 0 +h f (x 0 , y 0 ).
| {z } |{z} | {z }
unknown known known
This is precisely the first two terms in the Taylor expansion of the exact solution y(x).
A repetition of this procedure gives Euler’s method (1768):
y k+1 = y k + h f (x k , y k ), k = 0, 1, . . . .
Here, y k is a numerical approximation of the exact solution y(x k ) at x k : y k ≈ y(x k ) (see Figure 3).
Observe that y k depends on the time step h. We could thus write y k = y h (x k ).
4
Mini-course on GNI February 2016
David Cohen Fundação Getulio Vargas
y1 y2
y3
y0 y(x)
y(x1) y(x2)
y(x3)
x0 x1 x2 x
x3
−0.2
−0.4
−0.6
−0.8
−1
−1.2 h=0.5
h=0.1
h=0.01
−1.4
0 2 4 6 8 10
Figure 4: Euler’s method with time steps h = 0.5; 0.1; 0.01. The straight line is the exact solution.
Figure 4 shows the exact solution, y(t) = − ln(cos(x) + 2), and the numerical solutions obtained with Euler’s
method and the time steps h = 0.5, h = 0.1 and h = 0.01. We can observe that, the smaller h is, the better the
numerical approximation is!
by taking ϕ(x k , y k , h) = f (x k , y k ), see above. Here, the term “one-step method” means that the numerical
solution y k+1 only depends on the earlier numerical approximation y k and not on the previous approxi-
mations y k−1 , y k−2 , etc.. We now define the order of a one-step method.
5
Mini-course on GNI February 2016
David Cohen Fundação Getulio Vargas
Definition 1.2. We say that a one-step method y k+1 = y k + hϕ(x k , y k , h) has the order of convergence p, if
the local error (for all nice enough problems (1)) verifies
y(x 0 + h) − y 1 = O (h p+1 ), h → 0.
Here, we recall that g (h) = O (h p+1 ), h → 0 if and only if there exists a positive constant C such that |g (h)| ≤
C h p+1 for all h small enough.
Observe the following:
1. The local error is the error of the method after just one step. In general, and for nice enough prob-
lems, one can show that if a numerical method has order p, then the global error y(x N ) − y N is of
the size O (h p ). Thus: the larger p is, the more precise the numerical method is.
2. We now compute the order p for Euler’s method. A Taylor expansion gives
h2
y(x 0 + h) − y 1 = y(x 0 ) + y ′ (x 0 ) h + y ′′ (x 0 ) + O (h 3 ) − y 0 − h f (x 0 , y 0 )
| {z } 2
= f (x 0 ,y 0 )
y ′′ (x 0 ) 2
= h + O (h 3 ) = O (h 2 ), h → 0.
2
Thus, the order of Euler’s method is p = 1.
A general framework for one-step numerical methods for (1) is given by the Runge-Kutta methods.
i∑
−1
Definition 1.3. Let s ≥ 1 be an integer, b i , a i j ∈ R for j = 1, . . . , i − 1 and i = 1, . . . , s, c 1 = 0 and c i := ai j .
j =1
The one-step numerical method given by
k1 = f (x 0 , y 0 )
k 2 = f (x 0 + c 2 h, y 0 + ha 21 k 1 )
...
∑
s−1
ks = f (x 0 + c s h, y 0 + h as j k j )
j =1
∑
s
= y0 + h
y1 bjkj
j =1
is called an s-stages explicit Runge-Kutta method. Here, y 1 ≈ y(h) using only the present value y 0 . This
one-step approximation is obtained using linear combination of the k j . The quantities k j can be seen as
estimated slopes of the solution to our differential equation (1), see Figure 5. The needed coefficients a i j
and b j are usually arranged in a Butcher tableau notation:
0
c2 a 21
c3 a 31 a 32
.. .. .. ..
. . . .
cs a s1 a s2 ... a s,s−1
b1 b2 ... b s−1 bs
Example 1.3. The tableau for Euler’s method y 1 = y 0 + h f (x 0 , y 0 ) reads
0
1
See the homework for a further example.
6
Mini-course on GNI February 2016
David Cohen Fundação Getulio Vargas
y n+1 = y n + h f (y n ).
y n+1 = y n + h f (y n+1 ).
Here, one has to solve a nonlinear system of equations in order to find y n+1 (see the homework). This
method has order p = 1.
Definition 2.3. The implicit midpoint rule reads
( y n + y n+1 )
y n+1 = y n + h f .
2
This implicit numerical method has order of convergence p = 2 and is symplectic (see below).
Definition 2.4. For partitioned systems (see the predator-pray model and below)
u̇ = a(u, v)
v̇ = b(u, v),
du
where u := u(t ), v := v(t ) are independent variables and u̇ := , the partitioned Euler method reads
dt
u n+1 = u n + ha(u n , v n+1 ) u n+1 = u n + ha(u n+1 , v n )
or
v n+1 = v n + hb(u n , v n+1 ), v n+1 = v n + hb(u n+1 , v n ).
7
Mini-course on GNI February 2016
David Cohen Fundação Getulio Vargas
This numerical method has order p = 1 and is symplectic. This scheme is also called symplectic Euler
method in connection with Hamiltonian systems, see below.
Definition 2.5. For problems of the form
ṗ = f (q)
q̇ = p
q n+1 − 2q n + q n−1 = h 2 f (q n ).
In this form, this numerical method is a two-step numerical scheme and has order 2. Furthermore, this
scheme is symplectic.
Let us now use the above methods on the following problems.
u̇ = u · (v − 2)
v̇ = v · (1 − u).
ṗ = − sin(q)
q̇ = p or q̈ = − sin(q)
8
Mini-course on GNI February 2016
David Cohen Fundação Getulio Vargas
−6
2
1 −7
0 −8
0 1 2 3 4 5 6 7 0 5 10 15 20
u Time
Figure 6: Numerical solutions for the Lotka-Volterra problem: Phase plane (left plot) and invariant (right
plot).
2 2
q H
1 1
0 0
-1 -1
-2 -2
0 10 20 30 40 50 0 50 100 150 200
Time Time
Figure 7: Numerical solutions for the mathematical pendulum: Position (left plot) and total energy (right
plot).
9
Mini-course on GNI February 2016
David Cohen Fundação Getulio Vargas
30 30
20 20
2144 2268
10 10
0 0
−10 −10
−20 −20
−30 −30
30 30
20 20
30 30
10 10
20 20
0 10 0 10
−10 0 −10 0
−10 −10
−20 −20
−20 −20
−30 −30 −30 −30
−3
x 10
1 2
0.5 0
0 −2
1980 2000 2020 2040 2060 2080 2100 2120 2140 2160 1950 2000 2050 2100 2150 2200 2250 2300
Energy error Energy error
Figure 9: Numerical solutions for the outer solar system (orbits and total energy): explicit Euler (left plot)
and symplectic Euler (right plot).
10
Mini-course on GNI February 2016
David Cohen Fundação Getulio Vargas
∂H ∂H
ṗ i = − (p, q), q̇ i = (p, q), i = 1, . . . , d . (2)
∂q i ∂p i
Here, in the example of mechanical systems, one can think of the Hamiltonian H as the total energy of
the problem, q i are the position coordinates and p i the momenta.
Example 3.1. The ODE for the mathematical pendulum is a Hamiltonian system. Here, the position coor-
dinate q(t ) denotes the angle between the rod and the vertical at time t . Further, the Hamiltonian is given
1
by H (p, q) = p 2 − cos(q).
2
The equations describing the motion of the planets from the above section are also Hamiltonian sys-
tems. See the homework for further examples.
We first show that the total energy of a Hamiltonian problem (2) is conserved
along the exact solution of the problem. Indeed, taking the time derivative of the Hamiltonian function,
one gets
d( ) ∂H ∂H ∂H ( ∂H )T ∂H ( ∂H )T
H (p(t ), q(t )) = ṗ + q̇ = − + = 0.
dt ∂p ∂q ∂p ∂q ∂q ∂p
Here, we see that the the total energy along the exact solution of a Hamiltonian system (2) is conserved.
It is thus natural to develop numerical methods that share the same property as the exact solution, i. e.
energy-preserving numerical methods (see the homework).
This is the main philosophy behind geometric numerical integration: derive numerical methods
that share the very same geometric properties as the exact solution of a given differential equation!
11
Mini-course on GNI February 2016
David Cohen Fundação Getulio Vargas
3.2.2 Symplecticity
More important than the above property of energy conservation is the property of symplecticity of Hamil-
tonian systems.
( p) ( p)
2d ζ η
Let us first consider the parallelogram P ⊂ R spanned by the vectors ζ = q and η = q and
ζ η
( )
0 I
further the application (bilinear form) ω : R2d × R2d → R with J = .
−I 0
(ζ, η) 7→ ζT J η
( )
p q q p ζp ηp
Example 3.2. In the case d = 1, one has ω(ζ, η) = ζ η − ζ η = det q . This is the oriented area of
ζ ηq
the parallelogram P !
In the case d > 1 we consider the sums of oriented areas of projections of P onto the coordinate plane
(p i , q i ):
( p p)
T
∑ d
ζi η i ∑ d
p q q p
ω(ζ, η) = ζ J η = det q q = (ζi η i − ζi η i ).
i =1
ζ i
η i i =1
One now asks if a map could preserve the (sum of) oriented area(s).
Definition 3.2. A linear map A : R2d → R2d is called symplectic if ω(Aζ, Aη) = ω(ζ, η) for all ζ, η ∈ R2d or
equivalently A T J A = J .
Further, a differentiable map g : U ⊂ R2d → R2d is called symplectic if the map g ′ (p, q) is a symplectic
linear map for all (p, q) ∈ U : g ′ (p, q)T J g ′ (p, q) = J for all (p, q) ∈ U .
Below, we will see that the solution to the Hamiltonian problem (4) is a symplectic map!
We are thus interested in developing numerical methods which are also symplectic.
Theorem 3.1 (Poincaré (1899)). For every fixed time t , the flow φt (i. e. the mapping that advances the
solution by time t : φt (p 0 , q 0 ) = (p(t , p 0 , q 0 ), q(t , p 0 , q 0 ))) of the Hamiltonian problem (4) is a symplectic
transformation.
This result is illustrated in Figure 10, where the level curves of the Hamiltonian function of the pen-
dulum are displayed together with illustrations of the area preservation of the flow φt .
Next, we have the following result
Theorem 3.2. The flow φt of a differential equation ẏ = f (y) is a symplectic transformation for all time t
if and only if locally f (y) = J −1 ∇H (y) for some function H (y).
12
Mini-course on GNI February 2016
David Cohen Fundação Getulio Vargas
Figure 10: Area preservation of the flow of Hamiltonian systems (courtesy of E. Hairer).
A numerical one-step method y n+1 = Φh (y n ) is called symplectic if, when applied to a Hamiltonian sys-
tem, the discrete flow y 7→ Φh (y) is a symplectic transformation for all sufficiently small step sizes h.
For the numerical methods we have the following results
Theorem 3.3 (de Vogelaere (1956) and others). The symplectic Euler method defines a symplectic trans-
formation
( ) ( )
pn p n+1
Φh : 7→ .
qn q n+1
The same holds for the Störmer-Verlet method and the implicit midpoint rule.
These results are illustrated in Figure 11, where one observes that the explicit Euler, the implicit Euler,
and the second order Runge-Kutta methods are not symplectic, i. e. these numerical methods are not area
preserving.
BGe and Marsden (1988) proved that, for Hamiltonian system without further conserved quantities,
a symplectic method which exactly preserves H has to be a re-parametrisation of the exact flow.
Furthermore, Chartier, Faou, Murua (2005) showed that the only symplectic method (as B-series) that
conserves the Hamiltonian for arbitrary H (y) is the exact flow of the differential equation. B
Finally, using the idea of backward error analysis, one can explain the excellent long-time behaviour of
symplectic methods when applied to Hamiltonian problems.
Theorem 3.4 (Benettin, Giorgilli and others (1994)). Consider the Hamiltonian system (4) with analytic
H . Apply a symplectic method of order r with stepsize h (small enough). If the numerical solution stays in
a compact set, then the numerical solution given by this symplectic scheme satisfies
H (p n , q n ) = H (p 0 , q 0 ) + O (h r ) for nh ≤ eγ/(2h) ,
13
Mini-course on GNI February 2016
David Cohen Fundação Getulio Vargas
Figure 11: Area preservation of numerical methods for the pendulum (courtesy of E. Hairer).
where γ is a positive constant of moderate size. Recall r = 1 for the symplectic Euler method and r = 2
for the Störmer-Verlet or midpoint schemes. This explains the excellent long-time behaviour of symplectic
methods when applied to Hamiltonian systems (see the plots in Figures 7 and 9 from the previous section).
The proofs of these (nontrivial) results can be found in, for example, [12]. Let us however give the
main steps for the proofs:
1. Modified differential equation. Consider an ODE ẏ = f (y) together with a numerical method
y n+1 = Φh (y n ). The idea of backward error analysis (BEA) is to search for a modified differential
equation yė = f h ( ye) of the form
such that
!
y n = ye(nh)
and to study the difference between f and f h , see Figure 12.
One finds the coefficients f 2 , f 3 , . . . of the modified differential equation using a Taylor series:
h2
ye(h) = ye(0 + h) = ye(0) + h y(0)
ė + ë + . . .
y(0)
2
( )
= y 0 + h f h (y 0 ) + . . . = y 0 + h f (y 0 ) + h f 2 (y 0 ) + h 2 f 3 (y 0 ) + . . . + . . .
!
= y 1 = y 0 + h f (y 0 ) + h 2 d 2 (y 0 ) + h 3 d 3 (y 0 ) + . . . the expansion of the numerical solution.
Observe, that the coefficients d j are given by the numerical scheme. For example, d j = 0 for Euler’s
method.
14
Mini-course on GNI February 2016
David Cohen Fundação Getulio Vargas
One then compares the coefficients in front of h and express f j thanks to the (given) coefficients of
the numerical scheme d j :
h0 : y0 = y0
h1 : f (y 0 ) = f (y 0 )
1
h2 : f 2 (y) + f ′ (y) f (y) = d 2 (y)
2
1 ( ′′ ) 1( )
h3 : f 3 (y) + f ( f , f )(y) + f ′ f ′ f (y) + f ′ f 2 (y) + f 2′ f (y) = d 3 (y)
3! 2
etc.
h2 4 h3 5
yė = f h ( ye) = ye2 − h ye3 + 3 ye − 8 ye ± . . .
2 3
and the exact solution of the modified differential equation yė = f h ( ye) is the numerical solution given
by Euler’s method!
3. Some estimations. Using the analyticity of the function f and further technical assumptions, one
next estimates the coefficients d j (y) and the coefficients f j (y) of the modified differential equation.
One has to truncate the modified equation at an appropriate index N and obtain an estimate for
the local error
∗
∥Φh (y 0 ) − φN ,h (y 0 )∥ ≤ C e−h /h for h ≤ h ∗ ,
15
Mini-course on GNI February 2016
David Cohen Fundação Getulio Vargas
4. Near conservation of the total energy. Consider a Hamiltonian problem with a symplectic numer-
ical method of order p. We know that the modified equation is Hamiltonian with
For small enough step sizes h and an appropriate truncation index N , one can show that
∗
H e (y 0 ) + O (e−h
e (y n ) = H /(2h)
)
and prove near conservation of the energy by a symplectic numerical method of order p:
H (y n ) = H (y 0 ) + O (h p )
∗
for exponential long time nh ≤ T = eh /(2h)
!
where ( )
0 0
Ω=
0 ωI
with ω ≫ 1, x := (x slow , x fast ) = (x 0 , x 1 ) ∈ Rn×m , the nonlinearity g comes from a smooth potential U , and
we assume finite initial energy
1 1
∥ẋ(0)∥2 + ∥Ωx(0)∥2 ≤ E . (6)
2 2
We want to use a numerical method with large step size, so that the product h · ω is not small and thus
the BEA from the previous section cannot be applied in this situation!
A typical model problem is offered by the (modified) Fermi-Pasta-Ulam problem (FPU).
Example 4.1. The FPU problem consists of a chain of alternating stiff (linear) and soft (nonlinear) springs
as described in Figure 13.
After a change of coordinates, one gets the Hamiltonian
1 T 1
H (x, y) = y y + x T Ω2 x +U (x)
2 2
which gives a differential equation of the form (5).
16
Mini-course on GNI February 2016
David Cohen Fundação Getulio Vargas
q1 q2 q3
stiff soft
harmonic nonlinear
H
I2
I
1 .4
I1
I3
I2
I3 .2
I1
0 46 48
50 100 150
Figure 14: Energy exchange in the FPU problem (H =total energy, I 1 , I 2 , I 3 components of the oscillatory
energy I ).
I (x, y) := I 1 + I 2 + . . . + I m
remains almost constant for very long time along the exact solution of the FPU problem!
We want to understand this phenomena. An explanation will be given in the two sections.
Let us investigate what happen for the numerical solutions given by classical methods. To do so, we
consider the above FPU problem with ω = 50 and 3 stiff springs. In Figure 15, one can observe that the
classical numerical schemes (implicit midpoint rule, classical RK4, Störmer-Verlet) do not perform well or
ar not very efficient (the midpoint rule needs the solution to a nonlinear system at each time step)!
How do we get better numerical integrators for highly oscillatory problems?
The next subsections will provide an answer to this question.
Figure 15: FPU problem: Numerical solutions for various integrators (courtesy of E. Hairer).
17
Mini-course on GNI February 2016
David Cohen Fundação Getulio Vargas
Discretising the above integrals (in various ways) motivates the following definition
Definition 4.1. The family of trigonometric methods reads
1
x n+1 = cos(hΩ)x n + Ω−1 sin(hΩ)ẋ n + h 2 Ψg n (7)
2
1
ẋ n+1 = −Ω sin(hΩ)x n + cos(hΩ)ẋ n + h(Ψ0 g n + Ψ1 g n+1 ), (8)
2
where g n := g (Φx n ), Φ = Φ(hΩ), Ψ = Ψ(hΩ), Ψ1 = Ψ1 (hΩ), Ψ2 = Ψ2 (hΩ) are filter functions. The purpose
of these filter functions is to filter out numerical resonances and the choice of these filter functions is not an
easy task. Let us give two examples.
sin(ζ)
Example 4.2. The choices Ψ(ζ) = sinc(ζ) := ζ , Φ(ζ) = 1, Ψ0 (ζ) = cos(ζ), Ψ1 (ζ) = 1 was proposed by Deu-
flhard in 1979.
The choices Ψ(ζ) = sinc3 (ζ), Φ(ζ) = sinc(ζ), Ψ0 (ζ) = cos(ζ) sinc2 (ζ), Ψ1 (ζ) = sinc2 (ζ) was proposed by
Grimm and Hochbruck in 2006.
x gen = x part + x H ,
with smooth functions y (real) and z (complex), i. e. these functions and their derivatives are bounded
independently of ω ≫ 1.
If g now depends on x, one needs to consider more and more terms of the form eikωt z k (t ), for integers
k, in order to describe the solution.
This motivates the following result presenting a modulated Fourier expansion (MFE) for the exact
solution to highly oscillatory problems:
18
Mini-course on GNI February 2016
David Cohen Fundação Getulio Vargas
Theorem 4.1 (Hairer, Lubich (2000)). Let x(t ) be the solution to (5) with initial data satisfying (6). Assume
that x(t ) stays in a compact K for 0 ≤ t ≤ T . Then, one has
∑
x(t ) = y(t ) + eikωt z k (t ) + R N (t ) (9)
0<|k|<N
This analytical tool permits to show that the oscillatory energy I is almost preserved for very long time
along the exact solution to (5).
Theorem 4.2 (Hairer, Lubich (2000)). Under the assumptions of the above theorem and assuming further
that the solution x(t ) to (5) stays in a compact for 0 ≤ t ≤ ωN , then one has
Furthermore, near-conservation of I over exponentially long time intervals is shown in Cohen, Hairer,
Lubich (2000).
for the numerical solution given by the trigonometric method (7) by requiring that
!
x n = x h (nh).
Under some technical assumptions, one finally obtains a result on long-time near-conservation proper-
ties for the trigonometric methods
Theorem 4.3 (Hairer, Lubich (2000)). The numerical solution given by the trigonometric methods (7) sat-
isfies, for 0 ≤ nh ≤ h −N −1 ,
H (x n , ẋ n ) = H (x 0 , ẋ 0 ) + O (h)
I (x n , ẋ n ) = I (x 0 , ẋ 0 ) + O (h).
This theorem explains the excellent long-time behaviour of the trigonometric methods when applied
to highly oscillatory problems.
19
Mini-course on GNI February 2016
David Cohen Fundação Getulio Vargas
u t t − u xx + ρu + g (u) = 0, (10)
where u = u(x, t ) for t > 0 and −π < x < π with periodic boundary conditions. We assume ρ > 0 and g
smooth with g (0) = g ′ (0) = 0.
∑
∞
The above equation reads, in terms of the Fourier series (obs. u − j = u j ) u(x, t ) = u j (t )ei j x ,
j =−∞
We further assume that the initial position and velocity of (10) satisfy
20
Mini-course on GNI February 2016
David Cohen Fundação Getulio Vargas
Figure 16: Near-conservation of actions: the first 32 actions I j (t ) are plotted as functions of time.
Theorem 5.1 (Cohen, Hairer, Lubich (2008)). Under suitable non-resonance condition on the frequencies
ω j , the above assumption on the initial values, the estimate
∑
∞ I ℓ (t ) − I ℓ (0)
ωℓ2s+1 ≤ C ε for 0 ≤ t ≤ ε−N ,
ℓ=0 ε2
with I ℓ (t ) := I ℓ (u(·, t ), v(·, t )) holds with a constant C which depends on s and N , but is independent of ε
and t .
This implies long-time regularity of the exact solution to (10)
( )
∥u(·, t )∥2s+1 + ∥v(·, t )∥2s ≤ 2 ∥u(·, 0)∥2s+1 + ∥v(·, 0)∥2s for t ≤ ε−N .
This, more or less, says that if one starts small, one remains small for very long time.
The main tool used for the proofs of the above results is a modulated Fourier expansion of the exact
solution to the semi-linear wave equation (10).
For the numerical discretisation of (10), we first discretise in space (pseudo-spectral discretisation) and
then in time (trigonometric method).
The real-valued trigonometric polynomial (where the prime indicates that the first and last terms in
the sum are taken with factor 1/2) ∑′
u M (x, t ) = q j (t )ei j x
| j |≤M
is chosen such that the wave equation (10) is fulfilled at the 2M equidistant collocation points x k := kπ/M
−1
for k = −M , . . . , M − 1. This gives the system of ODE for q = (q j )M
j =−M
(obs. the analogy with the highly
oscillatory problem studied in Section 4):
d2 q −1
+ Ω2 q = f (q) with f (q) = −F2M g (F2M q).
dt 2
−1
Here, the matrix Ω = diag(ω j )M
j =−M
is diagonal and F2M denotes the discrete Fourier transform
1 M∑−1
(F2M w) j = w k e−i j xk .
2M k=−M
21
Mini-course on GNI February 2016
David Cohen Fundação Getulio Vargas
Figure 17: Actions, total energy (upper bold line), and momentum (lower bold line) along the numerical
solution of DOPRI5 for the CFL number hωM ≈ 1.075.
For the above system, one can define a discrete Hamiltonian H M (p, q), a discrete momentum K M (p, q)
and discrete actions E j (p, q) for | j | ≤ M and p = q̇.
Using a modulated Fourier expansions for the numerical solution, one can then prove
Theorem 5.2 (Cohen, Hairer, Lubich (2008)). Assume a non-resonance conditions for the frequencies ω j
and initial values that are smooth and small in a Sobolev norm of sufficiently high order s. The numerical
solution given by a pseudo-spectral discretisation of (10) in space and a time discretisation by symplectic
trigonometric method satisfies
H M (p n , q n ) − H M (p 0 , q 0 )
≤ Cε
ε2
K M (p n , q n ) − K M (p 0 , q 0 )
≤ C (ε + M −s + εt M −s+1 )
ε2
∑
M E ℓ (p n , q n ) − E ℓ (p 0 , q 0 )
ω2s
ℓ ≤ Cε
ℓ=0 ε2
for long times t = nh ≤ ε−N with a constant C that is independent of the small parameter ε, the dimension
2M of the spatial discretisation, the time stepsize h and the time t = nh ≤ ε−N .
The above result is illustrated in Figures 17 and 18. The same equation as above is discretised in
time first by an explicit adaptive Runge-Kutta scheme (Figure 17) and then by a trigonometric method
(Figure 18).
The main steps for the proof of the above theorem are:
2. Prove existence of smooth functions z k (τ) with derivatives bounded independently of ε (on inter-
vals of length ε−1 ).
22
Mini-course on GNI February 2016
David Cohen Fundação Getulio Vargas
Figure 18: Actions, total energy (upper bold line), and momentum (lower bold line) along the numerical
solution of the trigonometric integrator for the CFL number hωM ≈ 6.4.
3. Establish a Hamiltonian structure and the existence of formal invariants in the differential and
algebraic equations for the functions z k (τ).
4. Prove closeness (on intervals of length ε−1 ) of the formal invariants to actions E ℓ , to the total energy
H M , and to the momentum K M .
5. Stretch from short to long intervals of length ε−N +1 by patching together previous results along an
invariant.
Using the techniques of modulated Fourier expansions, one can prove the following results
2. Long-time stability of plane wave solutions of the cubic Schrödinger equation (cubic NLS) (Faou,
Gauckler, Lubich (2013)).
3. Long-time stability of plane waves of the cubic NLS for the numerical discretisation by Fourier
collocation and Strang splitting (Faou, Gauckler, Lubich (2013)).
4. Long-time near-conservation of actions, energy, and momentum along numerical solutions of the
cubic NLS (pseudo-spectral and Lie-Trotter splitting) (Gauckler, Lubich (2010)).
5. Long-time near-conservation of actions, energy, mass, and momentum along numerical solutions
of the cubic NLS (pseudo-spectral and exponential integrators) (Cohen, Gauckler (2012)).
23
Mini-course on GNI February 2016
David Cohen Fundação Getulio Vargas
0.8
0.6
0.4
0.2
W (t)
0
-0.2
-0.4
-0.6
-0.8
-1
0 0.2 0.4 0.6 0.8 1
Time
Let us consider two (scalar, for simplicity) functions f and g and a real (for simplicity) initial value X 0 . A
scalar stochastic differential equation (SDE) on the time interval [0, T ] reads:
dX (t ) = f (X (t )) dt + g (X (t )) dW (t )
X (0) = X 0 (13)
Here the second integral on the right-hand side is to be taken with respect to a scalar standard Brownian
motion, also called, standard Wiener process W (t ), see Figure 19.
This object is a random variable that depends continuously on t ∈ [0, T ] and satisfies the following
conditions:
(W2) For 0 ≤ s < t ≤ T , the increment W (t )−W (s) is normally distributed with mean zero and variance t −
p
s. We thus have W (t )−W (s) ∼ t − sN (0, 1). Here N (0, 1) denotes the standard normal distribution
(or Gaussian) with mean zero and variance one.
(W3) For 0 ≤ s < t < u < v ≤ T , the increments W (t ) − W (s) and W (v) − W (u) are independent.
The classical Euler method for ODEs can be adapted to the case of the SDE (13) and reads
24
Mini-course on GNI February 2016
David Cohen Fundação Getulio Vargas
Stochastic versions of the Hamiltonian problems considered in the previous sections have been investi-
gated recently together with their numerical discretisations by stochastic symplectic schemes. We refer
to [22] and references therein.
Instead, we shall focus of the long-time numerical discretisation of (scalar) stochastic oscillators of
the form [24]
ẍ(t ) + ω2 x(t ) = αẆ (t ),
or written as a second-order SDE
dX (t ) = Y (t ) dt
dY (t ) = −ω2 X (t ) dt + α dW (t ), (16)
where W (t ) is the scalar Wiener process defined above, the parameters ω ≫ 1 and α ∈ R, and we denote
by X 0 and Y0 the initial values.
The unique solution to (16) reads (variation-of-constants formula)
∫ t
X (t ) = X 0 cos(ωt ) + Y0 ω−1 sin(ωt ) + α ω−1 sin(ω(t − s)) dW (s),
0
∫ t
Y (t ) = −X 0 ω sin(ωt ) + Y0 cos(ωt ) + α cos(ω(t − s)) dW (s) (17)
0
and verifies
[1( )] 1 ( α2
E Y (t )2 + ω2 X (t )2 = Y02 + ω2 X 02 ) + t for all time t . (18)
2 2 2
This corresponds to the fact that the expectation of the total energy of (16) drifts linearly with time.
Since we are interested in the long-time behaviour of the numerical solutions, the model problem
(16) with the above property will serve as a test in order to derive efficient numerical methods!
Numerical discretisation of this problem was recently investigated by: Strømmen Melbø, Higham,
Cohen, Sigg, Tocino, Senosiain, Hong, Scherer, Wang, de la Cruz, etc. Some of the obtained results are
The long-time behaviour of some of the above numerical methods is illustrated in Figure 20. To pro-
duce this figure, we use ω = 5, X 0 = 0, Y0 = 1, α = 1 and consider the Euler-Maruyama (EM), the partitioned
EM (pEM), the backward EM (BEM) and the stochastic trigonometric method (STM) with (large) stepsize
h = 0.2. The STM is the only numerical method offering a proper behaviour with respect to the drift of
the expected energy. Observe that the numerical solution given by EM cannot be seen in this figure since
it blows up very rapidely.
25
Mini-course on GNI February 2016
David Cohen Fundação Getulio Vargas
30
pEM
BEM
25 EM
STM
Exact
20
Energy
15
10
0
0 5 10 15 20 25
Time
Figure 20: Stochastic oscillator: Linear growth in the energy for various numerical solutions.
5.2.3 Long-time integration of linear stochastic wave and stochastic Schrödinger equations
As also seen in the deterministic setting, the test equation (16) can serve as a model problem for more
complicated ones such as linear stochastic wave equations and stochastic Schrödinger equations. In-
deed, a (pseudo-spectral) spatial discretisation of such SPDEs leads to a system of SDEs of the form (16).
Without going into too much technical details, one can extend the stochastic trigonometric method
(STM) to the time discretisation of the linear stochastic wave equation
where the stochastic process {W (t )}t ≥0 is an L 2 (D)-valued Q-Wiener process. One can show that the
exact solution to this problem as well as the numerical solution given by the STM have the very same
drift in the expected energy, see [4] for details and Figure 21 for an illustration. To produce this figure,
we discretise the above SPDE in space by FEM with mesh h = 0.1 and the following numerical methods
are used for the time discretisation: the stochastic trigonometric method (STM), the backward Euler-
Maruyama (BEM), the stochastic Störmer-Verlet (SV), the Crank-Nicolson-Maruyama (CNM) with time
step k = 0.1. In this figure, one clearly observes that the only scheme preserving the linear drift of the
expected energy E[∥∆1/2 u 1 (t )∥2L 2 + ∥u 2 (t )∥2L 2 ] is the stochastic trigonometric method. Here we denote
u 1 := u and u 2 := u̇.
Finally, long-time behaviour of the exact and numerical solution were also investigated in the context
of the linear stochastic Schrödinger equation
Once again, it can be shown that the stochastic exponential method outperforms classical numerical
schemes in term of the long-time behaviour of the expected mass, energy and momentum, see [1] for
details and Figure 22 for illustrations. This figure displays the expected values of the energy E[∥∇u(t )∥2L 2 ]
and of the mass E[∥u(t )∥2L 2 ] along the numerical solutions computed with the stochastic implicit mid-
point rule (MP), the backward Euler-Maruyama (BEM), and the stochastic exponential method (SEXP)
26
Mini-course on GNI February 2016
David Cohen Fundação Getulio Vargas
350
2000
300
Energy 1500
Energy 250
200
1000
150
100
500
50
0 0
0 50 100 150 200 250 300 350 400 450 500 0 5 10 15 20 25 30 35 40 45 50
t t
Figure 21: Linear growth in the expected energy of the linear stochastic wave equation for various nu-
merical solutions.
Ms = 10000, k = 0.10, M = 128
Ms = 10000, k = 0.10, M = 128 0.07
12
Exact
Exact
SEXP
SEXP
MP
MP 0.06
BEM
10 BEM
0.05
8
0.04
Energy Mass
6
0.03
4
0.02
2
0.01
0 0
0 500 1000 1500 2000 2500 0 2 4 6 8 10
Time Time
Figure 22: Linear growth in the energy (left) and mass (right) of the linear stochastic Schrödinger equation
for various numerical solutions and two different space-time Q-Wiener process W .
with the time step k = 0.1 and M = 128 Fourier modes are used for the spatial discretisation. We consider
noise of the form
1 ∑ 1/2
W (x, t ) = p λn βn (t )einx for 0 ≤ x ≤ 2π,
2π n∈Z
with i.i.d Brownian motion βn (t ). The eigenvalues of the covariance operator Q are given by λn = 1/(1 +
n 8 ) (smooth noise, first plot) and λn = 1/(1 + n 2 ) (less smooth noise, second plot).
q A non-constant function I (y) is called a first integral of ẏ = f (y) if I ′ (y) f (y) = 0 for all y. This im-
plies that every solutions to this differential equation satisfies I (y(t )) = I (y 0 ) = Const and I is thus
27
Mini-course on GNI February 2016
David Cohen Fundação Getulio Vargas
an invariant. See the predator-prey problem for example. In this context, one is thus interested in
developing numerical methods preserving this invariant.
q One can analyse a kind of generalisation of Hamiltonian systems (4), where one allows the matrix
J to be non-constant. This is the case for Poisson systems. A Poisson system is defined as
ẏ = B (y)∇H (y),
where the skew-symmetric matrix B (y) satisfies some properties. The predator-prey problem is an
example of a Poisson system. Here, one is interested in developing numerical methods that are
Poisson maps. This is more or less the equivalent of symplecticity in this setting. We refer to [12,
Chapter VII.2]
q Composition and splitting methods are powerful techniques to develop high-order geometric nu-
merical integrators. We refer to [3].
q Long-time near-conservation of energy and angular momentum for symmetric multistep meth-
ods.
The following references give an introduction to numerical methods for differential equations (ODE);
or offer a good introduction to the subject of this lecture Geometric Numerical Integration (GNI) (GNI); or
are research articles on (stochastic) GNI (SDE, splitting, exponential integrators). A short comment after
some references is also provided.
28
Mini-course on GNI February 2016
David Cohen Fundação Getulio Vargas
References
[1] R. Anton and D. Cohen. Exponential integrators for stochastic Schrödinger equations driven by Ito
noise. Preprint, 2016.
[2] U. M. Ascher. Numerical Methods for Evolutionary Differential Equations, volume 5. Society for
Industrial and Applied Mathematics (SIAM), 2008. Chapters 2 and 6 contain classical material in
num. meth. for ODE and GNI.
[3] S. Blanes and F. Casas. A Concise Introduction to Numerical Geometric Integration. CRC Press, Taylor
and Francis Group, 25.03.2016. Introduction on GNI with application to splitting schemes.
[4] D. Cohen, S. Larsson, and M. Sigg. A trigonometric method for the linear stochastic wave equation.
SIAM J. Numer. Anal., 51(1):204–222, 2013.
[5] E. Faou. Geometric Numerical Integration and Schrödinger Equations. Zurich Lectures in Advanced
Mathematics. European Mathematical Society (EMS), Zürich, 2012. GNI for PDEs.
[6] L. Gauckler. Long-time Analysis of Hamiltonian Partial Differential Equations and their Discretiza-
tions. PhD thesis, Universität Tübingen, 2010. GNI for PDEs.
[7] D. F. Griffiths and D. J. Higham. Numerical Methods for Ordinary Differential Equations. Springer-
Verlag London Ltd., 2010. Excellent text book on num. meth. for ODE. Contains chapters on GNI.
[9] E. Hairer and M. Hairer. GniCodes - Matlab programs for geometric numerical integration. http:
//www.hairer.org/papers/gni.ps, 2003. Summary on GNI illustrated with Matlab codes.
[10] E. Hairer, C. Lubich, and M. Roche. The Numerical Solution of Differential-Algebraic Systems by
Runge-Kutta Methods, volume 1409 of Lecture Notes in Mathematics. Springer-Verlag, Berlin, 1989.
[11] E. Hairer and Ch. Lubich. Numerical solution of ordinary differential equations. na.
uni-tuebingen.de/~lubich/pcam-ode.pdf, 2012. Introductory text on num. meth. for ODE.
[12] E. Hairer, Ch. Lubich, and G. Wanner. Geometric Numerical Integration, volume 31. Springer-Verlag,
second edition, 2006. Geometric numerical methods.
[13] E. Hairer, S.P. Nørsett, and G. Wanner. Solving Ordinary Differential Equations I. Nonstiff Problems,
volume 8. Springer-Verlag, second edition, 1993. Advanced book in num. meth. for ODE.
[15] M. Hochbruck and A. Ostermann. Exponential integrators. Acta Numer., 19:209–286, 2010. Survey
article on exponential methods.
[16] A. Iserles. A First Course in the Numerical Analysis of Differential Equations. Cambridge University
Press, second edition, 2009. Text book on numerical methods for ODE and PDE.
29
Mini-course on GNI February 2016
David Cohen Fundação Getulio Vargas
[18] P. E. Kloeden and E. Platen. Numerical Solution of Stochastic Differential Equations, volume 23 of
Applications of Mathematics (New York). Springer-Verlag, Berlin, 1992. Reference book for SDE.
[19] B. Leimkuhler and S. Reich. Simulating Hamiltonian Dynamics, volume 14. Cambridge University
Press, 2004. Geometric numerical methods.
[20] R. I. McLachlan and G. R. W. Quispel. Splitting methods. Acta Numer., 11:341–434, 2002. Survey
article on splitting methods.
[21] G. N. Milstein. Numerical Integration of Stochastic Differential Equations, volume 313 of Mathemat-
ics and its Applications. Kluwer Academic Publishers Group, Dordrecht, 1995. Reference book for
SDE.
[22] G. N. Milstein and M. V. Tretyakov. Stochastic Numerics for Mathematical Physics. Scientific Com-
putation. Springer-Verlag, Berlin, 2004. Reference book for SDE.
[23] J. M. Sanz-Serna and M. P. Calvo. Numerical Hamiltonian problems, volume 7. Chapman and Hall,
1994. Textbook on GNI.
[24] A. H. Strømmen Melbø and D. J. Higham. Numerical simulation of a linear stochastic oscillator with
additive noise. Appl. Numer. Math., 51(1):89–99, 2004.
[26] E. Süli and D. F. Mayers. An Introduction to Numerical Analysis. Cambridge University Press, 2003.
Chapter 12 contains classical material in num. meth. for ODE.
30
Mini-course on GNI February 2016
David Cohen Fundação Getulio Vargas
31
Mini-course on GNI February 2016
David Cohen Fundação Getulio Vargas
32
Mini-course on GNI February 2016
David Cohen Fundação Getulio Vargas
33
Mini-course on GNI February 2016
David Cohen Fundação Getulio Vargas
34
Mini-course on GNI February 2016
David Cohen Fundação Getulio Vargas
35
Mini-course on GNI February 2016
David Cohen Fundação Getulio Vargas
36
Mini-course on GNI February 2016
David Cohen Fundação Getulio Vargas
37
Mini-course on GNI February 2016
David Cohen Fundação Getulio Vargas
38
Mini-course on GNI February 2016
David Cohen Fundação Getulio Vargas
39
Mini-course on GNI February 2016
David Cohen Fundação Getulio Vargas
40
Mini-course on GNI February 2016
David Cohen Fundação Getulio Vargas
41
Mini-course on GNI February 2016
David Cohen Fundação Getulio Vargas
42
Mini-course on GNI February 2016
David Cohen Fundação Getulio Vargas
43
Mini-course on GNI February 2016
David Cohen Fundação Getulio Vargas
44
Mini-course on GNI February 2016
David Cohen Fundação Getulio Vargas
45