Lagrangian Mechanics

4.1: Non-Conservative Forces

4.2 Forces of Constraints and Generalized Coordinates

Suppose that a particle is free to move in all directions. Three coordinates are needed to specify its location.

  • Cartesian: (x,y,z)(x,y,z)
  • Cylinderical: (ρ,ψ,z)(\rho, \psi, z)
  • Spherical: (r,θ,ϕ)(r, \theta,\phi)

The presence of constrains mean that some coordinates might be less than three positions. A constraint that reduces the number of position of a particle is called a holonomic constraint. The minimal set of required independent coordinates are called generalized coordinates, denoted by qkq_k.

4.3: Hamilton’s Mechanics

The Lagrangian is defined as

L=TU\begin{equation} L=T-U \end{equation}

where TT is kinetic energy and UU is potential energy. Having chosen a set of generalized coordinates, the Lagrangian can be written as:

L=TU=L(t,q1,q1,,q1˙,q2˙,)L=T-U=L(t, q_1, q_1, \cdots, \dot{q_1}, \dot{q_2}, \cdots)

We define its action S[qk(t)]S[q_k(t)] as the functional of the time integrand over the Lagrange LL, from a starting time tat_a to an ending time tbt_b.

S[qk(t)]=tatbdtL(t,q1,q1,,q1˙,q2˙,)=tatbdtL(t,qk,qk˙)S[q_k(t)]=\int^{t_b}_{t_a} dt L(t, q_1, q_1, \cdots, \dot{q_1}, \dot{q_2}, \cdots)=\int^{t_b}_{t_a} dt L(t, q_k, \dot{q_k})

When SS is stationary, δS\delta S(the change in position) is zero, giving us

0=δtatbdtL(t,qk,qk˙)0=\delta\int^{t_b}_{t_a} dt L(t, q_k, \dot{q_k})

