1. Limited time only! Sign up for a free 30min personal 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!

Homework Help: How to get lagragean when hamiltonian is given

  1. Aug 18, 2011 #1
    hai everyone,

    the question is " the hamiltonian of a particle is H = [(p*p)/2m + pq] where q is the generalised coordinate and p is the corresponding canonical momentum. the lagragean is .................?

    i know that H = p(dq/dt) - L. but the answer should not contain p. how can i solve it? answer is (m/2)(dq/dt - q)2
  2. jcsd
  3. Aug 18, 2011 #2


    User Avatar
    Homework Helper
    Gold Member

    Remember Hamilton's equations, specifically:

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

    Use this to get an expression for [itex]p[/itex] in terms of [itex]\dot{q}[/itex].
  4. Aug 18, 2011 #3


    User Avatar
    Science Advisor
    Gold Member
    2017 Award

    You've given the answer yourself, already: You calculate the Lagrangian,

    [tex]L=\dot{q} p -H[/tex]

    and express [itex]p[/itex] via [itex]\dot{q}[/itex], where

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

    In your case you get

    [tex]\dot{q}=\frac{p}{m}+q \; \Rightarrow \; p=m(\dot{q}-q).[/tex]


    [tex]L=\dot{q} p-\frac{p^2}{2m}-p q
    =m \dot{q} (\dot{q}-q) - \frac{m}{2} (\dot{q}-q)^2 - m q(\dot{q}-q).[/tex]

    A bit simplified this gives

    [tex]L=\frac{m}{2} (\dot{q}-q)^2.[/tex]
  5. Aug 18, 2011 #4
    thank u sir!!!
  6. Aug 19, 2011 #5
    An important point here is that the Lagrangian is always a function of q, dq/dt, and time, whereas the Hamiltonian is always a function of q, p and time. So to get from the Hamiltonian to the Lagrangian we must get rid of p, and to get from the Lagrangian to the Hamiltonian we must get rid of dq/dt
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook