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:
$$\mathcal{L}=K-U=\frac{m}{2}\left(\dot{r}^2+r^2\dot{\theta}^2\right)+\frac{GMm}{r}$$
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$$
$$m\ddot{r}=mr\dot{\theta}^2-\frac{GMm}{r^2}$$
$$\ddot{r}=\frac{p_{\theta}^2}{m^2}r^{-3}-GMr^{-2}$$
How do I solve the differential equation?