Why does the Hamiltonian represent something different after plugging in the solution?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
2
down vote

favorite












so I am beginning to learn Hamiltonian mechanics. We have learned that the Hamiltonian is a function of q, p, and t. Once we have a Hamiltonian, we can use the Hamiltonian equations to derive the equations of motion. Say we have the Hamiltonian of a particle in a gravitational field:




$H = p^2/2m + mgy$




I can solve this and it will give me, using Hamiltons equations:




$dotp = -mg$



$doty = p/m$




If I solve this out, I get that (up to a constant)




$y = -gt^2/2$




Now, lets say that someone arbitrarily gives me the Hamiltonian




$H = p^2/2m - m g^2 t^2 /2$




If I use Hamiltons equations on this Hamiltonian, my equations are totally different (because there is no y dependence, we have $dotp = 0$). How can I change Hamilton's equations to give me back the same equations of motion? All I have done in the second case is plugged in a solution for y(t), why does it mess everything up?



Going a bit further, if I have a Hamiltonian with some explicit t dependence, how do I know whether I need to write that time dependence in terms of $q$ or $p$ or whether I can leave it as is? Because in the second Hamiltonian above, if I recognized that the second term could be written as $mgy$, then I could solve it with Hamiltons equations normally.



My professor said that the second Hamiltonian is totally different from the first one, and I don't really understand how they are, it seems to me that they should describe the same motion.










