1. Not finding help here? Sign up for a free 30min tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Hamiltonian -> Lagrangian

  1. Dec 9, 2006 #1
    Consider the time-dependent Hamiltonian

    [tex]H(q,p;t) = \frac{p^2}{2m \sin^2{(\omega t})} - \omega pq \cot{(\omega t)} - \frac{m}{2} \omega^2 \sin^2{(\omega t)} q^2[/tex]

    with constant m and [tex]\omega[/tex].
    Find a corresponding Lagrangian [tex]L = L(q,\dot{q};t)[/tex]

    Ok, I know that the Hamiltonian is given by

    [tex]H(q,p;t) = \dot{q}p - L(q, \dot{q};t)[/tex]


    [tex]p = \frac{\partial L}{\partial \dot{q}}[/tex]

    Is it as easy as

    [tex]L(q, \dot{q};t) =\dot{q}p - H(q,p;t)[/tex]?

    And how do I get rid of the p's?
  2. jcsd
  3. Dec 9, 2006 #2
    Since [tex]p = \frac{\partial L}{\partial \dot{q}}[/tex] you can substitute [tex]p[/tex] in [tex]L(q, \dot{q};t) =\dot{q}p - H(q,p;t)[/tex] and solve the differential equation.
  4. Dec 9, 2006 #3
    Yeah, nice equation.. Any tip on how to solve it?
  5. Dec 10, 2006 #4
    I still need help... Anyone?
  6. Dec 10, 2006 #5

    Physics Monkey

    User Avatar
    Science Advisor
    Homework Helper

    You have a Hamiltonian H which is a function of q and p: H(q,p). From the Hamilton equations of motion you have that [tex] \dot{q} = \frac{\partial H(q,p)}{\partial p} [/tex]. Now think about this equation for a minute, it gives you a formula for [tex]\dot{q}[/tex] in terms of q and p. But if you rearrange the equation by solving for p, it gives you a formula for p in terms q and [tex] \dot{q}[/tex]. This is what you want! To see why form the object the [tex] p\dot{q} - H(q,p) [/tex] which is almost but not quite the Lagrangian. To make this quantity into the true Lagrangian you should substitute your formula for p in terms of q and [tex] \dot{q} [/tex] into this expression. This is the important step because you know the Lagrangian is a function of q and [tex] \dot{q} [/tex], not q and p.
  7. Dec 10, 2006 #6
    Ok, then I get the Lagrangian

    [tex]L = m \sin^2{(\omega t)} \left[ \left( \dot{q} + \omega t \cot{(\omega t)} \right) \left( \frac{1}{2} \dot{q} + \omega cot{(\omega t)} (1 - \frac{1}{2}q) \right) + \frac{1}{2} \omega^2 q^2 \right] [/tex]

    Now my mission is to "obtain, by choosing a suitable new coordinate, an equivalent time-independent Lagrangian [tex]\tilde{L}[/tex]".
    How is this supposed to be done?
  8. Dec 10, 2006 #7


    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    I don't know if this can help you, but a Lagrangian L and L' are equivalent (generate the same dynamics) if they differ by a total derivative to time of a function of q and t only:
    [tex] L' = L + \frac{d F(q_i,t)}{dt}[/tex]

    I didn't check, but maybe you can get all the time depedence into that form...
  9. Dec 10, 2006 #8
    I don't think that's what I'm supposed to do here. Referring to "by choosing a new coordinate"...
  10. Dec 10, 2006 #9
    There are time-dependence in every term so that is not a possibility.. =/
  11. Dec 10, 2006 #10

    Physics Monkey

    User Avatar
    Science Advisor
    Homework Helper


    The first thing you should do is check your algebra. The Lagrangian you've displayed in post 6 contains a (1-q/2) which doesn't make sense because q has units. When you get the Lagrangian right the situation will look better.
  12. Dec 10, 2006 #11
    Ok, I forgot a q so my correct Lagrangian is

    [tex]L = m \sin^2{(\omega t)} \left[ \frac{\dot{q}^2}{2} + \omega q \dot{q} \cot{(\omega t)} + \frac{1}{2} \omega^2 q^2 (1 + \cot^2{(\omega t)} ) \right][/tex]

    but there is still a time dependence in every term so writing it as

    [tex]L = \tilde{L} + \frac{dF(q,t)}{dt}[/tex]

    will be hard..? Or?
  13. Dec 10, 2006 #12

    Physics Monkey

    User Avatar
    Science Advisor
    Homework Helper

    Ok, your Lagrangian looks good now. At this point I think there is a fairly straightforward guess you can make as to what your new coordinate should be. To make it even more clear, you might try completing the square for qdot.

    PS The L' = L + df/dt thing isn't really important for this problem.
  14. Dec 11, 2006 #13
    Completing the square?
  15. Dec 11, 2006 #14
    Completing the square

    \alpha x^2 + \beta x + \gamma &= \alpha\left[ x^2 + \frac{\beta}{\alpha} x + \frac{\gamma}{\alpha}\right] \\
    &= \alpha\left[ (x + \frac{\beta}{2 \alpha})^2 + (\frac{\gamma}{\alpha}-\frac{\beta^2}{4 \alpha^2}) \right]

    It looks a lot neater if we take [itex]\alpha=1[/itex]:

    x^2 + \beta x + \gamma = (x + \beta /2)^2 + (\gamma-\beta^2/4)
    Last edited: Dec 11, 2006
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?

Similar Discussions: Hamiltonian -> Lagrangian
  1. The Hamiltonian (Replies: 9)

  2. Hamiltonian Question (Replies: 1)