Solving the Kepler problem with the Hamiltonian

• fluidistic
In summary, the conversation discusses finding the Hamiltonian and its corresponding equations of motion for a particle in a central potential. The solution to the Kepler problem in this description is then attempted by solving the equations of motion, but with some algebra errors. It is then suggested to use a substitution to make the differential equation easier to solve, leading to a solution for r and theta in terms of each other.
fluidistic
Gold Member

Homework Statement

Write down the Hamiltonian and its corresponding Hamilton equations for a particle in a central potential. Find the solution to the Kepler problem in this description.

Homework Equations

Hamiltonian.
The Hamilton equations or motion equations are $\dot q _i = \frac{\partial H}{\partial p_i}$ and $\dot p_i =-\frac{\partial H}{\partial q_i}$.

The Attempt at a Solution

I've found as Hamiltonian of the central potential: $H=\frac{1}{2m} \left ( p_r ^2 + \frac{p_ \theta ^2 }{r^2} \right ) +U(r)$.
I know that for the Kepler problem, U(r) becomes k/r.
So that $H=\frac{1}{2m} \left ( p_r ^2 +\frac{p_ \theta ^2 }{r^2} \right ) +\frac{k}{r}$.
Now I'm stuck at finding and solving the equations of motion.
Here is my attempt:
$\dot r = \frac{p _r}{m}$.
And $\dot p_r= mr \dot \theta ^2 -\frac{k}{r^2}$.
I don't know if this is good so far. Nor how to continue.

Note by the way that you have two more Hamilton's equations for the angular components: $\dot{\theta} = \cdots$ and $\dot{p}_\theta = \cdots$

$q_1 = r, q_2 = \theta$, $p_1 = p_r, p_2 = p_\theta$

Next apply definitions of momenta:
$p_r = m\dot{r}$, $p_\theta = mr\dot{\theta}$.

jambaugh said:
Note by the way that you have two more Hamilton's equations for the angular components: $\dot{\theta} = \cdots$ and $\dot{p}_\theta = \cdots$

$q_1 = r, q_2 = \theta$, $p_1 = p_r, p_2 = p_\theta$

Next apply definitions of momenta:
$p_r = m\dot{r}$, $p_\theta = mr\dot{\theta}$.

