Why does the Hamiltonian represent something different after plugging in the solution?
Clash 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.
lagrangian-formalism hamiltonian-formalism hamiltonian
add a comment |Â
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.
lagrangian-formalism hamiltonian-formalism hamiltonian
add a comment |Â
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.
lagrangian-formalism hamiltonian-formalism hamiltonian
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
lagrangian-formalism hamiltonian-formalism hamiltonian
edited 4 hours ago
knzhou
35.7k8100173
35.7k8100173
asked 4 hours ago
Zach
112
112
add a comment |Â
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
4
down vote
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.
add a comment |Â
up vote
-1
down vote
The Hamiltonian $H$ must (originally$^[1]$) be function of $p$ and $y$ (with a possible additional explicit time dependence).
Originally, $H_1 = H_1(p,y)$. To arrive at your second Hamiltonian $H_2 (p,t)$, you plugged in the equation of motion (eom) for $y = y(t)$ into $H_1$. Given that you plugged in the eom, you $already$ knew the dynamics of the system, so you can always make a switch $t rightarrow y$ in $H_2(p,t)$. In fact, you $must$ make the switch from $t rightarrow y$ in order to return to the original Hamiltonian $H_1$ (which provided you the eom for $y$ in the first place). Then $H_1 = H_1 (p,y)$, and things fall into place.
Not making the switch $t rightarrow y$ can only be justified if you did not use the eom (derived from $H_1$). In that case, you get a Hamiltonian which is different from $H_1$ and $H_2$, say, $H_3(p,t)$. Now this $H_3 (p,t)$ is not related to $H_1$ (or $H_2$) because the thing that connects $H_3$ and $H_1$ is absent: eom. $H_3$ has explicit time dependence. This is what your professor means to say:
When eom are used: $H_1(p,y) = H_3(p,t)$.
When eom are not used: $H_1(p,y) neq H_3(p,t)$.
$^[1]$ that is, when eom are not used
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
4
down vote
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.
add a comment |Â
up vote
4
down vote
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.
add a comment |Â
up vote
4
down vote
up vote
4
down vote
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.
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.
answered 4 hours ago
knzhou
35.7k8100173
35.7k8100173
add a comment |Â
add a comment |Â
up vote
-1
down vote
The Hamiltonian $H$ must (originally$^[1]$) be function of $p$ and $y$ (with a possible additional explicit time dependence).
Originally, $H_1 = H_1(p,y)$. To arrive at your second Hamiltonian $H_2 (p,t)$, you plugged in the equation of motion (eom) for $y = y(t)$ into $H_1$. Given that you plugged in the eom, you $already$ knew the dynamics of the system, so you can always make a switch $t rightarrow y$ in $H_2(p,t)$. In fact, you $must$ make the switch from $t rightarrow y$ in order to return to the original Hamiltonian $H_1$ (which provided you the eom for $y$ in the first place). Then $H_1 = H_1 (p,y)$, and things fall into place.
Not making the switch $t rightarrow y$ can only be justified if you did not use the eom (derived from $H_1$). In that case, you get a Hamiltonian which is different from $H_1$ and $H_2$, say, $H_3(p,t)$. Now this $H_3 (p,t)$ is not related to $H_1$ (or $H_2$) because the thing that connects $H_3$ and $H_1$ is absent: eom. $H_3$ has explicit time dependence. This is what your professor means to say:
When eom are used: $H_1(p,y) = H_3(p,t)$.
When eom are not used: $H_1(p,y) neq H_3(p,t)$.
$^[1]$ that is, when eom are not used
add a comment |Â
up vote
-1
down vote
The Hamiltonian $H$ must (originally$^[1]$) be function of $p$ and $y$ (with a possible additional explicit time dependence).
Originally, $H_1 = H_1(p,y)$. To arrive at your second Hamiltonian $H_2 (p,t)$, you plugged in the equation of motion (eom) for $y = y(t)$ into $H_1$. Given that you plugged in the eom, you $already$ knew the dynamics of the system, so you can always make a switch $t rightarrow y$ in $H_2(p,t)$. In fact, you $must$ make the switch from $t rightarrow y$ in order to return to the original Hamiltonian $H_1$ (which provided you the eom for $y$ in the first place). Then $H_1 = H_1 (p,y)$, and things fall into place.
Not making the switch $t rightarrow y$ can only be justified if you did not use the eom (derived from $H_1$). In that case, you get a Hamiltonian which is different from $H_1$ and $H_2$, say, $H_3(p,t)$. Now this $H_3 (p,t)$ is not related to $H_1$ (or $H_2$) because the thing that connects $H_3$ and $H_1$ is absent: eom. $H_3$ has explicit time dependence. This is what your professor means to say:
When eom are used: $H_1(p,y) = H_3(p,t)$.
When eom are not used: $H_1(p,y) neq H_3(p,t)$.
$^[1]$ that is, when eom are not used
add a comment |Â
up vote
-1
down vote
up vote
-1
down vote
The Hamiltonian $H$ must (originally$^[1]$) be function of $p$ and $y$ (with a possible additional explicit time dependence).
Originally, $H_1 = H_1(p,y)$. To arrive at your second Hamiltonian $H_2 (p,t)$, you plugged in the equation of motion (eom) for $y = y(t)$ into $H_1$. Given that you plugged in the eom, you $already$ knew the dynamics of the system, so you can always make a switch $t rightarrow y$ in $H_2(p,t)$. In fact, you $must$ make the switch from $t rightarrow y$ in order to return to the original Hamiltonian $H_1$ (which provided you the eom for $y$ in the first place). Then $H_1 = H_1 (p,y)$, and things fall into place.
Not making the switch $t rightarrow y$ can only be justified if you did not use the eom (derived from $H_1$). In that case, you get a Hamiltonian which is different from $H_1$ and $H_2$, say, $H_3(p,t)$. Now this $H_3 (p,t)$ is not related to $H_1$ (or $H_2$) because the thing that connects $H_3$ and $H_1$ is absent: eom. $H_3$ has explicit time dependence. This is what your professor means to say:
When eom are used: $H_1(p,y) = H_3(p,t)$.
When eom are not used: $H_1(p,y) neq H_3(p,t)$.
$^[1]$ that is, when eom are not used
The Hamiltonian $H$ must (originally$^[1]$) be function of $p$ and $y$ (with a possible additional explicit time dependence).
Originally, $H_1 = H_1(p,y)$. To arrive at your second Hamiltonian $H_2 (p,t)$, you plugged in the equation of motion (eom) for $y = y(t)$ into $H_1$. Given that you plugged in the eom, you $already$ knew the dynamics of the system, so you can always make a switch $t rightarrow y$ in $H_2(p,t)$. In fact, you $must$ make the switch from $t rightarrow y$ in order to return to the original Hamiltonian $H_1$ (which provided you the eom for $y$ in the first place). Then $H_1 = H_1 (p,y)$, and things fall into place.
Not making the switch $t rightarrow y$ can only be justified if you did not use the eom (derived from $H_1$). In that case, you get a Hamiltonian which is different from $H_1$ and $H_2$, say, $H_3(p,t)$. Now this $H_3 (p,t)$ is not related to $H_1$ (or $H_2$) because the thing that connects $H_3$ and $H_1$ is absent: eom. $H_3$ has explicit time dependence. This is what your professor means to say:
When eom are used: $H_1(p,y) = H_3(p,t)$.
When eom are not used: $H_1(p,y) neq H_3(p,t)$.
$^[1]$ that is, when eom are not used
answered 3 hours ago
Avantgarde
8071312
8071312
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password