# Distance as a function of time where acceleration changes with respect to distance

I was thinking the other day about gravity. I know that acceleration in a magnetic field changes with respect to distance from the center of the field. So I was thinking, how would one find the total distance travelled with respect to time when a body is free falling in a gravitational field that grows stronger as the body falls further. I spent many-an-hour scrawling calculus things on napkins before I finally threw in the towel. So if any of you want to satiate my thirst for knowledge, it'd be much appreciated (at the very least, it'd be a fun challenge for you). I started by getting D=(1/2)(GM/R^2)(t^2) and spent many hours trying to twist that around but ultimately could never figure out how to make the R vary with respect to time, since D (the variable I want to get out) is DeltaR.

Really, $\vec F = m\vec a$ is meant to be a second-order differential equation, with the force dependent on position (and, sometimes, time). Writing it as
$$\vec F(\vec x,t) = m \frac{\mathrm{d}^2\vec x}{\mathrm{d}t^2}$$
makes manifest that the distance travelled by something, is, in general, the solution $\vec x(t)$ of this differential equation, which may or may not be analytically solvable.