Oh right, thanks. I totally forgot about theta.
I reach $\dot p _\theta=0$ (I think this implies the conservation of angular momentum) and $\dot \theta = \frac{p _\theta}{mr^2}$.
I think that $p_ \theta =mr^2 \dot \theta$ (that's what I reached) instead of $p_ \theta =mr \dot \theta$. What do you say?
Ok, I'm going to tackle the rest after I eat.

Using the relations you told me, I get $m \dot r =mr \dot \theta ^2 - \frac{k}{r^2}$ and $mr^2 \dot \theta =0$. These are the equations of motion.
Now I tried to solve them (I likely made some algebra error somewhere) and reached $r(t)=\sqrt[3]{- \frac{3kt}{m} }$. And $\theta (t)=C$, a constant, which I know is wrong.

fluidistic said:
Using the relations you told me, I get $m \dot r =mr \dot \theta ^2 - \frac{k}{r^2}$ and $mr^2 \dot \theta =0$. These are the equations of motion.
Now I tried to solve them (I likely made some algebra error somewhere) and reached $r(t)=\sqrt[3]{- \frac{3kt}{m} }$. And $\theta (t)=C$, a constant, which I know is wrong.

When you are doing Hamiltonian mechanics, you want to work with $p_j$ instead of $\dot{q}_j$. In this case, you shouldn't work with $\dot{\theta}$.

That said, write the Hamiltonian EoM for $\theta$: $\dot{p}_{\theta} = - \frac{\partial H}{\partial \theta}$, from which you can conclude an important property for $p_{\theta}$.
Once you done that, you can rewrite the original Hamiltonian in terms of $r$ and $p_r$ only with certain effective potential and reduce the two dimensional problem to a one-dimensional mechanics problem.

mathfeel said:
When you are doing Hamiltonian mechanics, you want to work with $p_j$ instead of $\dot{q}_j$. In this case, you shouldn't work with $\dot{\theta}$.
Hmm ok.

That said, write the Hamiltonian EoM for $\theta$: $\dot{p}_{\theta} = - \frac{\partial H}{\partial \theta}$, from which you can conclude an important property for $p_{\theta}$.
My Hamiltonian does not depend on theta so that I get that the generalized momentum of theta is worth 0.
I have $H=\frac{1}{2m} \left ( p_r ^2 + \frac{p_ \theta ^2 }{r^2} \right ) +U(r)$ with $p_r=m \dot r$ and $p _\theta =m r^2 \dot \theta$. I assume I'm already wrong on this?
Once you done that, you can rewrite the original Hamiltonian in terms of $r$ and $p_r$ only with certain effective potential and reduce the two dimensional problem to a one-dimensional mechanics problem.
Ok, I'll try this. Thanks for helping me once again.

fluidistic said:
Hmm ok.

My Hamiltonian does not depend on theta so that I get that the generalized momentum of theta is worth 0.
Are you sure that's what you get? What is the theta derivative of the Hamiltonian supposed to give you?

fluidistic said:
Hmm ok.

My Hamiltonian does not depend on theta so that I get that the generalized momentum of theta is worth 0.

No, you get that the time derivative of generalized momentum of theta is 0.
fluidistic said:
I have $H=\frac{1}{2m} \left ( p_r ^2 + \frac{p_ \theta ^2 }{r^2} \right ) +U(r)$ with $p_r=m \dot r$ and $p _\theta =m r^2 \dot \theta$. I assume I'm already wrong on this?

Ok, I'll try this. Thanks for helping me once again.
Looks okay except your misinterpretation above.

fluidistic said:
Using the relations you told me, I get $m \dot r =mr \dot \theta ^2 - \frac{k}{r^2}$ and $mr^2 \dot \theta =0$. These are the equations of motion.
Now I tried to solve them (I likely made some algebra error somewhere) and reached $r(t)=\sqrt[3]{- \frac{3kt}{m} }$. And $\theta (t)=C$, a constant, which I know is wrong.

You set $p_\theta = 0$ when you should set $p_\theta = const.$.
(And yes I forgot to square the radius).

$p_\theta = mr^2 \dot{\theta} = L$ as constant. Solve this for $\dot{\theta}$ and eliminate from your other equations: $\dot{\theta} = \frac{L}{m r^2}$.

So $\dot{p}_r = m\ddot{r} = mr\dot{\theta}^2 - \frac{k}{r^2} = m r \left( \frac{L}{m r^2}\right)^2 - \frac{k}{r^2}$.

You have a single 2nd order differential equation in r alone.
I think then a substitution $z = 1/r$ will make this differential equation easier to solve (but it's been a while so play with it and see).

Once you have $r(t)$ you go back to the constant angular momentum equation and solve for theta.

 Oh, yea you can't solve for $r(t)$ explicitly. But you can find $r(\theta)$. Use $\dot{r} = \dot{\theta}\frac{dr}{d\theta}$.

Last edited:
capandbells said:
Are you sure that's what you get? What is the theta derivative of the Hamiltonian supposed to give you?
I have no idea at all about what the theta derivative of the Hamiltonian is supposed to give me.
I've been corrected by others and now see my error of concluding that the generalized momentum of theta is worth 0, it's its time derivative that is worth 0.

mathfeel said:
No, you get that the time derivative of generalized momentum of theta is 0.

Looks okay except your misinterpretation above.
Thanks, I see it now.

jambaugh said:
You set $p_\theta = 0$ when you should set $p_\theta = const.$.
(And yes I forgot to square the radius).

$p_\theta = mr^2 \dot{\theta} = L$ as constant. Solve this for $\dot{\theta}$ and eliminate from your other equations: $\dot{\theta} = \frac{L}{m r^2}$.

So $\dot{p}_r = m\ddot{r} = mr\dot{\theta}^2 - \frac{k}{r^2} = m r \left( \frac{L}{m r^2}\right)^2 - \frac{k}{r^2}$.

You have a single 2nd order differential equation in r alone.
I think then a substitution $z = 1/r$ will make this differential equation easier to solve (but it's been a while so play with it and see).

Once you have $r(t)$ you go back to the constant angular momentum equation and solve for theta.

 Oh, yea you can't solve for $r(t)$ explicitly. But you can find $r(\theta)$. Use $\dot{r} = \dot{\theta}\frac{dr}{d\theta}$.
Ok thanks a lot.
So you say I can't solve explicitly for r(t) the differential equation $\ddot r - \frac{L^2}{m^2 r^3}+\frac{k}{r^2}=0$. Instead I have to find $r (\theta )$ (how will this help?).
Also, how did you find $\dot{r} = \dot{\theta}\frac{dr}{d\theta}$?
Edit: nevermind my last question. $\dot r =\frac{dr}{dt}= \dot \theta \frac{dr}{d\theta }=\frac{d \theta }{dt} \frac{dr}{d\theta }$ and the relation is obvious.
Ok I will try to use this.

Edit2: I would love any further tip. I'm heading to bed right now and hopefully I'll try harder when I wake up. I have no success as of now. I don't see in which equation I could replace $\dot r by \dot \theta \frac{dr}{d\theta }$.

Last edited:
Second derivative is hard to integrate. Find from the Hamiltonian equations $\frac{dr}{dt}$ as function of $r$. Use the chain rule and the definition of $p_{\theta}$ to make $\frac{d}{dt}$ into $\frac{d}{d\theta}$, then integrate that to find $r(\theta)$.

Remember that in addition to angular momentum $P_{\theta}$, the energy, which in this case is equal to the Hamiltonian is also a constant of motion. In order to specify the orbit, one must supply both information.

Last edited:
mathfeel said:
Second derivative is hard to integrate. Find from the Hamiltonian equations $\frac{dr}{dt}$ as function of $r$. Use the chain rule and the definition of $p_{\theta}$ to make $\frac{d}{dt}$ into $\frac{d}{d\theta}$, then integrate that to find $r(\theta)$.

Remember that in addition to angular momentum $P_{\theta}$, the energy, which in this case is equal to the Hamiltonian is also a constant of motion. In order to specify the orbit, one must supply both information.

Ok for your last suggest, I'll try to do it. But right now I'm totally lost in the equations when looking for $r(\theta )$. I've "played" with 3 of the 4 Hamiltonian equations and I don't see how to get $\dot r (r)$. Could you tell me which ones I should work with please?

fluidistic said:
Ok for your last suggest, I'll try to do it. But right now I'm totally lost in the equations when looking for $r(\theta )$. I've "played" with 3 of the 4 Hamiltonian equations and I don't see how to get $\dot r (r)$. Could you tell me which ones I should work with please?

The only term that contains $\dot{r}$ is $\dot{p}_r$. Invert the definition of Hamiltonian for it.

Don't you have a textbook on Hamiltonian mechanics? This should be a standard example.

Note you can integrate the 2nd order equation once:
$\ddot{r} = f(r)$ by multiplying through by $\dot{r}=v$

$\dot{r}\ddot{r} = \dot{r}f(r)$

$v \frac{dv}{dt} = f(r) \frac{dr}{dt}$
$v dv = f(r)dr$
$\int v dv = \int f(r)dr$
However this (I think) should just recover your Hamiltonian (over m) as the constant of integration.

 This is the point of using the Hamiltonian format to solve the problem. It avoids the 2nd order equation and the need to apply the above "trick".

So taking the Hamiltonian set equal to E the constant energy and substituting $\dot{\theta}$ as a function of the constant angular momentum L you should be able to solve for $\dot{r}$ as a function of r alone. You must integrate this equation. Here is where going to $r(\theta)$ and/or r = 1/z might be helpful.

Note that I do not have the solution readily in mind. You need to work through the details and possible dead ends.

Last edited:
mathfeel said:
The only term that contains $\dot{r}$ is $\dot{p}_r$. Invert the definition of Hamiltonian for it.

Don't you have a textbook on Hamiltonian mechanics? This should be a standard example.

Then I probably made an error. My $\dot p _r$ term doesn't contain $\dot r$. That would explain my great confusion. I'll redo the algebra to see what I get for $\dot p _r$.
I don't really understand what you mean by "invert the def. of the Hamiltonian".
About the textbooks, I have the first ed. of Goldstein's book, and Landau's book on classical mechanics. I've searched this problem over the internet and the best I could find was exactly where I'm stuck (the equations of motions), but they are not solved in any book I've sneaked into nor on the Internet.
Thanks a lot jambaught, I'm going to check this out, but I'd rather try your first suggestion and then find the solution with your new approach.

Refering to post #5, I have $H=\frac{1}{2m} \left ( p _r ^2+\frac{L^2}{r^2} \right ) -\frac{k}{r}=E$. I know I can conclude that the total energy is constant and worth the Hamiltonian because it does not depend explicitly on time. Now I'm thinking how to identify the "effective potential energy".

Edit: Checked up in internet and I'm almost sure that the term $\frac{L^2}{2mr^2}-\frac{k}{r}$ is the effective potential energy.

fluidistic said:
...I have $H=\frac{1}{2m} \left ( p _r ^2+\frac{L^2}{r^2} \right ) -\frac{k}{r}=E$.

You have an equation involving only $r$ and $p_r = m\dot{r}$. In short you have a 1st order ODE. Can you integrate it?

jambaugh said:
You have an equation involving only $r$ and $p_r = m\dot{r}$. In short you have a 1st order ODE. Can you integrate it?
I didn't take any course on ODE yet. I've however self studied first order and second order ones, when they are linear if I remember well. I think the one I'm getting isn't linear.
I've Boas's book and Boyce di Prima's book that I could use in order to tackle my differential equation.
Just to be sure, I have $E-\frac{m^2 \dot r ^2}{2m}-\frac{L^2}{2mr^2}+\frac{k}{r}=0$.
To use a mathematician notation, I could write that my ODE is $c_1+c_2 y ' ^2 + \frac{c_3}{y^2}+\frac{c_4}{y}=0$. I don't think I've studied these kind of ODE, unless it's of a Bernoulli's type?
Hmm I'll think about integration... let's see what will pop up. (Currently almost 2am, I guess type to sleep for me. Will come back to this tomorrow).
Edit: By the way, I have a question regarding theory of the Hamiltonian "formalism" or approach to classical mechanics. I think I'm only supposed to get first order differential equations for the equations of motion, instead of second order ones like the Lagrangian approach. Am I right on this? Then why did I get a second order differential equation in post #10?!

Last edited:
fluidistic said:
...
Just to be sure, I have $E-\frac{m^2 \dot r ^2}{2m}-\frac{L^2}{2mr^2}+\frac{k}{r}=0$.
Try a little algebra! Solve for $\dot{r}$.
You get $\dot{r} = f(r)$ or
$$\frac{dr}{dt} = f(r)$$
$$\frac{dr}{f(r)} = dt$$
$$\int \frac{1}{f(r)} dr = t+C$$
an implicit form... if you can integrate the mess.

The integration becomes tractable if you use the two "tricks" I mentioned and you can solve for $r$ as a function of $\theta$ to get the classic polar forms of the conic sections.

Edit: By the way, I have a question regarding theory of the Hamiltonian "formalism" or approach to classical mechanics. I think I'm only supposed to get first order differential equations for the equations of motion, instead of second order ones like the Lagrangian approach. Am I right on this? Then why did I get a second order differential equation in post #10?!

With Hamilton's equations you end up with a system of 1st order ODE's in twice as many variables. $r,\theta, p_r, p_\theta$. It is in the substitution for solution that you end up back with the 2nd order equations of the Lagrangian method (in half as many variables $r,\theta$.)

jambaugh said:
Try a little algebra! Solve for $\dot{r}$.
Thank you, that's encouraging :)
You get $\dot{r} = f(r)$ or
$$\frac{dr}{dt} = f(r)$$
$$\frac{dr}{f(r)} = dt$$
$$\int \frac{1}{f(r)} dr = t+C$$
an implicit form... if you can integrate the mess.

The integration becomes tractable if you use the two "tricks" I mentioned and you can solve for $r$ as a function of $\theta$ to get the classic polar forms of the conic sections.
Ah I see, now this becomes clearer to me.
I reach $\dot r = \pm \sqrt {\frac{2}{m}[E-U(r)_{\text{effective}}]}=f(r)$.
Here I have a little confusion, in post #14, your $f(r)= \ddot r$ and now it's $f(r)=\dot r$. I don't think that changes things much, but I'll investigate.
Anyway, I reach$\pm \int \frac{dr}{\sqrt {\frac{2}{m}[E-U(r)_{\text{effective}}]}}=t+C$. I recognize integrals of these kinds, I think I've seen this in Landau's chapter on central forces. But yeah, I'd rather solve it at least once myself instead of just taking the solution for granted.
Am I right also if instead of my last integral, I set up $\pm \int _{r_0} ^{r_1}\frac{dr}{\sqrt {\frac{2}{m}[E-U(r)_{\text{effective}}]}}=\int _{t_0}^{t_1}dt=t$. I'm almost sure that's a yes thanks to calculus 2, but I prefer to be sure. I actually prefer the latter form: definite integrals.
With Hamilton's equations you end up with a system of 1st order ODE's in twice as many variables. $r,\theta, p_r, p_\theta$. It is in the substitution for solution that you end up back with the 2nd order equations of the Lagrangian method (in half as many variables $r,\theta$.)
Oh I didn't know this. Thank you so much for clearing this to me.
Edit: I reach $\pm \int \frac{d\theta }{\dot \theta }=t+C$. Not sure this helps nor if I'm on the right direction. I'm still trying to figure out $r(\theta )$.

Last edited:

1. What is the Kepler problem?

The Kepler problem is a classical mechanics problem that involves finding the motion of a single planet around the sun under the influence of gravity. It is based on Johannes Kepler's laws of planetary motion, which describe the elliptical orbits of planets around the sun.

2. What is the Hamiltonian in relation to the Kepler problem?

The Hamiltonian is a mathematical function that represents the total energy of a system. In the context of the Kepler problem, the Hamiltonian is used to describe the motion of a planet around the sun by considering the planet's position and momentum at a given time.

3. How is the Kepler problem solved using the Hamiltonian?

The Kepler problem can be solved by using the Hamiltonian equations, which are a set of differential equations that describe the evolution of the system's position and momentum over time. By solving these equations, the trajectory of the planet's motion can be determined.

4. What are the assumptions made in solving the Kepler problem with the Hamiltonian?

The main assumptions made in solving the Kepler problem with the Hamiltonian are that the planet and the sun are the only two objects in the system, and that the gravitational force between them is the only force acting on the planet. Additionally, it is assumed that the planet's orbit is elliptical and that the sun is at one of the foci of the ellipse.

5. What are the applications of solving the Kepler problem with the Hamiltonian?

Solving the Kepler problem with the Hamiltonian has many practical applications, such as predicting the motion of planets and other celestial bodies in our solar system. It is also used in space mission planning and in the study of orbital dynamics in astrophysics.

Replies
2
Views
661
Replies
2
Views
2K
Replies
1
Views
815
Replies
11
Views
1K
Replies
6
Views
2K
Replies
9
Views
1K
Replies
7
Views
5K
Replies
4
Views
1K