I want to develop the motion equation of a body in a classic gravitational field ($F=\frac{Gm_1m_2}{r^2}$).

Starting by creating the lagrangian of a body under gravitational force, in polar coordinates. The speed in direction $\hat{r}$ is $\dot{r}$ and the speed in direction $\hat{\theta}$ is $r\dot{\theta}$. So the kinetic energy of the body is $K=\frac{m}{2}\left(\dot{r}^2+r^2\dot{\theta}^2\right)$ and the potential energy is $U=-\frac{GMm}{r}$.

$M$ is the mass of the source generating the gravitational field (a star), and $m$ is the mass of the body (a planet).

Creating the lagrangian we get:


Writing down the Euler–Lagrange equation ($\frac{{\partial}\mathcal{L}}{{\partial}q}=\frac{d}{dt}\left(\frac{{\partial}\mathcal{L}}{{\partial}\dot{q}}\right)$)we get $$mr^2\ddot{\theta}=0$$ $$\dot{\theta}=\frac{p_{\theta}}{mr^2}$$ $p_\theta$ is the angular momentum which is conserved $$\theta=\frac{p_{\theta}}{mr^2}t+\theta_0$$



How do I solve the differential equation?


2 Answers 2


If you multiply your last equation by $\dot{r}$ you can integrate once (noting that $\dot{r}\ddot{r} = \frac{\mathrm{d}}{\mathrm{d}t} \frac{\dot{r}^2}{2}$ and $r^{-n}\dot{r}=\frac{\mathrm{d}}{\mathrm{d}t} \frac{r^{-n+1}}{-n+1}$). This leaves you with a first order equation which on which you can separate variables and integrate up.

  • 1
    $\begingroup$ +1 for the trick. But...then you have to solve a more nonlinear equation $r' = \sqrt{a r^{-2} + b r^{-1} + c}$..... $\endgroup$
    – Shuhao Cao
    Jun 13, 2013 at 3:30
  • 2
    $\begingroup$ @ShuhaoCao That's what Michael refers to with separation: rewrite it as $dr / \sqrt{ar^{-2}+br^{-1}+c} = dt$ and all you need is integration - let alpha do it $\endgroup$ Jun 14, 2013 at 14:59

Some of the computations in the middle seem wrongly to rely on $r$ being a constant. In the Euler-Lagrange equation for the angle, one gets $$ \frac{d}{dt}(mr^2\dot\theta)=0\implies mr^2\dot\theta=p_\theta=const. $$ The next step is likewise only possible for circular orbits, constant radius. Else the angle is not linear in time.

Then on the correctly performed Euler-Lagrange equation for the radius transform to $$ 2r\dot r = \frac{p_\theta\dot r}{mr^2}\left(\frac{p_\theta}{mr}-\frac{GMm}{p_\theta}\right) $$ which integrates nicely to $$ \dot r^2+\left(\frac{p_\theta}{mr}-\frac{GMm}{p_\theta}\right)^2=C^2\tag{*} $$ Now set $$ \dot r=C\sin\phi,~~~\left(\frac{p_\theta}{mr}-\frac{GMm}{p_\theta}\right)=C\cos\phi\tag{**} $$ so that $$ C\dot\phi\sin\phi=\frac{p_\theta\dot r}{mr^2}=\frac{p_\theta C\sin\phi}{mr^2} \\ \implies mr^2\dot\phi=p_\theta=mr^2\dot\theta\\\implies \phi=\theta+\psi $$ with a constant phase angle $\psi$. The second equation in (**) can be written as $$ r=\frac{R}{1+E\cos\phi} $$ with $R$, $E$ constants for the reference radius and eccentricity.

The remaining dynamic is then contained in $$ \frac{mR^2\dot\phi}{(1+E\cos\phi)^2}=p_\theta $$


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .