You are on page 1of 5

# Introduction to

Hamiltonian systems

Examples
Mathematical biology: Lotka-Volterra model
First numerical methods
Mathematical pendulum
Kepler problem
Outer solar system
Molecular dynamics

Marlis Hochbruck
Heinrich-Heine Universitat D
usseldorf

## Oberwolfach Seminar, November 2008

Lotka-Volterra model I


## v (t) number of prey

First integrals
Energy, linear invariants
Quadratic and polynomial invariants
Reversible dierential equations
Symmetric methods

Lotka-Volterra model II

u = u(v 2)

v = v (1 u)

y = f (y )

3u

## First numerical methods

autonomous problem y  = f (y )

equations
u = u(v 2),

v = v (1 u)

yn+1 = yn + hf (yn )

0=

1u
v 2
d
u
v = I (u, v )
u
v
dt

## implicit Euler method:

yn+1 = yn + hf (yn+1 )

with invariant
I (u, v ) = ln u u + 2 ln v v



yn+1 = yn + hf

yn + yn+1
2

## Lotka-Volterra model experiment

partitioned system
u = f (u, v ),

v = g (u, v )

explicit Euler
v

## combine explicit and implicit Euler: symplectic Euler

un+1 = un + hf (un , vn+1 )
vn+1 = vn + hg (un , vn+1 )

implicit Euler
v

(SE1)

y82

y0

or

symplectic Euler

y49
y50

y83

un+1 = un + hf (un+1 , vn )
vn+1 = vn + hg (un+1 , vn )

y0

y0

## SE1 becomes explicit if f (u, v ) = f (u), g (u, v ) = g (v )

SE2 becomes explicit if f (u, v ) = f (v ), g (u, v ) = g (u)

Hamiltonian problem

Mathematical pendulum

## Hamiltonian H(p, q) = H(p1 , . . . , pd , q1 , . . . , qd )

(total energy)

q1 , . . . , qd positions
p1 , . . . , pd momenta

## mass m = 1, massless rod of length  = 1,

gravitational acceleration g = 1

Hamiltonian


p = Hq ,

H q = q H =

H
q

T

## energy conservation: H(p(t), q(t)) = const for all t

Area preservation

cos q

equations of motion p = Hq , q = Hp
p = sin q,


m

q = p

or

q = Hp

1
H(p, q) = p 2 cos q
2

y0

(SE2)

q = sin q


explicit Euler
h = 0.2

symplectic Euler
h = 0.3

St
ormer-Verlet
h = 0.6



## Numerical example Kepler problem

400 000 steps
h = 0.0005

Hamiltonian

1
H(p1 , p2 , q1 , q2 ) = (p12 + p22 ) (q12 + q22 )1/2
2

1
1

implicit midpoint

q i = pi ,

p i = Hqi =

qi (q12

explicit Euler

equations of motion:
q22 )3/2

4 000 steps
h = 0.05

symplectic Euler

4 000 steps
h = 0.05

rst integrals
2

## angular momentum L(p1 , p2 , q1 , q2 ) = q1 p2 q2 p1

(Keplers second law)

Stormer Verlet

1 4 000 steps

h = 0.05

## Qualitative long-time behavior Kepler problem

conservation of energy
.02

method

.01

50

100

.4

## explicit Euler, h = 0.0001

error in H

error in L

global error

explicit Euler

O(th)

O(th)

O(t 2 h)

symplectic Euler

O(h)

O(th)

implicit midpoint

O(h2 )

O(th2 )

St
ormer-Verlet

O(h2 )

O(th2 )

.2

50

100

## Outer solar system numerical example

Hamiltonian
H(p, q) =

1
2

5

i=0

1 T
p pi g
mi i

5 
i1

i=1 j=0

explicit Euler, h = 10

implicit Euler, h = 10

mi mj
qi qj 

## initial positions and initial velocity from Sept. 5, 1994, 0h00

Molecular dynamics

## Numerical experiment frozen argon crystal

Hamiltonian
N = 7 argon atoms in a plane


 
1 1 T
pi pi +
Vij qi qj 
2
mi
i1

H(p, q) =

i=2 j=1

i=1

2
7

3
1

4
5

.2

Vij (r ) = 4ij

 
12
ij

 6 
ij

.0

temperature

.2

30

0
30
60

## symplectic Euler, h = 10[fs]

30
30

Verlet, h = 80[fs]

total energy

30

total energy

30

## explicit Euler, h = 10[fs]

60

First integrals

Verlet, h = 40[fs]

30

N
1 
mi q i 2
NkB
i=1

## Numerical experiment argon crystal

60

T =

Verlet, h = 10[fs]

## Denition. A non-constant function I (y ) is called a rst integral of

y = f (y ) if
I  (y )f (y ) = 0
for all y .
synonyms: invariant, conserved quantity, constant of motion

30

30
30

0
30
60

## symplectic Euler, h = 10[fs]

30

temperature

Verlet, h = 20[fs]

temperature

consider


1 1 T
pi pi +
Vij (rij ),
2
mi
N

H(p, q) =

i=1

rij = qi qj 

i=2 j=1

p i =

N


ij (qi qj ),

## where Y is a vector or a matrix

i1

equations of motion
1
pi ,
q i =
mi

Y = A(Y )Y ,

ij =

j=1

## Theorem. The quadratic function I (Y ) = Y T Y is invariant. In

particular, orthogonality of Y0 is conserved.
Lemma. Let Y , A(Y ) Rn,n . If trace A(Y ) = 0 for all Y , then
det Y is an invariant.


columns of Y

## Denition. Let be an invertible linear transformation in the phase

space of y = f (y ). The dierential equation and the vector eld
f (y ) are called -reversible if
f (y ) = f (y )

partitioned system
u = f (u, v ),

v = g (u, v )

for all y
where

f (y )

y
f (y )
f (y )

y0

f (y )

u
y0

g (u, v ) = g (u, v )

## is ()-reversible for (u, v ) = (u, v )

u
y

f (u, v ) = f (u, v ),

y1

t y1

## second order dierential equations

u = g (u) u = v , v = g (u)
are ()-reversible

## Do numerical methods produce a reversible numerical ow when

applied to a reversible dierential equation?

Symmetric methods
Denition. A numerical one-step method h is symmetric or time
reversible if
h h = id.
y1 = h (y0 ) is symmetric if exchanging
y0 y1 and h h
leaves the method unaltered
Examples: implicit midpoint rule, St
ormer-Verlet method
Theorem. If a numerical method applied to a -reversible
dierential equations satises
h = h
then h is -reversible if and only if h is a symmetric method.