# Function where second derivative is equal to reciprocal squared

I was recently interested in whether there exists a closed-form solution for the position of an object (say a spacecraft) in freefall as a function of time. To complicate things, I wanted to take into account the increase in acceleration as you get nearer to the surface.

The differential equation is straightforward:

$$x''(t) = \frac{\mu}{x(t)^2}$$ where $$\mu = G \cdot m_{planet}$$

How, if at all, would I go about solving this? I've tried to use the common functions that return themselves when differentiated (trig, hyperbolic trig, exponential, etc.) but none of them obviously equal the reciprocal of themselves when differentiated twice.

The closest I've gotten was $$B\cosh(D \cdot t)$$, but it doesn't work in the differential equation and doesn't quite match the analytical curve.

• I would try to multiply both sides by $x'$. Jun 29 at 23:37
• Autonomous equation: reduce the order by substituting $v(x)=x'(t)$ to find $vv'=\mu/x^2$. Integrate this to find $v(x)=\sqrt{C-2\mu/x}$, then integrate again to find $t(x)$, ie $\int\frac{dx}{\sqrt{C-2\mu/x}}=\int dt$. In principle, the expression for $t(x)$ is to be inverted to find $x(t)$. I do not think that is possible analytically here.
– Sal
Jun 29 at 23:41
• @Sal I'm not sure how you got to v(x) = [...]. You'd be integrating with respect to 't', and given that x(t) is an unknown function you can't integrate it that way. Jun 30 at 0:04
• @explodingfilms101 I understand your skepticism, however it is a well-know method: I integrate first wrt $x$, also note $v'(x)=dv/dx$. The transform $v(x)=x'(t)$ turns $x$ into the independent variable and $t$ makes no appearance in the expression. Take the derivative $\frac{d}{dt}v(x)$ to see where $vv'$ comes from.
– Sal
Jun 30 at 0:24
• Don't forget that minus sign, unless you want repulsive gravity. ;) You may find this helpful: en.wikipedia.org/wiki/Radial_trajectory Jun 30 at 0:46

WolframAlpha gives a solution in terms of an implicit equation and two constants which is presumably found by applying the ideas from the comments. This is too complicated for my tastes so here's an easier approximation we can do instead.

