San José State University

applet-magic.com
Thayer Watkins
Silicon Valley
& Tornado Alley
USA

Generalized Forces in Lagrangian
and Hamiltonian Mechanics

Let the state variables for a physical system be denoted as q1, q2, …, qn and collectively at the vector Q. Their time derivatives are denoted collectively as V. Let the kinetic energy and the potential energy of the system be denoted as K(V, Q) and U(Q, V), respectively. (It is assumed that there is no explicit dependent of energy on time.) For simple systems K(V) and U(Q) but for systems involving rotation the moment of inertia may depend upon a scale variable and for sytems involving an electromagnetic field the potential energy depends upon V as well as Q.

The Lagrangian L of the system is given by

L = K − U

The generalized momentum pi conjugate to the state variable qi is given by

pi = (∂L/∂vi)
for i=1 to n
where
vi = (dqi/dt)

This set of equations can be represented as

P = (dL/dV)
V = (dQ/dt)

The Hamiltonian H for the system is defined as

H = Σi vipi − L

For a system whose Lagrangian is not explicitly a function of time

Σi vipi = 2K
therefore
H = 2K − (K − U) = K + U

Thus if the Lagrangian is not a function of time explicitly then H is total energy.

Generalized Forces*

The generalized forces can be defined as

Fi = (∂L/∂qi)

The illustration below shows that these forces must be defined in terms of the Lagrangian rather than the Hamiltonian.

Illustration

Consider a mass m attached to a spring of length r and stiffness k rotating about a center at an angular rate ω. The radial velocity of the mass is denoted as vr. The kinetic energy K and potential energy U are given by

K = ½m[ (ωr)² + vr²]
and
U = ½kr²
and hence
L = ½J(r)ω² + ½mvr² − ½kr²
where J is the moment
of inertia mr²

The conjugate momenta are

pθ = (∂H/∂ω) = Jω
pr = (∂H/∂vr) = mvr

For the illustrated problem

Fθ = (∂L/∂θ) = 0
Fr = (∂L/∂r) = mrω² − kr

In general

(dpi/dt) = Fi

Therefore

(dpθ/dt) = 0

This means that angular momentum pθ is constant but its being constant does not mean that angular rotation is constant. In fact,

pθ = mr²ω
so
ω = pθ/(mr²)
and hence
(dω/dt) = −2pθ(dr/dt)/(mr³)

The dynamics of r are given by

(dpr/dt) = mω²r −kr

The second term on the right is the restoring force due to the spring. The first term is what is usually called apologetically centrifugal force. The analysis justifies the use of that term.

Hamiltonian Analysis

The Hamiltonian equations of motion for a physical system are:

(dqi/dt) = (∂H/∂pi)
and
(dpi/dt) = −(∂H/∂qi)

This latter equation corresponds to the equation of Newtonian dynamics

(dpi/dt) = Fi

which suggest that the generalized force for a system should be −(∂H/∂qi). But for the illustration problem presented above

−(∂H/∂r) = −[mrω² + kr]

This correctly has the restoring force due to the spring as being −kr. However the putative force is pointing in the same direction as the restoring contrary to fact. In order for the direction of the centrifugal force and the restoring force to have opposite directions the generalized forces must be defined as (∂L/∂qi) rather than −(∂H/∂qi). What −(∂H/∂r) gives is related to the centripetal acceleration. Thus what Hamiltonian analysis gives is in the nature of accelerations rather than forces. This points to a subtle difference in Hamiltonian mechanics compared to Lagrangian mechanics.

Conclusions

The generalized forces are defined as

Fi = (∂L/∂qi)

These forces must be defined in terms of the Lagrangian rather than the Hamiltonian.

The dynamics of a physical system are given by the system of n equations:

(dpi/dt) = Fi


* Dirk ter Haar in his Elements of Hamiltonian Mechanics uses the term generalized forces only for the derivatives of the potential energy function with respect to the generalized coordinates. Herbert Goldstein in his Classical Mechanics uses the term in the same way but also for something that is in the nature of a component of an external force on a body. This seems to be the most common use of the term generalized force. It is also used for the following form

d/dt (∂L/∂vi) − (∂L/∂qi) = Fi

The expression on the left is known as the negative of the functional derivative and is denoted as

−(δL/δqi)


HOME PAGE OF applet-magic
HOME PAGE OF Thayer Watkins