share|cite|improve this question



























    up vote
    2
    down vote

    favorite












    so I am beginning to learn Hamiltonian mechanics. We have learned that the Hamiltonian is a function of q, p, and t. Once we have a Hamiltonian, we can use the Hamiltonian equations to derive the equations of motion. Say we have the Hamiltonian of a particle in a gravitational field:




    $H = p^2/2m + mgy$




    I can solve this and it will give me, using Hamiltons equations:




    $dotp = -mg$



    $doty = p/m$




    If I solve this out, I get that (up to a constant)




    $y = -gt^2/2$




    Now, lets say that someone arbitrarily gives me the Hamiltonian




    $H = p^2/2m - m g^2 t^2 /2$




    If I use Hamiltons equations on this Hamiltonian, my equations are totally different (because there is no y dependence, we have $dotp = 0$). How can I change Hamilton's equations to give me back the same equations of motion? All I have done in the second case is plugged in a solution for y(t), why does it mess everything up?



    Going a bit further, if I have a Hamiltonian with some explicit t dependence, how do I know whether I need to write that time dependence in terms of $q$ or $p$ or whether I can leave it as is? Because in the second Hamiltonian above, if I recognized that the second term could be written as $mgy$, then I could solve it with Hamiltons equations normally.



    My professor said that the second Hamiltonian is totally different from the first one, and I don't really understand how they are, it seems to me that they should describe the same motion.










    share|cite|improve this question

























      up vote
      2
      down vote

      favorite









      up vote
      2
      down vote

      favorite











      so I am beginning to learn Hamiltonian mechanics. We have learned that the Hamiltonian is a function of q, p, and t. Once we have a Hamiltonian, we can use the Hamiltonian equations to derive the equations of motion. Say we have the Hamiltonian of a particle in a gravitational field:




      $H = p^2/2m + mgy$




      I can solve this and it will give me, using Hamiltons equations:




      $dotp = -mg$



      $doty = p/m$




      If I solve this out, I get that (up to a constant)




      $y = -gt^2/2$




      Now, lets say that someone arbitrarily gives me the Hamiltonian




      $H = p^2/2m - m g^2 t^2 /2$




      If I use Hamiltons equations on this Hamiltonian, my equations are totally different (because there is no y dependence, we have $dotp = 0$). How can I change Hamilton's equations to give me back the same equations of motion? All I have done in the second case is plugged in a solution for y(t), why does it mess everything up?



      Going a bit further, if I have a Hamiltonian with some explicit t dependence, how do I know whether I need to write that time dependence in terms of $q$ or $p$ or whether I can leave it as is? Because in the second Hamiltonian above, if I recognized that the second term could be written as $mgy$, then I could solve it with Hamiltons equations normally.



      My professor said that the second Hamiltonian is totally different from the first one, and I don't really understand how they are, it seems to me that they should describe the same motion.










      share|cite|improve this question















      so I am beginning to learn Hamiltonian mechanics. We have learned that the Hamiltonian is a function of q, p, and t. Once we have a Hamiltonian, we can use the Hamiltonian equations to derive the equations of motion. Say we have the Hamiltonian of a particle in a gravitational field:




      $H = p^2/2m + mgy$




      I can solve this and it will give me, using Hamiltons equations:




      $dotp = -mg$



      $doty = p/m$




      If I solve this out, I get that (up to a constant)




      $y = -gt^2/2$




      Now, lets say that someone arbitrarily gives me the Hamiltonian




      $H = p^2/2m - m g^2 t^2 /2$




      If I use Hamiltons equations on this Hamiltonian, my equations are totally different (because there is no y dependence, we have $dotp = 0$). How can I change Hamilton's equations to give me back the same equations of motion? All I have done in the second case is plugged in a solution for y(t), why does it mess everything up?



      Going a bit further, if I have a Hamiltonian with some explicit t dependence, how do I know whether I need to write that time dependence in terms of $q$ or $p$ or whether I can leave it as is? Because in the second Hamiltonian above, if I recognized that the second term could be written as $mgy$, then I could solve it with Hamiltons equations normally.



      My professor said that the second Hamiltonian is totally different from the first one, and I don't really understand how they are, it seems to me that they should describe the same motion.







      lagrangian-formalism hamiltonian-formalism hamiltonian






      share|cite|improve this question















      share|cite|improve this question













      share|cite|improve this question




      share|cite|improve this question








      edited Sep 27 at 23:53









      knzhou

      36.4k9102174




      36.4k9102174










      asked Sep 27 at 23:41









      Zach

      133




      133




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          4
          down vote



          accepted










          You might think that nothing should change if you plug $x(t)$ and $p(t)$ back into the Hamiltonian, because the Hamiltonian is a number, equal to the total energy.



          That's not the right way of thinking about it. You should think of the Hamiltonian as a function $H(x, p)$ whose structure tells you how $x$ and $p$ change in time. For each solution $(x(t), p(t))$ of these equations, the number $H(x(t), p(t))$ is independent of time, and is equal to the energy.



          To take it a bit further, for any Hamiltonian without explicit time dependence, the energy is conserved. So if you really allowed yourself to plug in solutions, you could replace every single such Hamiltonian with a constant. A single constant (like "$3 textJoules$") clearly isn't enough to say how a physical system behaves.



          For Hamiltonians with explicit time dependence, we have a function $H(x, p, t)$, which give you Hamilton's equations as usual. This time dependence has nothing to do with the time dependence in a particular solution, $H(x(t), p(t), t)$, they mean completely different things.






          share|cite|improve this answer




















          • Thank you for the help! This made me wonder, what sort of functions H qualify as "Hamiltonians?" Can any function be treater as if it were a Hamiltonian, and it would jus be describing a particular model? Or is there some fundamental requirement a function must satisfy in order for it to be allowed to be treated as a Hamiltonian? The reason I ask is, in condensed matter I know you can come up with a Hamiltonian which you believe to approximately model a physics situation, so it could be essentially be anything. Does this mean any function can be treated as a Hamiltonian?
            – Zach
            Sep 28 at 20:41










          • @Zach That’s too vague of a question to answer. “Money can have any value. Does this mean I can treat any number as the amount in my bank account?” I’m sure you could, not sure if anyone would cash your checks.
            – knzhou
            Sep 28 at 20:44










          • @Zach But, plenty of Hamiltonians are physically unacceptable for structural reasons, such as leading to an explosion of infinite energy when they are not bounded below.
            – knzhou
            Sep 28 at 20:45











          Your Answer




          StackExchange.ifUsing("editor", function ()
          return StackExchange.using("mathjaxEditing", function ()
          StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix)
          StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
          );
          );
          , "mathjax-editing");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "151"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: false,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          noCode: true, onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fphysics.stackexchange.com%2fquestions%2f431212%2fwhy-does-the-hamiltonian-represent-something-different-after-plugging-in-the-sol%23new-answer', 'question_page');

          );

          Post as a guest






























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          4
          down vote



          accepted










          You might think that nothing should change if you plug $x(t)$ and $p(t)$ back into the Hamiltonian, because the Hamiltonian is a number, equal to the total energy.



          That's not the right way of thinking about it. You should think of the Hamiltonian as a function $H(x, p)$ whose structure tells you how $x$ and $p$ change in time. For each solution $(x(t), p(t))$ of these equations, the number $H(x(t), p(t))$ is independent of time, and is equal to the energy.



          To take it a bit further, for any Hamiltonian without explicit time dependence, the energy is conserved. So if you really allowed yourself to plug in solutions, you could replace every single such Hamiltonian with a constant. A single constant (like "$3 textJoules$") clearly isn't enough to say how a physical system behaves.



          For Hamiltonians with explicit time dependence, we have a function $H(x, p, t)$, which give you Hamilton's equations as usual. This time dependence has nothing to do with the time dependence in a particular solution, $H(x(t), p(t), t)$, they mean completely different things.






          share|cite|improve this answer




















          • Thank you for the help! This made me wonder, what sort of functions H qualify as "Hamiltonians?" Can any function be treater as if it were a Hamiltonian, and it would jus be describing a particular model? Or is there some fundamental requirement a function must satisfy in order for it to be allowed to be treated as a Hamiltonian? The reason I ask is, in condensed matter I know you can come up with a Hamiltonian which you believe to approximately model a physics situation, so it could be essentially be anything. Does this mean any function can be treated as a Hamiltonian?
            – Zach
            Sep 28 at 20:41










          • @Zach That’s too vague of a question to answer. “Money can have any value. Does this mean I can treat any number as the amount in my bank account?” I’m sure you could, not sure if anyone would cash your checks.
            – knzhou
            Sep 28 at 20:44










          • @Zach But, plenty of Hamiltonians are physically unacceptable for structural reasons, such as leading to an explosion of infinite energy when they are not bounded below.
            – knzhou
            Sep 28 at 20:45















          up vote
          4
          down vote



          accepted










          You might think that nothing should change if you plug $x(t)$ and $p(t)$ back into the Hamiltonian, because the Hamiltonian is a number, equal to the total energy.



          That's not the right way of thinking about it. You should think of the Hamiltonian as a function $H(x, p)$ whose structure tells you how $x$ and $p$ change in time. For each solution $(x(t), p(t))$ of these equations, the number $H(x(t), p(t))$ is independent of time, and is equal to the energy.



          To take it a bit further, for any Hamiltonian without explicit time dependence, the energy is conserved. So if you really allowed yourself to plug in solutions, you could replace every single such Hamiltonian with a constant. A single constant (like "$3 textJoules$") clearly isn't enough to say how a physical system behaves.



          For Hamiltonians with explicit time dependence, we have a function $H(x, p, t)$, which give you Hamilton's equations as usual. This time dependence has nothing to do with the time dependence in a particular solution, $H(x(t), p(t), t)$, they mean completely different things.






          share|cite|improve this answer




















          • Thank you for the help! This made me wonder, what sort of functions H qualify as "Hamiltonians?" Can any function be treater as if it were a Hamiltonian, and it would jus be describing a particular model? Or is there some fundamental requirement a function must satisfy in order for it to be allowed to be treated as a Hamiltonian? The reason I ask is, in condensed matter I know you can come up with a Hamiltonian which you believe to approximately model a physics situation, so it could be essentially be anything. Does this mean any function can be treated as a Hamiltonian?
            – Zach
            Sep 28 at 20:41










          • @Zach That’s too vague of a question to answer. “Money can have any value. Does this mean I can treat any number as the amount in my bank account?” I’m sure you could, not sure if anyone would cash your checks.
            – knzhou
            Sep 28 at 20:44










          • @Zach But, plenty of Hamiltonians are physically unacceptable for structural reasons, such as leading to an explosion of infinite energy when they are not bounded below.
            – knzhou
            Sep 28 at 20:45













          up vote
          4
          down vote



          accepted







          up vote
          4
          down vote



          accepted






          You might think that nothing should change if you plug $x(t)$ and $p(t)$ back into the Hamiltonian, because the Hamiltonian is a number, equal to the total energy.



          That's not the right way of thinking about it. You should think of the Hamiltonian as a function $H(x, p)$ whose structure tells you how $x$ and $p$ change in time. For each solution $(x(t), p(t))$ of these equations, the number $H(x(t), p(t))$ is independent of time, and is equal to the energy.



          To take it a bit further, for any Hamiltonian without explicit time dependence, the energy is conserved. So if you really allowed yourself to plug in solutions, you could replace every single such Hamiltonian with a constant. A single constant (like "$3 textJoules$") clearly isn't enough to say how a physical system behaves.



          For Hamiltonians with explicit time dependence, we have a function $H(x, p, t)$, which give you Hamilton's equations as usual. This time dependence has nothing to do with the time dependence in a particular solution, $H(x(t), p(t), t)$, they mean completely different things.






          share|cite|improve this answer












          You might think that nothing should change if you plug $x(t)$ and $p(t)$ back into the Hamiltonian, because the Hamiltonian is a number, equal to the total energy.



          That's not the right way of thinking about it. You should think of the Hamiltonian as a function $H(x, p)$ whose structure tells you how $x$ and $p$ change in time. For each solution $(x(t), p(t))$ of these equations, the number $H(x(t), p(t))$ is independent of time, and is equal to the energy.



          To take it a bit further, for any Hamiltonian without explicit time dependence, the energy is conserved. So if you really allowed yourself to plug in solutions, you could replace every single such Hamiltonian with a constant. A single constant (like "$3 textJoules$") clearly isn't enough to say how a physical system behaves.



          For Hamiltonians with explicit time dependence, we have a function $H(x, p, t)$, which give you Hamilton's equations as usual. This time dependence has nothing to do with the time dependence in a particular solution, $H(x(t), p(t), t)$, they mean completely different things.







          share|cite|improve this answer












          share|cite|improve this answer



          share|cite|improve this answer










          answered Sep 27 at 23:49









          knzhou

          36.4k9102174




          36.4k9102174











          • Thank you for the help! This made me wonder, what sort of functions H qualify as "Hamiltonians?" Can any function be treater as if it were a Hamiltonian, and it would jus be describing a particular model? Or is there some fundamental requirement a function must satisfy in order for it to be allowed to be treated as a Hamiltonian? The reason I ask is, in condensed matter I know you can come up with a Hamiltonian which you believe to approximately model a physics situation, so it could be essentially be anything. Does this mean any function can be treated as a Hamiltonian?
            – Zach
            Sep 28 at 20:41










          • @Zach That’s too vague of a question to answer. “Money can have any value. Does this mean I can treat any number as the amount in my bank account?” I’m sure you could, not sure if anyone would cash your checks.
            – knzhou
            Sep 28 at 20:44










          • @Zach But, plenty of Hamiltonians are physically unacceptable for structural reasons, such as leading to an explosion of infinite energy when they are not bounded below.
            – knzhou
            Sep 28 at 20:45

















          • Thank you for the help! This made me wonder, what sort of functions H qualify as "Hamiltonians?" Can any function be treater as if it were a Hamiltonian, and it would jus be describing a particular model? Or is there some fundamental requirement a function must satisfy in order for it to be allowed to be treated as a Hamiltonian? The reason I ask is, in condensed matter I know you can come up with a Hamiltonian which you believe to approximately model a physics situation, so it could be essentially be anything. Does this mean any function can be treated as a Hamiltonian?
            – Zach
            Sep 28 at 20:41










          • @Zach That’s too vague of a question to answer. “Money can have any value. Does this mean I can treat any number as the amount in my bank account?” I’m sure you could, not sure if anyone would cash your checks.
            – knzhou
            Sep 28 at 20:44










          • @Zach But, plenty of Hamiltonians are physically unacceptable for structural reasons, such as leading to an explosion of infinite energy when they are not bounded below.
            – knzhou
            Sep 28 at 20:45
















          Thank you for the help! This made me wonder, what sort of functions H qualify as "Hamiltonians?" Can any function be treater as if it were a Hamiltonian, and it would jus be describing a particular model? Or is there some fundamental requirement a function must satisfy in order for it to be allowed to be treated as a Hamiltonian? The reason I ask is, in condensed matter I know you can come up with a Hamiltonian which you believe to approximately model a physics situation, so it could be essentially be anything. Does this mean any function can be treated as a Hamiltonian?
          – Zach
          Sep 28 at 20:41




          Thank you for the help! This made me wonder, what sort of functions H qualify as "Hamiltonians?" Can any function be treater as if it were a Hamiltonian, and it would jus be describing a particular model? Or is there some fundamental requirement a function must satisfy in order for it to be allowed to be treated as a Hamiltonian? The reason I ask is, in condensed matter I know you can come up with a Hamiltonian which you believe to approximately model a physics situation, so it could be essentially be anything. Does this mean any function can be treated as a Hamiltonian?
          – Zach
          Sep 28 at 20:41












          @Zach That’s too vague of a question to answer. “Money can have any value. Does this mean I can treat any number as the amount in my bank account?” I’m sure you could, not sure if anyone would cash your checks.
          – knzhou
          Sep 28 at 20:44




          @Zach That’s too vague of a question to answer. “Money can have any value. Does this mean I can treat any number as the amount in my bank account?” I’m sure you could, not sure if anyone would cash your checks.
          – knzhou
          Sep 28 at 20:44












          @Zach But, plenty of Hamiltonians are physically unacceptable for structural reasons, such as leading to an explosion of infinite energy when they are not bounded below.
          – knzhou
          Sep 28 at 20:45





          @Zach But, plenty of Hamiltonians are physically unacceptable for structural reasons, such as leading to an explosion of infinite energy when they are not bounded below.
          – knzhou
          Sep 28 at 20:45


















           

          draft saved


          draft discarded















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fphysics.stackexchange.com%2fquestions%2f431212%2fwhy-does-the-hamiltonian-represent-something-different-after-plugging-in-the-sol%23new-answer', 'question_page');

          );

          Post as a guest













































































          Popular posts from this blog

          How to check contact read email or not when send email to Individual?

          Displaying single band from multi-band raster using QGIS

          How many registers does an x86_64 CPU actually have?