Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The Lagrangian/Hamiltonian dynamics of a particle moving in a manifold

  1. Dec 29, 2009 #1

    I am trying to work through the solution to the attached problem (see attachments). Now, I can't understand several things in the solution:

    The Lagrangian in question is:


    1)is [tex]g_{ij}[/tex] a matrix with diag(-1,1,1,1), ie. the metric tensor? If so, why has it been labelled [tex]g_{ij}(x)[/tex], ie. a function of x? Is Einstein's summation convention implied in the Lagrangian?

    2)Why is the momentum:


    ...surely there is a factor of a 1/2 missing (is the answer quoted in the solutions just wrong?)

    3)The bit in the solution, where he says [tex]{\delta}A=0[/tex], I think he is just setting the following expression to zero:

    [tex]{\delta}A=\int{dt[{\frac{{\partial}L}{{\partial}{x^{i}}}dx^{i}+\frac{{\partial}L}{{\partial}\dot{x^{i}}}d{\dot{x^{i}}]}=0[/tex] (from the theory of functionals)

    what I don't understand is, why he is saying that:


    -where has the 'k' come from?

    and why is it that


    equals the expression two lines below it?

    As ever, any help would be much appreciated:)

    Attached Files:

    Last edited: Dec 29, 2009
  2. jcsd
  3. Dec 29, 2009 #2

    George Jones

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    Let start with 1) and 2).
    I'm not sure what manifold is being used, but assume it is Minkowski spacetime. The coordinate system used doesn't have to be a standard Cartesian inertial coordinate system. What do the components the metric for special relativity look like when spherical coordinates are used?
    No. Show why you think there is a factor of 1/2 missing. (I think I already know what you did, but I want you to show it.)
  4. Dec 30, 2009 #3
    Thanks for the reply George.

    Interesting question - I am not too sure about this but I suspect the metric would look exactly the same as we require:

    [tex]cdt^{2}-dr^{2}+d{{\phi}^{2}}+d{{\theta}^{2}}=0[/tex], ofcourse, 't' also being a co-ordinate in space-time.



    So the get the momentum, we just differentiate wrt [tex]{\dot{x}}^{i}[/tex], holding all other variables constant. There is an [tex]{\dot{x}}^{i}[/tex], which just dissappears from the Lagrangian. So the the Lagrangian is pretty much unchanged (so the 1/2 should be there?).

  5. Dec 30, 2009 #4

    George Jones

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    This seem reasonable, but, take a look at


    This can be seen geometrically as well.
    But if you differentiate with respect to [itex]\dot{x}^i[/itex], then the repeated index [itex]i[/itex] appears three times, while the Einstein convention allows only for indices that appear once or twice in a term. For differentiation in this situation, use an index that has not yet appeared, for example, differentiate with respect [itex]\dot{x}^k[/itex]. Don't forget to use the product rule, as it is the product rule that makes the factor of 1/2 disappear.

    What do you get when you evaluate

    [tex]\frac{d \dot{x}^i}{d \dot{x}^k}?[/tex]
    Last edited: Dec 30, 2009
  6. Dec 30, 2009 #5
    I see.

    If I differentiate wrt [tex]\dot{x}^k[/tex], I get

    [tex]\frac{{\delta}L}{d \dot{x}^k}=\frac{m}{2}g_{ij}[\frac{d \dot{x}^i}{d \dot{x}^k}{\dot{x}^j+\frac{d \dot{x}^j}{d \dot{x}^k}{\dot{x}^i][/tex]

    This is equal to:


    which equals:

    [tex]\frac{m}{2}g_{ij}\dot{x}^{j} [/tex] if k=i


    [tex]\frac{m}{2}g_{ij}{\dot{x}{^{i} [/tex] if k=j

    So the factor of 1/2 doesn't cancel as such. Where I am going wrong?
    Last edited: Dec 31, 2009
  7. Dec 30, 2009 #6
    And another question: by the summation convention, is the Lagrangian:




  8. Jan 1, 2010 #7
    Hi George...

    Hi was wondering if you had any thoughts about where I am going wrong in relation to the factor of half? I am very anxious to know!

  9. Jan 3, 2010 #8


    User Avatar
    Homework Helper

    Yes, that's what the summation convention is: any index which occurs once as a superscript and once as a subscript is implicitly summed over. Sometimes people use a "relaxed" summation convention in which any index that occurs twice, even when they're both subscripts or both superscripts, is implicitly summed over, but that's not all that common and it has the potential to be more confusing.
    Remember, though, that i and j are repeated indices and are thus being summed over. So the case k = i corresponds to exactly one term in the sum over i, and the case k = j corresponds to exactly one term in the sum over j. It's not an either/or situation; both of those terms,
    occur exactly once, so the result is the sum of both.

    Here's a better, less hand-wavy way of looking at it: you have
    [tex]\frac{m}{2}g_{ij}\bigl[\delta^i_k \dot{x}^j + \delta^j_k \dot{x}^i\bigr][/tex]
    (I fixed the index positioning on your delta tensors) Splitting this up into two terms, you get
    [tex]\frac{m}{2}g_{ij}\delta^i_k \dot{x}^j + \frac{m}{2}g_{ij}\delta^j_k \dot{x}^i[/tex]
    which is equal to
    [tex]\frac{m}{2}g_{kj} \dot{x}^j + \frac{m}{2}g_{ik} \dot{x}^i[/tex]
    Now, in one of these terms (doesn't matter which) you can (a) switch the order of indices in the metric, since it's a symmetric tensor, and (b) relabel the repeated index, either i or j. If I do this in the second term, I get
    [tex]\frac{m}{2}g_{kj} \dot{x}^j + \frac{m}{2}g_{kj} \dot{x}^j = mg_{kj} \dot{x}^j[/tex]
  10. Jan 3, 2010 #9


    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper
    Education Advisor

    From the other thread:
    The matrix diag(-1,1,1,1,1,...) is a representation of the Minkowski space metric in its natural basis. If you were to use a different set of coordinates, e.g. spherical, or you were looking at a different manifold, you'd have a different matrix, one that could have elements that are functions of the coordinates. Generally speaking, the matrix elements are functions of the coordinates.

    In the second part of the problem (in the PDF), for example, the manifold is a 2-sphere, and [tex]g_{ij} = diag(1, sin^2 \phi)[/tex].
  11. Jan 4, 2010 #10
    Fantastic - I didn't realise you could do this but it makes perfect sense. Thanks again diazona.

    Aah this is what George alluded to above, but I didn't put two and two together - thanks vela.

    The issue now is to show why this is the case:

    \frac{m}{2} {\partial}_i g_{jk} \dot{x}^{j}\dot{x}^{k} - ({\partial}_k g_{ij}) \dot{x}^{k}\dot{x}^{j}

    I can not see how you can differentiate an expression with respect to a variable which isn't even in the expression? (x and x(dot) are independent variables in the Lagrangian formulation).
  12. Jan 4, 2010 #11


    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper
    Education Advisor

    Look at the way you wrote the Lagrangian the very first time in your first post. [tex]x_i[/tex] appears via the metric.
  13. Jan 4, 2010 #12
    Oh okay. So it is a function of x^i.

    In which case, I do understand where the first term comes from, but since the velocities are independent of the position, I don't see where the second term comes from, and why it is negative. Can you shed any light on this?

    (And, I don't want to go off on a tangent, but what does it mean to differentiate a matrix, do we literally differentiate each of the components of it - or has the matrix been converted into an expression somehow? I know that question is probably really stupid, so sorry for asking it!)
  14. Jan 6, 2010 #13
    I am unashamedly bumping this thread (I'm not normally so obsessed with Lagrangians believe it or not(!) - it's just that I have an exam coming up quite soon!)

    Thanks to the helpful contributors in this thread, I understand that the metric [tex]g_{ij}[/tex] is a function of position, and thus can be differentiated wrt a position coordinate. This explains the first term in the expression below, but not the second one:

    \frac{m}{2} \frac{\partial}{dx_i} g_{jk} \dot{x}^{j}\dot{x}^{k} - (\frac{\partial}{dx_k} g_{ij}) \dot{x}^{k}\dot{x}^{j}

    As a reminder, the Lagrangian in question is:

    L={\frac{m}{2}}{g_{ij}(x)}.{\dot{x^{i}}{\dot{x^{j} }

    In particular, what is going on with the indices?

    I'm guessing I can't see something quite obvious...
    Last edited: Jan 6, 2010
  15. Jan 8, 2010 #14


    User Avatar
    Homework Helper

    OK, so in summary: your Lagrangian is
    [tex]L = \frac{m}{2}g_{ij}(x) \dot{x}^i \dot{x}^j[/tex]
    and you need to show that
    [tex]\frac{\partial L}{\partial x^i} = \frac{m}{2}\partial_i g_{jk} \dot{x}^j \dot{x}^k - \frac{m}{2}(\partial_k g_{ij})\dot{x}^k \dot{x}^j[/tex]
    I'm guessing you just forgot to write the [itex]\frac{m}{2}[/itex] in the last term, it has to be there for unit consistency... anyway, just making sure I've got the problem straight. Having these two separate threads is confusing.

    Now that I look at it, I don't think that second term should be there at all. If we relabel the i index in the Lagrangian to k, so
    [tex]L = \frac{m}{2}g_{kj}(x) \dot{x}^k \dot{x}^j[/tex]
    and differentiate with respect to [itex]x^i[/itex],
    [tex]\frac{\partial L}{\partial x^i} = \frac{m}{2}\frac{\partial}{\partial x^i}\bigl[g_{kj}(x) \dot{x}^k \dot{x}^j\bigr][/tex]
    I can write this out component-by-component, for example in 2D space:
    [tex]\frac{\partial L}{\partial x^0} = \frac{m}{2}\frac{\partial}{\partial x^0}\bigl[g_{00}(x) \dot{x}^0 \dot{x}^0 + g_{01}(x) \dot{x}^0 \dot{x}^1 + g_{10}(x) \dot{x}^1 \dot{x}^0 + g_{11}(x) \dot{x}^1 \dot{x}^1\bigr][/tex]
    and similarly for the other component of the derivative.

    Now switch to the other expression, the answer you're looking for. That can be written
    [tex]\frac{\partial L}{\partial x^i} = \frac{m}{2}\frac{\partial}{\partial x^i}\bigl[g_{jk} \dot{x}^j \dot{x}^k\bigr] - \frac{m}{2}\frac{\partial g_{ij}}{\partial x^k}\dot{x}^k \dot{x}^j[/tex]
    and again, I can write it out in full components ([itex]x^0[/itex] only),
    [tex]\frac{\partial L}{\partial x^0} = \frac{m}{2}\frac{\partial}{\partial x^0}\bigl[g_{00}(x) \dot{x}^0 \dot{x}^0 + g_{01}(x) \dot{x}^0 \dot{x}^1 + g_{10}(x) \dot{x}^1 \dot{x}^0 + g_{11}(x) \dot{x}^1 \dot{x}^1\bigr] - \frac{m}{2}\biggl[\frac{\partial g_{00}(x)}{\partial x^0} \dot{x}^0 \dot{x}^0 + \frac{\partial g_{01}(x)}{\partial x^0} \dot{x}^0 \dot{x}^1 + \frac{\partial g_{00}(x)}{\partial x^1} \dot{x}^1 \dot{x}^0 + \frac{\partial g_{01}(x)}{\partial x^1} \dot{x}^1 \dot{x}^1\biggr][/tex]
    For one thing, this expression has derivatives with respect to [itex]x^1[/itex] which aren't present in the other expression above. That means it definitely can't be true for a general metric - for example, it looks like
    [tex]g_{ij} = \begin{pmatrix}\bigl(x^1/a\bigr)^2 & 0 \\ 0 & 1\end{pmatrix}[/tex]
    would be a counterexample. And besides, the expansion of the first term is identical to the expansion of the derivative of the Lagrangian, from above. I really don't see any reason for the mysterious second term to be there, and it's hard to miss things when you write out all the components.

    Where did that expected answer come from, anyway?
  16. Jan 8, 2010 #15


    User Avatar
    Homework Helper

    Generally speaking, yeah, you just differentiate each component. It all follows from the definition of the derivative. For a matrix A that is a function of x,
    [tex]\frac{\mathrm{d}A}{\mathrm{d}x} = \lim_{\epsilon\to 0}\frac{A(x + \epsilon) - A(x)}{\epsilon}[/tex]
    (I'm sure you know this) This definition involves only linear operations, i.e. addition, subtraction, and multiplication or division by scalars, so the derivative is a linear operator as well. And to apply any linear operator to a matrix, you just apply it to each element.

    Things get a little messier in general relativity (or differential geometry), because the subtraction is no longer necessarily a linear operator. That's because [itex]A(x + \epsilon)[/itex] and [itex]A(x)[/itex] are defined at different points in space, so they're no longer part of the same vector space, and you have to specify a mapping between the vector space of matrices at [itex]x + \epsilon[/itex] and the vector space of matrices at [itex]x[/itex] in order to be able to subtract them.

    (That's not what's going on in your Lagrangian problem, is it?)
  17. Jan 8, 2010 #16
    Thanks again for the replies diazona..

    Yes, your penultimate post makes it very clear that the second term should not be there!

    Perhaps I should state the problem in full. What I don't understand is why this:

    [tex]\frac{d}{dt} (mg_{ij}\dot{x}^j ) - \frac{1}{2}m \frac{\partial}{\partial x^i}(g_{kj})\dot{x}^k \dot{x}^j =0 [/tex]

    implies this:

    [tex]{\partial}_k g_{ij} \dot{x}^k \dot{x}^j + g_{ij} \ddot{x}^j - \frac{1}{2} {\partial}_i g_{jk} \dot{x}^j \dot{x}^k=0[/tex]

    (It's something my lecturer wrote down on the blackboard, there is a possibility I might have copied it down incorrectly, but this is unlikely)

    As regards where

    \frac{\partial L}{\partial x^i} = \frac{m}{2}\partial_i g_{jk} \dot{x}^j \dot{x}^k - \frac{m}{2}(\partial_k g_{ij})\dot{x}^k \dot{x}^j

    came from.

    I assumed that [tex]\frac{d}{dt} (mg_{ij}\dot{x}^j )[/tex] is just equal to the [tex]mg_{ij} \ddot{x}^j[/tex] term in the second expression. So if we get rid of both these equal terms we are left with:

    [tex]- \frac{1}{2} \frac{\partial}{\partial x^i}(g_{kj})\dot{x}^k \dot{x}^j = {\partial}_k g_{ij} \dot{x}^k \dot{x}^j - \frac{1}{2} {\partial}_i g_{jk} \dot{x}^j \dot{x}^k[/tex]

    Although it seems a trivial step to me, perhaps I was wrong to do this?

    Last edited: Jan 8, 2010
  18. Jan 8, 2010 #17


    User Avatar
    Homework Helper

    Aha :wink: Yeah, it was that assumption that messed you up. Metrics in general can be time dependent, so
    [tex]\frac{\mathrm{d}}{\mathrm{d}t}\bigl[g_{ij}\dot{x}^j\bigr] = \frac{\mathrm{d}g_{ij}}{\mathrm{d}t}\dot{x}^j + g_{ij}\ddot{x}^j = \frac{\partial g_{ij}}{\partial x^k}\dot{x}^k\dot{x}^j + g_{ij}\ddot{x}^j[/tex]
    (the last equality follows from the chain rule)
  19. Jan 8, 2010 #18
    Fantastic! I can't believe I spent so many hours on something as trivial as this!

    Thanks for all your help diazona!!
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook