Download - Hamiltonian Formalism
Hamiltonian Formalism
Eric Prebys, FNAL
Motivation We have focused largely on a kinematics based
approach to beam dynamics. Most people find it more intuitive, at least when first
learning the material. However, it’s useful to at least become familiar
with more formal Lagrangian/Hamiltonian based approach Can handle problems too complex for kinematic approach More common in advanced textbooks and papers Eventually intuitive
USPAS, Knoxville, TN, Jan. 20-31, 2014Lecture 10 - Hamiltonian Formalism 2
Review* The Lagrangian of a body is defined as
Hamilton’s variational principle says that the body will follow a trajectory in time (or other independent variable) which minimizes the “action”
Generalized force
USPAS, Knoxville, TN, Jan. 20-31, 2014Lecture 10 - Hamiltonian Formalism 3
*Nice treatment in Reiser, “Theory and Design of Charged Particle Beams”
Potential energy Kinetic
Energy
Demonstration in Cartesian Coordinates Lagrangian
Equations of motion
In other words
Lagrangian mechanics is really just a turnkey way to do energy conservation in arbitrary coordinate systems.
USPAS, Knoxville, TN, Jan. 20-31, 2014Lecture 10 - Hamiltonian Formalism 4
E&M Introduce velocity-dependent force: Lagrange’s equations still hold for
We describe the magnetic field in terms of the vector potential
The Lorentz force now becomes, eg
USPAS, Knoxville, TN, Jan. 20-31, 2014Lecture 10 - Hamiltonian Formalism 5
Lorentz Gauge
Homework
Relativistic Version We want to find a relativistically correct
Lagrangian. Assume for now
In Cartesian coordinates, we have eg.
USPAS, Knoxville, TN, Jan. 20-31, 2014Lecture 10 - Hamiltonian Formalism 6
Make the substitution
Check in Cartesian coordinates for B=0
More generally
USPAS, Knoxville, TN, Jan. 20-31, 2014Lecture 10 - Hamiltonian Formalism 7
Canonical Momentum Lagrange’s equations are second order diff. eq.
We will find that it will be useful to specify system in term of twice as many first order diff. eqs.
We introduce the “conjugate” or “canonical” momentum
In Cartesian coordinates
USPAS, Knoxville, TN, Jan. 20-31, 2014Lecture 10 - Hamiltonian Formalism 8
canonical momentum
ordinary momentum
Hamilton’s Equations Introduce “Hamiltonian” We take the total differential of both sides
Equating the LHS and RHS gives us
USPAS, Knoxville, TN, Jan. 20-31, 2014Lecture 10 - Hamiltonian Formalism 9
LHS
RHS
Hamilton’sEquations of motion
Conservation laws From the last equation, we have
In other words, the Hamiltonian is conserved if there is no explicit time dependence of the Lagrangian.
USPAS, Knoxville, TN, Jan. 20-31, 2014Lecture 10 - Hamiltonian Formalism 10
Particle in an Electromagnetic Field Recall
In Cartesian coordinates
USPAS, Knoxville, TN, Jan. 20-31, 2014Lecture 10 - Hamiltonian Formalism 11
Total Energy
Hamiltonian in Canonical Momentum In order to apply Hamilton’ equations, we must
express the Hamiltonian in terms of canonical, rather than mechanical momentum
USPAS, Knoxville, TN, Jan. 20-31, 2014Lecture 10 - Hamiltonian Formalism 12
Remember this forever!
Change of Coordinates and Generator Functions We will often find it useful to express the
Hamiltonian in other coordinate systems, and need a turnkey way to generate canonical coordinate/momentum pairs. That is
We construct the Lagrangian out of the new coordinates
We still want the action principle to hold
USPAS, Knoxville, TN, Jan. 20-31, 2014Lecture 10 - Hamiltonian Formalism 13
This means that the new and old Lagrangians can differ by at most a total time derivative
Let’s first consider a function which depends only on the new and old coordinates
Then we must have
Expand the total time time derivative at the right and combine terms
USPAS, Knoxville, TN, Jan. 20-31, 2014Lecture 10 - Hamiltonian Formalism 14
Because q and Q are independent variables, the coefficients must vanish.
F1 is called the “generating function of the canonical transformation. Rather than choosing (q,Q) as variables, we could have chosen (q,P), (Q,p) or (p,P). The convention is:
USPAS, Knoxville, TN, Jan. 20-31, 2014Lecture 10 - Hamiltonian Formalism 15
solve for p and P in terms of q and Q
Hamiltonian in terms of new variables
In all cases
Example: Harmonic Oscillator
USPAS, Knoxville, TN, Jan. 20-31, 2014Lecture 10 - Hamiltonian Formalism 16
We know the Hamiltonian is
andchange variables to
we want the old momentum in terms of the new and old coordinate
USPAS, Knoxville, TN, Jan. 20-31, 2014Lecture 10 - Hamiltonian Formalism 17
So we have
J has units of Energy*time “action”
Phase angle
These are known as “action-angle” variables. We will see that this will be very useful for studying systems which are perturbed by the addition of small non-linear terms.
Deviations from a Periodic System
USPAS, Knoxville, TN, Jan. 20-31, 2014Lecture 10 - Hamiltonian Formalism 18
Assume we have a system with solutions x0 and y0, which are periodic with period T
Now consider an orbit near the periodic orbit
Substituting in and expanding, we get
These are the equations one obtains with a Hamiltonian of the form (homework)
periodic(!) in time rather than constant
General case
USPAS, Knoxville, TN, Jan. 20-31, 2014Lecture 10 - Hamiltonian Formalism 19
We start with a known system
We transform to a system which represents small deviations from this system
Use a generating function of the second type
integrate
USPAS, Knoxville, TN, Jan. 20-31, 2014Lecture 10 - Hamiltonian Formalism 20
We can calculate the new Hamiltonian and expand for small deviations about the equilibrium
No dependence on Q or P, so can be ignored!
It’s important to remember that these coefficients are derivatives of the Hamiltonian evaluated at the unperturbed orbit, so in general they are periodic, but not constant in time!
Particle Motion Revisited
USPAS, Knoxville, TN, Jan. 20-31, 2014Lecture 10 - Hamiltonian Formalism 21
Recall we showed that
Canonical momentum!
We recall our coordinate system from an earlier lecturex
ys
xr
Reference trajectory
Particle trajectory
And define canonical s momentum and vector potential as
Use new symbol
USPAS, Knoxville, TN, Jan. 20-31, 2014Lecture 10 - Hamiltonian Formalism 22
We would like to change our independent variable from t to s. Note
We can transform this into a partial derivative by setting the total derivative to zero. In general
so
new Hamiltonian
You can show (homework) that
USPAS, Knoxville, TN, Jan. 20-31, 2014Lecture 10 - Hamiltonian Formalism 23
Consider a system with no E fields and only B fields in the transverse directions, so there is only an s component to the vector potential
In this case, H is the total energy, so
normal “kinetic” momentum
For small deviations
USPAS, Knoxville, TN, Jan. 20-31, 2014Lecture 10 - Hamiltonian Formalism 24
We showed that the first few terms of the magnetic field are
...2
~~~
...~2
~
220
220
xyByxByBxBBB
xyByxByBxBBB
x
y
dipole
quadrupole
sextupole
We have
You can show (homework) that this is given by
We have
USPAS, Knoxville, TN, Jan. 20-31, 2014Lecture 10 - Hamiltonian Formalism 25
In the case where we have only vertical fields, this becomes
Normalize by the design momentum
At the nominal momentum ρ=ρ0, so
same answer we got before
USPAS, Knoxville, TN, Jan. 20-31, 2014Lecture 10 - Hamiltonian Formalism 26
By comparing this to the harmonic oscillator, we can write
We have a solution of the form
Look for action-angle variables
USPAS, Knoxville, TN, Jan. 20-31, 2014Lecture 10 - Hamiltonian Formalism 27
Look for a generating function such that
Integrate to get
In an analogy to the harmonic oscillator, the unperturbed Hamiltonian is