Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|cite|improve this question

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.

share|cite|improve this answer
+1 for the trick. But...then you have to solve a more nonlinear equation $r' = \sqrt{a r^{-2} + b r^{-1} + c}$..... – Shuhao Cao Jun 13 '13 at 3:30
@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 – Tobias Kienzler Jun 14 '13 at 14:59

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.