Using knowledge from the previous chapter, the Lagrange is equal to (The integral represents the area under curve, where the curve/function is defined by the integrand. In this case, the integrand is LL. When SS is stationary, it has reached a minimum or a maximum. As we derived in chapter, when the value of a function is extremeized, by Euler’s equation 0=L/qk(d/dt)(L/qk˙)\color{red}0={\partial L}/{\partial q_k}-({d}/{dt})({\partial L}/{\partial \dot{q_k}}):

0=LqkddtLqk˙0=\frac{\partial L}{\partial q_k}-\frac{d}{dt}\frac{\partial L}{\partial \dot{q_k}}

4.32: Newton’s Law and Hamilton Mechanics

F=ma=ddtLqk˙F=ma=\frac{d}{dt}\frac{\partial L}{\partial \dot{q_k}}

Hamilton Mechanics is consistent of Newton’s law. The second term of the Lagrange equation essentially represents F=maF=ma, while the first term sums of force components. This is illustrated by below examples 4., 4.2. and 4.3.

Example 4.1: A Simple Pendulum

An inertial observer sees that a small plumb bob of mass m is free to swing back and forth in a vertical xz plane at the end of a string of length R. The position of the bob can be specified uniquely by its angle θ\theta measured up from its equilibrium position at the bottom, so we choose θ\theta as the generalized coordinate, as illustrated in Figure 4.2. Find the equation of motion and the second order differential equation.


  • Solution

    The origin of the system is defined at the bottom. Kinetic energy is K=1/2mv2K=1/2mv^2, where velocity vv requires three coordinates to specify its direction. By cylindrical coordinates, we know that (x,y,z)=(r,rθ,z)(x,y,z)=(r, r\theta, z). Speed vv is equal to:

    v=x˙2+y˙2+z˙2=r2+r2θ˙2+z˙2v=\dot{x}^2+\dot{y}^2+\dot{z}^2=r^2+r^2\dot{\theta}^2+\dot{z}^2

    Kinetic energy is equal to:

    K=12mv2=12m(r2+r2θ˙2+z˙2)K=\frac{1}{2}mv^2=\frac{1}{2}m(r^2+r^2\dot{\theta}^2+\dot{z}^2)

    Given the constraint that the string length RR is fixed, r˙=0\dot{r}=0 and initial speed z˙=0\dot{z}=0, the equation becomes:

    K=12mv2=12m(R2θ˙2)K=\frac{1}{2}mv^2=\frac{1}{2}m(R^2\dot{\theta}^2)

    The simple pendulum, with θ\theta as the generalized coordinate.

    L=TU=12m(R2θ˙2)mgR(1cosθ)L=T-U=\frac{1}{2}m(R^2\dot{\theta}^2)-mgR(1-\cos\theta)

    The Euler’s equation for L=L(t,θ,θ˙)L=L(t, \theta, \dot{\theta}) is equal to:

    0=LθddtLθ˙=mgRsinθddt(12mR22θ˙θ¨)0=\frac{\partial L}{\partial \theta}-\frac{d}{dt}\frac{\partial L}{\partial \dot\theta}=-mgR\sin\theta-\frac{d}{dt}(\frac{1}{2}mR^22\dot\theta\ddot\theta)

    Simplifying the expression, we get

    0=θ¨+gRsinθ0=\ddot\theta+\frac{g}{R}\sin\theta

    The second order differential equation shows the pendulum is in simple harmonic motion with an angular frequency of ω=g/R\omega=\sqrt{g/R}. Torque is equal to τ=Iω=mR2g/R=mgR\tau=I\omega=mR^2g/R=mgR.

Example 4.2: A Bead Sliding on a Vertical Helix

A bead of mass m is slipped onto a frictionless wire wound in the shape of a helix of radius RR, whose symmetry axis is oriented vertically in a uniform gravitational field, as shown in Figure 4.3. As always, we assume the description is from an inertial frame’s perspective (unless explicitly stated otherwise). Using cylindrical coordinates to find equations of motion.


Example 4.3: Block on an Inclined Plane

A bead of mass m is slipped onto a frictionless wire wound in the shape of a helix of radius R, whose symmetry axis is oriented vertically in a uniform gravitational field, as shown in Figure 4.3


  • Solution

    The Lagrange LL is equal to:

    L=TU=12mv2mgXsinα=12mX˙2mgXsinαL=T-U=\frac{1}{2}mv^2-mgX\sin\alpha=\frac{1}{2}m\dot{X}^2-mgX\sin\alpha

    Using Euler’s equation, we let L=L(t,X˙,X)L=L(t, \dot{X}, X), giving us:

    0=mgsinαddt12m(2X˙)=mgsinαddtmX˙0=-mg\sin\alpha-\frac{d}{dt}\frac{1}{2}m(2\dot{X})=-mg\sin\alpha-\frac{d}{dt}m\dot{X}

    The equation is consistent with Newton’s law, where ma=mgsinαma=-mg\sin\alpha in the horizontal (inclined) direction.

Summary for finding LL and equations of motion

  1. Use cartesian/polar/spherical/cylindrical coordinate to find positions of any arbitrary position s\vec s.
  1. Differentiate position s\vec s to find velocity vv
  1. Find the Lagrange L=TUL=T-U
    1. Find the expression for kinetic energy TT
    1. Find the expression for potential energy UU
  1. Use Euler’s equation to find equations of motion

4.4: Generalized Momenta and Cyclic Coordinates

In the last section, we has shown that Lagrange equation is consistent with Newton’s second law. The first term represents force components, and the second term is mama. Because F=dp/dtF=dp/dt, the term L/x˙\partial L/\partial \dot{x} can be seen as a component of momentum. Thus, it is natural to define the generalized momenta using generalized coordinates qkq_k

The generalized momenta is defined as:

pkLqk˙p_k\equiv\frac{\partial L}{\partial \dot{q_k}}

By Newton’s second law, dp/dt=madp/dt=ma. In terms of pkp_k, the Lagrange equation becomes:

dpkdt=Lqk\frac{dp_k}{dt}=\frac{\partial L}{\partial {q_k}}

Lagrange is expressed in the form of L=L(t,qk,qk˙)L=L(t, q_k, \dot{q_k}). Sometimes, the coordinate qkq_k is missing while qk˙\dot{q_k} is presents. A missing coordinate is said to be a cyclic coordinate. For such coordinate, the Lagrange equation tells us that the time derivative of corresponding generalized momentum is zero, so that the particular momentum is conserved.

dpkdt=Lqk=0\frac{dp_k}{dt}=\frac{\partial L}{\partial {q_k}}=0
💡
One of the first thing to notice about a Lagrangian is whether there is a cyclic coordinate, because such coordinate leads to a conservation law that is also a first integral of motion. This means that the equation of motion is a first-order differential equation rather than the second-order differential equation for a noncyclic coordinate.

Explanation:

The explanation seems confusing. All it is trying to say is that: if there is a cyclic coordinate, there must be a conserved quantity. This is better explained by the below example. Consider the Lagrange L=L(t,qk,qk˙)L=L(t, q_k, \dot{q_k}), where qkq_k is missing. Using Euler’s equation, we get:

0=LqkddtLqk˙0=\frac{\partial L}{\partial q_k}-\frac{d}{dt}\frac{\partial L}{\partial \dot{q_k}}

Because qkq_k is missing, the equation is independent of qkq_k and L/qk=0\partial L/\partial q_k=0. Then,

0=ddtLqk˙0=\frac{d}{dt}\frac{\partial L}{\partial \dot{q_k}}

so L/qk˙=k\partial L/\partial \dot{q_k}=k is a constant. Thus, L/qk˙\partial L/\partial \dot{q_k} is a conserved quantity.

Example: Particle on a Tabletop

Particle moving on a tabletop. There is a central for F(r)=krr^F(r)=kr\hat{r} directed towards the origin. Derive the Lagrange equation and expressions for effective potential, and time.


  • Solution
    1. Lagrange and Euler’s Equations:

    For a particle moving in a plane (two dimensions) and subject to a central force, it is better to use polar coordinates (r,θ)(r, \theta) about the origin. The kinetic energy is given by:

    T=12mv2=12m(r˙2+(rθ˙)2)T=\frac{1}{2}mv^2=\frac{1}{2}m(\dot{r}^2+(r\dot{\theta})^2)

    The Lagrange L=TUL=T-U is equal to:

    L=TU(r)=12m(r˙2+(rθ˙)2)U(r)L=T-U(r)=\frac{1}{2}m(\dot{r}^2+(r\dot{\theta})^2)-U(r)

    The generalized coordinates are rr and θ\theta. Notice that θ\theta is the cyclic coordinate since it is missing and only θ˙\dot{\theta} is present. Thus, there must be a conserved quantity. Using Euler’s equation, we know that:

    0=ddtLθ˙0=\frac{d}{dt}\frac{\partial L}{\partial \dot{\theta}}

    such that L/θ˙=k\partial L/\partial \dot{\theta}=k is equal to a constant. Using chain rule for multivaraible functions, the conserved is:

    pθ=Lθ˙=mr2θ˙p_\theta=\frac{\partial L}{\partial \dot\theta}=mr^2\dot\theta

    We recognize this as the angular momentum (The makes sense inutitively and theoretically. As shown in the previous section, the second term in Lagrange equation is equal to d/dt(L/θ˙)=mad/dt(\partial L/\partial \dot\theta)=ma and F=dp/dtF=dp/dt, so it is natural that L/θ˙\partial L/\partial \dot\theta  is some form of momentum).

    The Lagrange equations are (Notice that there are two independent variables/generalized coordinates, so we use variational calculus for several variables in chapter three The Variational Principle):

    Lr=ddtLr˙Lθ=ddtLθ˙\frac{\partial L}{\partial r}=\frac{d}{dt}\frac{\partial L}{\partial \dot{r}}\quad \frac{\partial L}{\partial \theta}=\frac{d}{dt}\frac{\partial L}{\partial \dot{\theta}}

    which becomes:

    m(rθ˙2)U(r)r=ddt(mr˙),0=ddtmr2θ˙m(r\dot\theta^2)-\frac{\partial U(r)}{\partial r} =\frac{d}{dt}(m\dot{r}), \quad 0=\frac{d}{dt}mr^2\dot\theta
    U(r)r=mr¨mrθ˙2,pθ=mr2θ˙-\frac{\partial U(r)}{\partial r}=m\ddot{r}-mr\dot\theta^2, \quad p_\theta=mr^2\dot\theta

    This is equal to:

    F(r)=mar=m(r¨rθ˙2),Fθ=m(rθ¨+2r˙θ˙)F(r)=ma_r=m(\ddot{r}-r\dot\theta^2), \quad F_\theta=m(r\ddot\theta+2\dot{r}\dot\theta)
    1. Newton’s Law and Lagrange Equations: 2nd Order DE Derivations

    Notice this is consistent with Newton’s second law, where the acceleration for an object in circular motion is equal to a=ar+aθ=(r¨rθ˙)r^+(r+θ¨+2r˙θ˙)θ^a=a_r+a_\theta=(\ddot r-r\dot\theta)\hat r+(r+\ddot\theta+2\dot{r}\dot{\theta})\hat{\theta}. Because pθ=mrθ˙2p_\theta=mr\dot\theta^2 is a conserved quantity, we can solved for θ˙\dot\theta, giving us:

    θ˙=pθmr2\dot\theta=\frac{p_\theta}{mr^2}

    Substituting the expression for θ˙\dot\theta into the Lagrange equation for U(r)/r-\partial U(r)/\partial r, we get:

    U(r)r=mr¨mr(pθmr2)2-\frac{\partial U(r)}{\partial r}=m\ddot{r}-m{r}(\frac{p_\theta}{mr^2})^2

    where the central force F(r)=U(r)/r=krF(r)=\partial U(r)/\partial r=-kr (This is shown in example 1.6 in chapter one Newtonian Mechanics). Then, the expression becomes:

    kr=mr¨mpθ2m2r3-kr=m\ddot{r}-\frac{mp_\theta^2}{m^2r^3}

    Rearranging the equation, we get:

    0=mr¨pθ2mr3+kr0=m\ddot{r}-\frac{p_\theta^2}{mr^3}+kr
    0=r¨pθ2m2r3+kmr0=\ddot{r}-\frac{p_\theta^2}{m^2r^3}+\frac{k}{m}r
    0=r¨pθ2m2r3+ω2r\boxed{0=\ddot{r}-\frac{p_\theta^2}{m^2r^3}+\omega^2 r}
    1. Effective Potential/Energy Conservation Derivation

    Rearranging the second order differential equation, mr¨m\ddot r is equal to:

    mr¨=pθ2mr3mω2r=F(r)m\ddot{r}=\frac{p_\theta^2}{mr^3}-m\omega^2 r=F(r)

    where F(r)=mr¨F(r)=m\ddot r is the central force directed towards the origin. Recall that effective potential UeffU_{eff} is defined as (Note that effective potential is NOT same as potential energy. It is defined to simplifies two dimensional motion into one dimension. For more details, please refer to the :

    Ueff=F(r)drU_{eff}=-\int F(r) dr

    Integrate F(r)F(r) alone the path for rr, UeffU_{eff} is equal to:

    Ueff=(pθ2mr3mkmr)dr=pθ22mr2+12kr2+CU_{eff}=-\int (\frac{p_\theta^2}{mr^3}-m\frac{k}{m} r) dr=\frac{p_\theta^2}{2mr^2}+\frac{1}{2}kr^2+C

    where CC is a constant. Then, the second first integral of motion is given by energy conservation in this one-dimensional system.

    E=K+Ueff(r)=12mr˙2+pθ22mr2+12kr2\boxed{E=K+U_{eff}(r)=\frac{1}{2}m\dot r^2+\frac{p_\theta^2}{2mr^2}+\frac{1}{2}kr^2}

    Note that KTK\ne T in the Lagrange equation. The kinetic energy KK includes the radial component only. This is because kinetic energy in tangential component in θ^\hat\theta direction is a part of the effective potential UeffU_{eff}, so that the motion is simplified from two dimensional into one dimensional.

    1. Time

      Rearranging the equation for energy EE, the expression becomes:

      E=12mr˙2+Ueff(r)E=\frac{1}{2}m\dot r^2+U_{eff}(r)

      Solving for r˙\dot r, we get:

      r˙=2EmUeff(r)\dot{r}=\sqrt{\frac{2E}{m}-U_{eff}(r)}

      Expressing r˙\dot r as a differential, we get:

      r˙=drdt\dot r=\frac{dr}{dt}

      Using separable integration, time tt is equal to:

      t=dt=2EmUeff(r)dr\boxed{t=\int dt=\int \sqrt{\frac{2E}{m}-U_{eff}(r)} dr}

Example 4.5: Spherical Pendulum

A ball of mass m swings on the end of an unstretchable string of length R in the presence of a uniform gravitational field g. This is often called the “spherical pendulum,” because the ball moves as though it were sliding on the frictionless surface of a spherical bowl. We aim to find its equations of motion.


  • Solution

    Before solving the problem, we recognize the constraint that the pendulum has a fixed radius of R. Then, the ball has two degrees of freedom:

    1. It can move horizontally around a vertical axis, corresponding to the azimuthal angle ϕ\phi.
    1. It can also move in the polar direction, described by the angle θ\theta.

    When finding equations of motion, we follow the below steps:

    1. Specify the position of an arbitrary point using Cartesian/Spherical/Cylindrical coordinates.
    1. Differentiate position s\vec{s} to find velocity v\vec{v}.
    1. Find kinetic energy TT and potential energy UU to get the Lagrange L=TUL=T-U.
    1. Apply Euler’s equation to LL to find equations of motion.
    1. First integrals of motion.

    STEP 1 Find s\vec{s}:

    Using spherical coordinates, the position of a point is specified by:

    s=(r,rθ,rsinθϕ)\vec{s}=(r,r\theta, r\sin\theta\phi)

    Given that radius r=Rr=R, the expression becomes:

    s=(R,Rθ,Rsinθϕ)\vec{s}=(R,R\theta, R\sin\theta\phi)

    STEP 2: Velocity

    Differentiating s\vec{s} with respect to time, velocity v\vec{v} is equal to:

    v=(0,Rθ˙,Rsinθϕ˙)\vec{v}=(0, R\dot\theta, R\sin\theta\dot\phi)

    where R˙=0\dot R=0 since RR is fixed (a constant).

    STEP 3: Lagrangian

    Using v\vec{v}, kinetic energy TT is equal to:

    T=12mv2=12mR2(θ˙2+sin2θϕ˙2)T=\frac{1}{2}mv^2=\frac{1}{2}mR^2(\dot\theta^2+\sin^2\theta\dot\phi^2)

    Potential energy UU is equal to:

    U=mgRcosθU=mgR\cos\theta

    The Lagrange L=TUL=T-U is equal to:

    L=TU=12mR2(θ˙2+sin2θϕ˙2)=mgRcosθL=T-U=\frac{1}{2}mR^2(\dot\theta^2+\sin^2\theta\dot\phi^2)=mgR\cos\theta

    STEP 4: Euler’s equation to find equations of motion

    Using Euler’s equation, we get:

    0=LθddtLθ˙,0=LϕddtLϕ˙0=\frac{\partial L}{\partial \theta}-\frac{d}{dt}\frac{\partial L}{\partial \dot\theta},\quad 0=\frac{\partial L}{\partial \phi}-\frac{d}{dt}\frac{\partial L}{\partial \dot\phi}

    STEP 5: First Integral of motion

    Because ϕ\phi is cyclic, we know that pϕp_\phi, the angular momentum, is conserved. Note that the expression for angular momentum pϕp_\phi is a first integral of motion..

    pϕ=mR2sin2θϕ˙=constantp_\phi=mR^2\sin^2\theta\dot\phi=\text{constant}

    Rearranging the Lagrange equation for θ\theta, we get:

    θ¨sinθcosθϕ˙2+gRsinθ=0\ddot\theta-\sin\theta\cos\theta\dot\phi^2+\frac{g}{R}\sin\theta=0

    Solving for ϕ˙\dot\phi using pϕp_\phi, the expression becomes:

    θ¨(pθmR2)2sinθcosθ+gRsinθ=0\ddot\theta-(\frac{p_\theta}{mR^2})^2\sin\theta\cos\theta+\frac{g}{R}\sin\theta=0

    The second first integral of motion is the expression for conservation of energy, where E=T+UE=T+U.

4.5: Systems of Particles

The last section considers the motion for a single particle only. The section studies the motion of a system of particles

Recall that the action for the system is defined as:

S[qk(t)]=tatbdtL(t,q1,q1,,q1˙,q2˙,)=tatbdtL(t,qk,qk˙)S[q_k(t)]=\int^{t_b}_{t_a} dt L(t, q_1, q_1, \cdots, \dot{q_1}, \dot{q_2}, \cdots)=\int^{t_b}_{t_a} dt L(t, q_k, \dot{q_k})

Consider a system of two particles confined in the horizontal direction and is moving alone a frictionless rail.

The Lagrange of the system is equal to:

L=TU=12m1x˙12+12m2x˙22U(x2x1)L=T-U=\frac{1}{2}m_1\dot x_1^2+\frac{1}{2}m_2\dot x_2^2-U(x_2-x_1)

where U(x2x1)U(x_2-x_1) is the potential energy between masses, describing the interaction between two particles. The action of the system is equal to:

S=dt(12m1x˙12+12m2x˙22U(x2x1))S=\int dt (\frac{1}{2}m_1\dot x_1^2+\frac{1}{2}m_2\dot x_2^2-U(x_2-x_1))

Notice that there are two generalized coordinates, x1x_1 and x2x_2, for the system. Using Euler’s equation, Lagrange equations are:

Lx1ddtLx˙1=0\frac{\partial L}{\partial x_1}-\frac{d}{dt}\frac{\partial L}{\partial \dot x_1}=0
Lx2ddtLx˙2=0\frac{\partial L}{\partial x_2}-\frac{d}{dt}\frac{\partial L}{\partial \dot x_2}=0

Using chain rule for multivariable functions, we get:

U(x2x1)x1(m1x¨1)=U(x)x1(m1x¨1)=0-\frac{\partial U(x_2-x_1)}{\partial x_1}-(m_1\ddot x_1)=-\frac{\partial U(x)}{\partial x_1}-(m_1\ddot x_1)=0

giving us:

m1x¨1=Ux1m_1\ddot x_1=-\frac{\partial U}{\partial x_1}

The expression for m2m_2 is:

U(x2x1)x2(m2x¨2)=Ux2(m2x¨2)=0-\frac{\partial U(x_2-x_1)}{\partial x_2}-(m_2\ddot x_2)=-\frac{\partial U}{\partial x_2}-(m_2\ddot x_2)=0

giving us:

m2x¨2=Ux2m_2\ddot x_2=-\frac{\partial U}{\partial x_2}

According to Newton’s third law, the force exerted by m1m_1 on m2m_2 is equal to the magnitude of the force exerted by m2m_2 on m1m_1.

💡
In multi-particle systems, we consider the total kinetic energy TT minus the total potential energy UU. Sometimes. particles give action-reaction pairs /x1=/x2\partial/\partial x_1=\partial/\partial x_2, come out free.

Because the total momentum of the system is conserved, the change in momentum Δp=dp/dt=0\Delta p=dp/dt=0, giving us:

ddt(m1x˙1+m2x˙2)=0\frac{d}{dt}(m_1\dot x_1+m_2\dot x_2)=0

💡
In a multiple-particle system, the total momentum must be conserved.

The new coordinates are center of mass, giving by:

Xm1x1+m2x2m1+m2=m1x1+m2x2MX\equiv\frac{m_1x_1+m_2x_2}{m_1+m_2}=\frac{m_1x_1+m_2x_2}{M}

Central Force, Reduced Mass, Energy

Let x=x2x1x=x_2-x_1. The Lagrange of the system is:

L=12MX˙2+12μx˙2U(x)\begin{equation} \boxed{L=\frac{1}{2}M\dot X^2+\frac{1}{2}\mu\dot x^2-U(x)} \end{equation}

where μ\mu is the reduced mass

μm1m2M\begin{equation} \mu\equiv\frac{m_1m_2}{M} \end{equation}

The corresponding momentum PP is equal to:

P=LX˙=M=˙m1x˙1+m2x˙2P=\frac{\partial L}{\partial \dot X}=M\dot = m_1\dot x_1+m_2\dot x_2

and is conserved.

Example: Pulley

A contraption of pulleys. We want to find the accelerations of all three weights. We assume that the three pulleys have negligible mass so they have negligible kinetic and potential energies.


  • Solution
    1. Lagrangian

    In order to write the Lagrange, we need to know the system’s kinetic and potential energies. Kinetic energy of the system is equal to:

    T=12m1y˙12+12m2y˙22+12MY˙2T=\frac{1}{2}m_1\dot y_1^2+\frac{1}{2}m_2\dot y_2^2+\frac{1}{2}M\dot Y^2
    1. Length Constraint

    Because there is only two degrees of freedom, we need to eliminate one variable in y˙1,y˙2\dot y_1, \dot y_2 and Y˙\dot Y. When solving problems involving pulley, one common technique is to use length constraint to relate length with acceleration to eliminate a variable. Because the total length of the string is fixed, we know that:

    (Hy1)+2(HY)+(Hy2)=4H2Yy2y1=constant=L(H-y_1)+2(H-Y)+(H-y_2)=4H-2Y-y_2-y_1=\text{constant}=L

    Differentiating the equation with respect to time tt, the expression is equal to:

    2Y˙y˙2y˙1=0-2\dot Y-\dot y_2-\dot y_1=0

    giving us:

    Y˙=12(y˙1+y˙2)\dot Y=-\frac{1}{2}(\dot y_1+\dot y_2)
    1. Substitution

    Substituting the expression for Y˙\dot Y into TT, we get:

    T=12m1y˙12+12m2y˙22+12M(˙12(y˙1+y˙2))2T=\frac{1}{2}m_1\dot y_1^2+\frac{1}{2}m_2\dot y_2^2+\frac{1}{2}M\dot (\frac{1}{2}(\dot y_1+\dot y_2))2

    Knowing the kinetic energy, we need to find potential energy UU, giving us:

    U=m1gy1+m2gy2+MgYU=m_1gy_1+m_2gy_2+MgY
    U=m1gy1+m2gy2Mg(y1+y22)+constantU=m_1gy_1+m_2gy_2-Mg(\frac{y_1+y_2}{2})+\text{constant}
    1. Euler’s equation

    The Lagrange is equal to:

    L=TU=12m1y˙12+12m2y˙22+12M(˙12(y˙1+y˙2))2m1gy1m2gy2+Mg(y1+y22)+constantL=T-U=\frac{1}{2}m_1\dot y_1^2+\frac{1}{2}m_2\dot y_2^2+\frac{1}{2}M\dot (\frac{1}{2}(\dot y_1+\dot y_2))2-m_1gy_1-m_2gy_2+Mg(\frac{y_1+y_2}{2})+\text{constant}

    Using Euler’s equation, we get:

    0=Ly1ddtLy˙1,0=Ly2ddtLy˙20=\frac{\partial L}{\partial y_1}-\frac{d}{dt}\frac{\partial L}{\partial \dot y_1}, \quad 0=\frac{\partial L}{\partial y_2}-\frac{d}{dt}\frac{\partial L}{\partial \dot y_2}

    Using chain rule, we get:

    m1y¨1+M4(y¨1+y¨2)=m1g+Mg2m_1\ddot y_1+\frac{M}{4}(\ddot y_1+\ddot y_2)=-m_1g+\frac{Mg}{2}
    m2y¨2+M4(y¨1+y¨2)=m2g+Mg2m_2\ddot y_2+\frac{M}{4}(\ddot y_1+\ddot y_2)=-m_2g+\frac{Mg}{2}
    1. Solving the system of equations

    Solving the system of equations, we get:

    y˙1=g+4m2gm1+m4m1m2/M\dot y_1=-g+\frac{-4m_2g}{m_1+m_4m_1m_2/M}
    y˙2=g+4m1gm1+m4m1m2/M\dot y_2=-g+\frac{-4m_1g}{m_1+m_4m_1m_2/M}
    Y˙=g2(m1+m2)gm1+m4m1m2/M\dot Y=g-\frac{2(m_1+m_2)g}{m_1+m_4m_1m_2/M}

Example: A block on a Inclined Plane

Let us return to the classic problem of a block sliding down a frictionless inclined plane, as in Example 4.2, except that we will make things a bit more interesting: now the inclined plane itself is allowed to move. Figure 4.11(a) shows the system. A block of mass mm rests on an inclined plane of mass MM: both the block and the inclined plane are free to move without friction. The plane’s angle is denoted by α\alpha. The problem is to find the acceleration of the block


  • Solution

    This is a classic problem. In the approach of Newton’s law, we would draw force diagrams and use the constraint of a fixed angle to solve the system of equations to find acceleration. In Hamilton’s mechanics, we will find the Lagrange L=TUL=T-U first.

    The first observation we need to make is that the plane is not fixed. As the block slides down, it exerts a force on the plane, causing the object to move leftward (the ground is frictionless or the force exerted by the block exceeds stative friction). Kinetic energy of the system the includes two components: the block and the plane.

    Define the coordinate system: Another thing we need to do before solving the problem is to define the coordinate system. Let XX be the horizontal distance slided by the plane, and xx and yy be the horizontal and vertical distances slide by block. The origin is shown in the figure.

    Kinetic energy of the system is:

    T=12M(X˙2+Y˙2)+12m(x˙2+y˙2)T=\frac{1}{2}M(\dot X^2+\dot Y^2)+\frac{1}{2}m(\dot x^2+\dot y^2)

    Because Y˙\dot Y is fixed, Y˙=0\dot Y=0. Then, TT us equal to (This makes sense and can be seen esaily as the plane moves in the horizontal only. The problem uses v2=X˙2+Y˙2v^2=\dot X^2+\dot Y^2 to show a more comprehensive approach):

    T=12MX˙2+12m(x˙2+y˙2)T=\frac{1}{2}M\dot X^2+\frac{1}{2}m(\dot x^2+\dot y^2)

    Potential energy is equal to:

    U=UplanemgyU=U_{plane}-mgy

    where UplaneU_{plane} is the plane’s gravitational potential energy, and the quantity remains unchanged.

    There are three variables X˙,x˙\dot X, \dot x and y˙\dot y in TT. Because the degree of freedom is two (The degree of freedom of two refer to XX and YY. We start with four coordinates, X˙,Y˙,x˙\dot X, \dot Y, \dot x, and y˙\dot y. After identifying two constraints: YY is fixed and x˙\dot x and y˙\dot y can be represented using DD and α\alpha, the degree of freedom is 2), we need to replace one of the variables. Using trigonometry

    x=X˙+Dcosα,y=Dsinαx=\dot X+D\cos\alpha, \quad y=-D\sin\alpha

    Differentiating expressions with respect to tt, we get

    x˙=X˙+D˙cosα,y˙=D˙sinα\dot x=\dot X+\dot D\cos\alpha, \quad \dot y=-\dot D\sin\alpha

    Substituting, we get:

    T=12MX˙2+12m((X˙+D˙cosα)2+(D˙sinα)2)T=\frac{1}{2}M\dot X^2+\frac{1}{2}m((\dot X+\dot D\cos\alpha)^2+(-\dot D\sin\alpha)^2)
    T=12MX˙2+12mX˙2+mX˙D˙cosα+12mD˙2cos2α+12mD˙2sin2αT=\frac{1}{2}M\dot X^2+\frac{1}{2}m\dot X^2+m\dot X\dot D\cos\alpha +\frac{1}{2}m\dot D^2\cos^2\alpha +\frac{1}{2}m\dot D^2\sin^2\alpha
    T=12MX˙2+12mX˙2+mX˙D˙cosα+12mD˙2T=\frac{1}{2}M\dot X^2+\frac{1}{2}m\dot X^2+m\dot X\dot D\cos\alpha +\frac{1}{2}m\dot D^2

    The Lagrangian is equal to:

    L=TU=12MX˙2+12mX˙2+mX˙D˙cosα+12mD˙2Uplane+mgDsinαL=T-U=\frac{1}{2}M\dot X^2+\frac{1}{2}m\dot X^2+m\dot X\dot D\cos\alpha +\frac{1}{2}m\dot D^2-U_{plane}+mgD\sin\alpha

    Using Euler’s equation, we get:

    0=LXddtLX˙,0=LDddtLD˙0=\frac{\partial L}{\partial X}-\frac{d}{dt}\frac{\partial L}{\partial \dot X}, \quad 0=\frac{\partial L}{\partial D}-\frac{d}{dt}\frac{\partial L}{\partial \dot D}

    Using Chain Rule, we get

    0=ddt(MX˙+mX˙+mD˙cosα)=MX¨+mX¨+mD¨cosα0=\frac{d}{dt}(M\dot X+m\dot X+m\dot D\cos\alpha)=M\ddot X+m\ddot X+m\ddot D\cos\alpha
    0=mgsinαddt(mX˙cosα+mD˙)=mgsinαmX¨cosα+mD¨0=mg\sin\alpha-\frac{d}{dt}(m\dot X\cos\alpha+m\dot D)=mg\sin\alpha-m\ddot X\cos\alpha+m\ddot D

    This gives us a system of equations

    0=(M+m)X¨+mD¨cosα0=(M+m)\ddot X+m\ddot D\cos\alpha
    mgsinα=mX¨cosα+mD¨mg\sin\alpha=m\ddot X\cos\alpha+m\ddot D

    Solving the system of equations, we get:

    X¨=mgcosαsinαM+msin2α\boxed{\ddot X=\frac{-mg\cos\alpha\sin\alpha}{M+m\sin^2\alpha}}
    D¨=(M+m)gsinαM+msin2α\boxed{\ddot D=\frac{(M+m)g\sin\alpha}{M+m\sin^2\alpha}}

    Then, x¨\ddot x and y¨\ddot y are equal to:

    x¨=mgcosαsinαM+msin2α+(M+m)gsinαM+msin2αcosα\ddot x=\frac{-mg\cos\alpha\sin\alpha}{M+m\sin^2\alpha}+\frac{(M+m)g\sin\alpha}{M+m\sin^2\alpha}\cos\alpha
    x¨=MgcosαsinαM+msin2α\boxed{\ddot x=\frac{Mg\cos\alpha\sin\alpha}{M+m\sin^2\alpha}}
    y¨=D¨cosα=(M+m)gsinαM+msin2αsinα\ddot y=-\ddot D\cos\alpha=-\frac{(M+m)g\sin\alpha}{M+m\sin^2\alpha}\sin\alpha
    y¨=(M+m)gsin2αM+msin2α\boxed{\ddot y=-\frac{(M+m)g\sin^2\alpha}{M+m\sin^2\alpha}}

4.6: Hamiltonian

Let the Lagrange be L=L(t,qk,q˙k)L=L(t, q_k, \dot q_k). Using chain rule to multi-variable functions, we differentiate LL with respect to time, giving us:

dLdt=Lt+Lqkdqkdt+Lq˙kdq˙kdt=Lt+Lqkq˙k+Lq˙kq¨k\frac{dL}{dt}=\frac{\partial L}{\partial t}+\frac{\partial L}{\partial q_k}\frac{dq_k}{dt}+\frac{\partial L}{\partial \dot q_k}\frac{d\dot q_k}{dt}=\frac{\partial L}{\partial t}+\frac{\partial L}{\partial q_k}\dot q_k+\frac{\partial L}{\partial \dot q_k}\ddot q_k
dLdt=Lt+Lqkq˙k+Lq˙kq¨k\frac{dL}{dt}=\frac{\partial L}{\partial t}+\frac{\partial L}{\partial q_k}\dot q_k+\frac{\partial L}{\partial \dot q_k}\ddot q_k

Using product rule for multi-variable functions, we recognize that:

ddt(q˙kLq˙k)=q¨kLq˙k+q˙kddt(Lq˙k)\frac{d}{dt}(\dot q_k\frac{\partial L}{\partial \dot q_k})=\ddot q_k\frac{\partial L}{\partial \dot q_k}+\dot q_k\frac{d}{dt}(\frac{\partial L}{\partial \dot q_k})

We notice that:

Ltddt(Lq˙kLq˙k)=0\frac{\partial L}{\partial t}-\frac{d}{dt}(L-\dot q_k \frac{\partial L}{\partial \dot q_k})=0

The Hamiltonian HH of a particle is defined as:

Hq˙kLq˙kL=q˙kpkL\begin{equation} \boxed{H\equiv \dot q_k\frac{\partial L}{\partial \dot q_k}-L =\dot q_kp_k-L} \end{equation}

where pk=L/q˙kp_k=\partial L/\partial \dot q_k. From the equation, we can see that:

Lt=dHdt\boxed{\frac{\partial L}{\partial t}=-\frac{dH}{dt}}

The result is interesting if LL is not an explicit function of time. For example, if L/t=0\partial L/\partial t=0, HH is equal to a constant and thus HH is conserved.

💡
If LL is not an explicit function of time, L/t=0\partial L/\partial t=0, so the Hamiltonian HH is conserved, giving us a first integral of motion.

Though the Hamiltonian seems to be an abstract quantity, it is closely related to energy. Suppose that a particle is free to move in three dimensions in a potential U(x,y,z)U(x, y, z) without constraints, and that we are using Cartesian coordinates. Momentums are px=mx˙,py=my˙p_x=m\dot x, p_y=m\dot y, and pz=mz˙p_z=m\dot z. Then, q˙kpk=m(x˙2+y˙2+z˙2)\sum \dot q_kp_k=m(\dot x^2+\dot y^2+\dot z^2). The Hamiltonian is equal to:

4.6.1: Interpretation of the Hamiltonian

H=q˙kpkL=m(x˙2+y˙2+z˙2)12m(x˙2+y˙2+z˙2)+UH=\dot q_kp_k-L=m(\dot x^2+\dot y^2+\dot z^2)-\frac{1}{2}m(\dot x^2+\dot y^2+\dot z^2)+U

This is equal to:

H=12m(x˙2+y˙2+z˙2)+U=EH=\frac{1}{2}m(\dot x^2+\dot y^2+\dot z^2)+U=E

where EE is the total energy of the system. In this example, the Hamiltonian HH represents the conserved quantity of E=T+UE=T+U. However, be aware that there are cases in which HEH\ne E, although often it is equal to E. In the next section, we will explain the precise conditions for which HEH\ne E.

💡
Is H always equal to E=T+UE = T + U? The answer is no, although very often it is. The precise conditions for which HEH\ne E are worked out in Section 4.7.

Example: Bead on a Rotating Parabolic Wire

Suppose we bend a wire into the shape of a vertically oriented parabola defined in cylindrical coordinates by z=αρ2z = \alpha\rho^2 , as illustrated in Figure 4.12: here zz is the vertical coordinate, and ρ\rho is the distance of a point on the wire from the vertical axis of symmetry. Using a synchronous motor, we can force the wire to spin at constant angular velocity ω\omega about its symmetry axis. Then we slip a bead of mass m onto the wire and we want to determine its equation of motion – assuming that it slides without friction along the wire.


  • Solution

    Given that we are using cylindrical coordinates, we know that positions are described by:

    position=s=(ρ,ρφ,z)\text{position}=s=(\rho, \rho\varphi, z)

    Differentiating each components with respect to tt, v2v^2 is equal to:

    v2=ρ˙2+ρ2φ˙2+(2αρρ˙)2v^2=\dot\rho^2+\rho^2\dot\varphi^2+(2\alpha\rho\dot\rho)^2

    Because the wire spins at a constant angular velocity ω\omega, angle φ\varphi is equal to:

    φ=ωt,andφ˙=ω\varphi=\omega t, \quad\text{and} \quad \dot\varphi=\omega

    Then, kinetic energy TT is equal to:

    T=12mv2=12m(ρ˙2+ρ2ω2+(2αρρ˙)2)=12m(ρ˙2(1+4α2ρ2)+ρ2ω2)T=\frac{1}{2}mv^2=\frac{1}{2}m(\dot\rho^2+\rho^2\omega^2+(2\alpha\rho\dot\rho)^2)=\frac{1}{2}m(\dot\rho^2(1+4\alpha^2\rho^2)+\rho^2\omega^2)

    The gravitational potential energy of the bead is equal to

    U=mgz=mgαρ2U=mgz=mg\alpha\rho^2

    The Lagrange L=TUL=T-U is equal to:

    L=TU=12m(ρ˙2(1+4α2ρ2)+ρ2ω2)mgαρ2L=T-U=\frac{1}{2}m(\dot\rho^2(1+4\alpha^2\rho^2)+\rho^2\omega^2)-mg\alpha\rho^2

    From the above expression, we can see that L=L(t,ρ˙,ρ)L=L(t, \dot\rho, \rho). Using Euler’s equation, the Lagrange equation is equal to:

    0=LρddtLρ˙=12m(ρ˙2(8α2ρ)+2ρω)2mgαρddt(m(1+4α2ρ2)ρ˙)0=\frac{\partial L}{\partial \rho}-\frac{d}{dt}\frac{\partial L}{\partial \dot\rho}=\frac{1}{2}m(\dot\rho^2(8\alpha^2\rho)+2\rho\omega)-2mg\alpha\rho-\frac{d}{dt}(m(1+4\alpha^2\rho^2)\dot\rho)

    Rearranging the equation, we get:

    0=(1+4α2ρ2)ρ¨+4α2ρρ˙2+(2gαω2)ρ0=(1+4\alpha^2\rho^2)\ddot\rho+4\alpha^2\rho\dot\rho^2+(2g\alpha-\omega^2)\rho

4.7: When is HeH\ne e

In the example from 4.6, the Hamiltonian HH is conserved and EE is not. The question becomes why are they different and why was HH conserved while EE was not?

Recall that the Hamiltonian is defined as

H=q˙kpkLH=\dot q_kp_k-L

where LL is the Lagrange and is equal to L=TUL=T-U. The expression becomes:

H=q˙kpkT+UH=\dot q_kp_k-T+U

Let r(qk,t)r(q_k, t) be the position vector is the particle from some arbitrary origin fixed in an inertial frame, represented using generalized coordinates qkq_k and time. The velocity of the partcile is:

v=r(qk,t)dt=rt+rqkq˙kv=\frac{r(q_k, t)}{dt}=\frac{\partial r}{\partial t}+\frac{\partial r}{\partial q_k}\dot q_k

The kinetic energy of the particle is:

T=12mv2=12mvvT=\frac{1}{2}mv^2=\frac{1}{2}mv\cdot v

The dot product of vvv\cdot v is equal to:

vv=(rt+rqlq˙l)(rt+rqmq˙m)v\cdot v=(\frac{\partial r}{\partial t}+\frac{\partial r}{\partial q_l}\dot q_l)\cdot(\frac{\partial r}{\partial t}+\frac{\partial r}{\partial q_m}\dot q_m)

H=Emdrdtrt=Eprt\begin{equation} H=E-m\frac{dr}{dt}\cdot\frac{\partial r}{\partial t}=E-p\cdot\frac{\partial r}{\partial t} \end{equation}

where pp is the momentum of the particle in the chosen inertial frame. From the equation, we can see that the Hamiltonian is equal to energy H=EH=E if r/t=0\partial r/\partial t=0. This occurs when there are no constraints of when any constraints are fixed in place (the particle is not moving/stationary). When constraints are moving, they generally depend on time, causing HEH\ne E.

4.9 Small Oscillations about Equilibrium

In general, many if not most mechanical systems can be accorded an energy of the form

constant×q˙k2+Ueff(qk)=E\text{constant}\times\dot q_k^2+U_{eff}(q_k)=E

Using Taylor expansion, the effective potential is equal to:

Ueff(q)=Ueff(q0)+dUeffdqq0(qq0)+dUeff2dq2q0(qq0)2+U_{eff}(q)=U_eff(q_0)+\frac{dU_{eff}}{dq}|_{q_0}(q-q_0)+\frac{dU^2_{eff}}{dq^2}|_{q_0}(q-q_0)^2+\cdots

At the equilibrium point, dUeff/dq=0{dU_{eff}}/{dq}=0, and the third term is in the form of 1/2keff(qq0)21/2k_{eff}(q-q_0)^2. We define the second derivative of the effective potential the effective spring constant.

keff=dUeff2dq2=Ueffk_{eff}=\frac{dU^2_{eff}}{dq^2}=U''_{eff}

Angular frequency ω\omega is equal to:

ω=keffm=Ueff\omega=\sqrt{\frac{k_{eff}}{m}}=\sqrt{U''_{eff}}

Example:

In Example 4.4 we considered a particle moving on a frictionless tabletop subject to a central Hooke’s-law spring force. There is an equilibrium radius for given energy and angular momentum for which the particle orbits in a circle of some radius r0. We now want to find the oscillation frequency ω for the mass about the equilibrium radius if it were perturbed slightly from this circular orbit.


  • Solution