So I wanted to solve the differential equation that describes a ball falling with air drag and variable gravity (it depends on the height). Here's my procedure: \begin{align*} \sum F&= ma\\ m\ddot{h}&=F_d -F_g\\ \ddot{r}&=\frac{\kappa}{m}\dot{r}^2-\frac{GM}{r^2}, \end{align*} where $r=R+h.$
The thing is I don't know how to solve it or even if it can be solved analitically...
Starting with $\ddot{x} = c_1 \dot{x}^2 - \frac{c_2}{x^2}$, we can consider $v = \dot{x}$ as a function of $x$, which lets us do the following:
$\begin{eqnarray} \ddot{x} & = & \frac{d^2 x}{dt^2} \\ & = & \frac{dv}{dt} \\ & = & \frac{dv}{dx} \frac{dx}{dt} \\ & = & \frac{dv}{dx} v \\ & = & \frac{1}{2} \frac{d}{dx}\left(v^2\right)\end{eqnarray}$
So now our equation reduces to $\frac{1}{2} \frac{d}{dy}(v^2) = c_1 v^2 - c_2 x^{-2}$. We can then set $w = v^2$ and rearrange the equation to become $w' - 2 c_1 w = -2 c_2 x^{-2}$, which is an exact first order ODE. Unfortunately, its solution comes in the form of the exponential integral $\operatorname{Ei}(x)$, which does not bode well for our final expression.