As you probably know, for an object in free fall, the easiest calculation assumes that the relevant distance scales are small enough that the acceleration due to gravity is effectively constant. This corresponds to taking a zeroth-order Taylor series expansion of the RHS of the form $$- \frac{\mu}{x^2} \approx - \frac{\mu}{x_0^2}$$ where $$x_0$$ is our initial distance from the center of the Earth and is assumed to be much larger than $$x - x_0$$. (By the way, you've missed a negative sign.) To do somewhat better than this let's take a first-order Taylor series expansion. This gives

$$x'' = - \frac{\mu}{(x_0 + (x - x_0))^2} \approx - \frac{\mu}{x_0^2 + 2 x_0 (x - x_0)} \approx - \mu \left( \frac{1}{x_0^2} - \frac{2(x - x_0)}{x_0^3} \right).$$

Happily this gives us a second-order linear differential equation with constant coefficients and we know how to solve those. The characteristic polynomial is $$\lambda^2 = \frac{2 \mu}{x_0^3}$$ with real roots $$\pm \omega$$ where $$\omega = \sqrt{ \frac{2 \mu}{x_0^3} }$$, and $$x - x_0 = \frac{x_0}{2}$$ is a particular solution (this doesn't make physical sense; in this regime $$x - x_0$$ is large enough that our first-order approximation isn't good), which gives the general solution (here $$x(0) = x_0$$)

$$\boxed{ x(t) \approx 3 \frac{x_0}{2} - \frac{x_0}{2} \cosh \omega t + \frac{x'(0)}{\omega} \sinh \omega t }.$$

This approximation should really only be trusted for small $$t$$. Expanded to second order in $$t$$ this gives

$$x(t) = x_0 + x'(0) t - x_0 \frac{\omega^2 t^2}{4} + \dots$$

where, near the Earth (so setting $$M = M_E$$ and $$x_0 = r_E$$), we have $$\omega^2 = \frac{2GM_E}{r_E^3} = \frac{2g}{r_E}$$ (using that $$g = \frac{GM_E}{r_E^2}$$ is the acceleration due to gravity at the Earth's surface) which gives

$$x_0 \frac{\omega^2}{4} t^2 = \frac{gt^2}{2}$$

so to second order in $$t$$ we recover the familiar quadratic expected from constant acceleration. The first correction to this behavior is the $$t^3$$ term which is

$$\frac{x'(0)}{\omega} \frac{\omega^3 t^3}{6} = x'(0) \frac{g}{r_E} \frac{t^3}{3}.$$

Since $$r_E \approx 6.3 \times 10^6 \, m$$ is fairly large this is a pretty small term. Its effect is that the initial velocity takes our free-falling object slightly further in whatever direction that velocity points (up or down) than the constant acceleration calculation suggests; this is because if we start out going up then we're getting further away from the Earth so it's pulling us down a bit less, but if we start out going down then we're getting closer so it's pulling us down a bit more. So that all makes sense.

For large $$t$$ (again, we should not trust what this approximation says for large $$t$$) we get an exponential which either crashes us into the Earth or flings us into space. Crashing into the Earth is a bit more realistic since the acceleration is increasing as we get closer. If we start out with a sufficiently large upward velocity we of course don't actually get flung into space exponentially; as the gravitational force weakens we expect to escape the gravity well more-or-less linearly, as almost all of the gravitational potential energy gets converted to an asymptotically constant kinetic energy and hence an asymptotically constant velocity.

By writing $$\cosh$$ and $$\sinh$$ in terms of exponentials we can see more specifically that this approximation predicts that escape velocity is given by

$$v \stackrel{?}{=} \frac{\omega x_0}{2} = \sqrt{ \frac{GM_E}{2r_E} } = \sqrt{ \frac{gr_E}{2} }.$$

This is close to what a dimensional analysis would predict so has the right qualitative behavior, but is off by a factor of $$2$$ from the true answer. The true answer is the velocity which makes the object's kinetic energy equal to its gravitational potential energy, which gives the true escape velocity

$$v = \sqrt{ \frac{2GM_E}{r_E} } = \sqrt{2 gr_E}.$$

Again this is a manifestation of the fact that this approximation is not good for large $$t$$.

Since this is a problem from classical mechanics, we can use physical intuition to help us. For a falling body, potential energy gets converted into kinetic energy, but the sum stays constant. Indeed, using the differential equation, we get: $$$$\left(\frac{1}{2}x'(t)^2+\frac{\mu}{x(t)}\right)' =\left(x''(t)-\frac{\mu}{x(t)^2}\right)x'(t)=0.$$$$ Therefore, there is a constant $$C$$, so that: $$$$\frac{1}{2}x'(t)^2+\frac{\mu}{x(t)}=C \Leftrightarrow \left(2C-\frac{2\mu}{x(t)}\right)^{-\frac{1}{2}}x'(t)=1.$$$$ We therefore have a simpler ordinary differential equation with only one derivative appearing. Integrating and substituting $$u=x(\tau)$$ with $$\mathrm{d}u=x'(\tau)\mathrm{d}\tau$$, we get: $$$$t=\int_0^t\mathrm{d}\tau =\int_0^t\left(2C-\frac{2\mu}{x(\tau)}\right)^{-\frac{1}{2}}x'(\tau)\mathrm{d}\tau =\int_{x(0)}^{x(t)}\left(2C-\frac{2\mu}{u}\right)^{-\frac{1}{2}}\mathrm{d}u$$$$ This is an elliptic integral and those are usually pretty hard to solve. If we had a solution, we would solve for $$x(t)$$ (and get an expression, where the initial condition given for $$x(0)$$ appears). We can then calculate the constant $$C$$ with the initial condition given for $$x'(0)$$, just as Qiaochu Yuan requested.

For the special case $$C=0$$, we can calculate the integral: \begin{align*} t=\frac{1}{\sqrt{-2\mu}}\int_{x(0)}^{x(t)}\sqrt{u}\mathrm{d}u =\frac{\sqrt{2}}{3\sqrt{-\mu}}\left[u^{\frac{3}{2}}\right]_{x(0)}^{x(t)} =\frac{\sqrt{2}}{3\sqrt{-\mu}}\left(x(t)^{\frac{3}{2}}-x(0)^{\frac{3}{2}}\right) \\ \Rightarrow x(t)=\left(\frac{3\sqrt{-\mu}}{\sqrt{2}}t+x(0)^{\frac{3}{2}}\right)^{\frac{2}{3}}. \end{align*} It can be verified easily, that this is the solution to the initial condition $$x'(0)=\sqrt{-\frac{2\mu}{x(0)}}$$. If we put $$x(0)=0$$, we also get the relation $$x(t)^3\propto t^2$$ similar to Kepler's Third Law.

• This is not the general solution; there are no constants so you can't incorporate initial conditions. Jun 29 at 23:52
• @QiaochuYuan Thanks, it is fixed now! Jun 30 at 0:35
• Now unfortunately you need to fix the sign on $\mu$; either $\mu$ needs to be replaced by $- \mu$ or it should be negative. Jun 30 at 1:39
• Yes, I tend to get confused about the most simplest steps sometimes. I do assume, that $\mu$ is negative since gravity attracts. Jun 30 at 1:43
• Then aren't you taking the square root of a negative number in the second half? I'm not convinced this $t^{2/3}$ solution makes any physical sense. Jun 30 at 1:46

If you switch variables $$x''(t) = \frac{\mu}{x(t)^2} \quad \implies \qquad -\frac {t''(x)}{[t'(x)]^3}=\frac{\mu}{x^2}$$ Reduction of order $$p(x)=t'(x)$$ leads to $$p(x)=t'(x)=\pm\frac{\sqrt{x}}{\sqrt{2} \sqrt{c_1 x-\mu }}$$ $$t(x)+c_2=\pm \frac{1}{\sqrt{2} c_1^{3/2}}\Big[\sqrt{c_1} \sqrt{x} \sqrt{c_1 x-\mu }+\mu \log \left(\sqrt{c_1} \sqrt{c_1 x-\mu }+c_1 \sqrt{x}\right) \Big]$$