Professional Documents
Culture Documents
Day 1
Consider a differential equation of the form
y = f (z)
z = g(y)
Use Matlab to construct the following integrators for this type of differential
equations:
symplectic Euler and Strmer/Verlet. (Notice that in this case both of these
integrators are explicit).
Construct the explicit Euler, the implicit midpoint method, and an ex-
plicit Runge-Kutta 4th order method (the integrator given by the left scheme
in table 1.8 in Hairer, Lubich and Wanner [2002]) for a general autonomous
differential equation.
p
=
p sin()
using the constructed integrators. Plot the vector field (use quiver) together
with some solution curves, for the explicit Euler and the symplectic Euler.
Show analytically that the energy
1
E = p2 cos()
2
is constant along the flow. How well do the different integrators conserve the
energy?
l1
1
m1 l2
2
m2
Day 2
Find the Euler-Lagrange equations for the following Lagrangians
)
L(, , , = 2 + 2 sin2
z)
L(, z, , = (a2 sin2 + b2 cos2 )2 + z 2
2
2 2 xx y y
L(x, y, x,
y)
= x + y + 4 + 2
a2 b
These Lagrangians turn out to be the ones determining geodesic curves on a
sphere, an elliptic cylinder, and an elliptic paraboloid.
= {(x, y, z) R3 | x2 + y 2 = f (z)} f : R R+
x2 y 2
2 =z
a2 b
For a = b = 1 find numerically geodesic curves and plot them on the hyper-
bolic paraboloid (use plot3 and surf).
Day 3
Find the Lagrangian for the spherical pendulum (i.e. particle moving on a
sphere), the double pendulum (see figure 1), and the governor (see figure 2).
l l
m1 m1
l l
m2
Figure 2: The governor. The whole system rotates about the vertical axis
with constant angular velocity .
Day 4
Construct for
Day 5
Find Hamiltons equations for the spherical pendulum and the double pen-
dulum.
A symmetric top with the tip fixed is called a Lagrange top. Using the
Euler angles (, , ), see figure 3, the kinetic energy is given by
A1 2 2 2 A3
K= ( + sin ) + ( + cos )2
2 2
where A1 is the moment of inertia about the e1 and e2 axes, and A3 is the
moment of inertia about the e3 axis. So the Lagrangian for this system is
A1 2 2 2 A3
L= ( + sin ) + ( + cos )2 mgh cos
2 2
where m is the mass , g is the gravitational accelleration, and h is the po-
sition of the center of mass on the e3 axis. Find Hamiltons equation for
the Lagrange top. Solve the system numerically, using the implicit midpoint
rule, and plot the movement of the center of mass in the (x, y, z) coordinate
system.
pi = i pi qi = i qi i i =
ez
e2
e3
e1
ey
n
ex
Day 6
Find the canonical transformation : R2 R2 given by the generating
function
1
S1 = mq 2 cot q
2
How does this transform the Hamiltonian for the harmonic oscillator
p2 1
H= + m 2 q 2
2m 2
For this problem give a graphical explanation of the transformation.
The three particle Toda lattice is the system with three degrees of freedom
with Hamiltonian
1
H = (p21 + p22 + p23 ) + e(1 3 ) + e(2 1 ) + e(3 2 ) 3
2
1
2
p3 p1 p2 )3
S2 = p1 1 + p2 2 + (
= 1 p21 + p22 + (
p1 + p2 )2 + e1 + e(2 1 ) + e2 3
H
2
Transform this Hamiltonian to H 0 using the generating function
1
S20 = (p0x 3p0y )1 + (p0x + 3p0y )2
4 3
(p0x , p0y , x0 , y 0 ) being the new coordinates. Finally transform this Hamiltonian
to H b by use of the homogeneous rescaling
p0x = 8 3px x0 = x p0y = 8 3py y0 = y
Since H
t = H t the dynamics of the system with Hamiltonian H = H/ 3
e b
is quivalent to that with Hamiltonian H b up to a rescaling of time.
The Hamiltonian H, e if correct, corresponds to the Hamiltonian for a
2
particle in R in a potential. Sketch some level curves of this potential
(implicitplot in Maple is an easy way to do this).
Day 7
Construct a program Poincare(x,y,z) which for a numerically calculated flow
in R3 plots the Poincar section with surface of section being the (y, z) plane
with x = 0. It shouldnt distinguish between the two different directions the
flow can go from one side of the surface of section to the other, just plot the
point of intersection with the surface of section when the flow changes side.
Use linear interpolation to find the point of intersection.
The Toda lattice continued. For x = 0 find the boundary of WE , for H, e
in the (y, py ) plane, i.e. the boundary as a function of E and y. Construct a
program Toda_boundary(E) which for a given value E of the energy plots
this boundary in the (y, py ) plane. Make the following program work by
filling in the place between %, and perhaps adjusting it to your previously
constructed programs.
function []=Toda_Poincare(E)
h=1/10;
T=500;
Toda_boundary(E);
title([The Toda Lattice. H=,sprintf(%0.3f,E) ],fontsize,14)
xlabel(y,fontsize,14)
ylabel(p_y,fontsize,14)
hold on
[y0, py0,ok] = ginput(1);
while ok ~= 13
px0=%px(0) as a function of y(0)=y0, py(0)=py0, and E (and x=0)%
[x,t]= Splitting2_4th(Toda_flowV,Toda_flowK,[px0;py0;0;y0],T,h);
Poincare(x(3,:),x(4,:),x(2,:))
[y0, py0,ok] = ginput(1);
end
d
what is dt F H
t ? Plot F along an approximate solution found by Split-
e
ting2_4th.
If the spring constant changes slowly in time for the harmonic oscillator
the Hamiltonian for this system is now
p2 1
H= + m( )2 q 2
2m 2
where = t, 0 1.
For small, find numerically, using the implicit midpoint method, how
p(t), given as for the time independent S1 used day 6, and H(t) behaves for
( ) = arctan( ) + 2
Using the graphical picture of the transformation derived day 6, explain the
behavior. If done correctly p(t) should be almost conserved this is an
example of an adiabatic invariant.
Day 8
Construct Toda_perturbed_Poincare(E,e), working similar to Toda_Poincare,
for the pertured Toda lattice with Hamiltonian
=H
H e + sin x
For E = 1 make Poincar sections for different values of , can you find a
value where you can see both dynamics of the unperturbed system and a new
kind of dynamics?
Analyse numerically the model of model of n = 3 weakly coupled rotators
with Hamiltonian
H(I, ) = h(I) + f ()
with
n n
1X 2 X
h(I) = I f () = cos(j j1 ) 0 = n
2 j=1 j j=1
figure
axis equal
axis([-1.2 1.2 -1.2 1.2])
hold on
for j=1:length(t)
cla;
plot([0 x(j)],[0 y(j)],k,linewidth,2)
plot(x(j),y(j),o,markersize,12,...
markeredgecolor,[1 0 0],markerfacecolor,[1 0 0])
title([The Pendulum. t=,sprintf(%0.3f,t(j)) ],fontsize,14)
getframe;
end
Use the bits and pieces in this program to construct a program which
makes an animation of the douple pendulum or of the governor. Write ex-
planatory text in the program.
Day 9
Consider a particle moving in one dimension in the scattering potential
2
eq
V =
q
with the usual expression for the kinetic energy K = 21 p2 . Use the second
order splitting method h = K V K
h/2 h h/2 and an explicit 4th order Runge-
Kutta method to find a solution for q(0) = 20, p(0) = 1. With respect to
the energy how do the two methods perform, how are they different?
Reconstruct the splitting method in such a way that it stops when the
value of q is back to q(0), in this way it shouldnt be given a time interval.
Let y start = (pstart , qstart ) be the initial value and y end = (pend , qend ) the final
value. For the Hamiltonian H = T + V define
max |H(y end ) H(y start )|
H =
H(y start )
where q1 is the position of the center of mass and q2 is the distance between
the atoms. Consider the splitting h = K V K
h/2 h h/2 and the splitting
method h = H H2 H1
h/2 h h/2 with
1
2 2
1 e(q1 +q2 /2) e(q1 q2 /2)
H1 = (p21 + p22 + q22 ) H2 = +
2 q1 + q2 /2 q1 q2 /2
With respect to the energy how do the two methods perform, how are they
different?
Day 10
Explain the figure of F vs. t made day 7.