one-dimensional inverse square laws I suddenly became curious about the following differential equation:
\begin{align*} 
\frac{d^2x}{dt^2} = \frac{k}{x(t)^2} && x(0) = x_0 > 0 && \frac{dx}{dt}(0) = v_0
\end{align*}
the "1D inverse square law problem". 
It's a pretty natural thing to think about. You're a positive distance $x_0$ away from a point particle which is exerting an inverse square force on you. You're moving only radially with respect to that particle with initial velocity $v_0$. What happens? Do all solutions have a "closed form"? Do some of them?
Obviously the behaviour can be quite different depending on the intial conditions. For example, if $k <0$, you're either going to fall into the "black hole", or you're going to escape to infinity (or is it even possible to asympotically approach some finite maximum distance from below as $t \to +\infty$?). 

Edit: I thought of one solution: letting $x(t) = a t^{2/3}$, one gets $\frac{d^2x}{dt^2} = \frac{-2a}{9} t^{-4/3}$ so that $x^2 \cdot  \frac{d^2 x}{dt^2} = \frac{-2a^3}{9}$ whence, taking $a = - \left( \frac{9k}{2} \right)^{1/3}$, we get a solution. We could also shift the time variable to get some more solutions.
Edit2: The preceding solution is simple enough that I figured this was the "minimal escape curve" i.e. the one where you have precisely enough energy to escape to infinity. Indeed, it's not hard to check this by calculuating the kinetic and potential energy when $t= 1$ i.e. $x=a$. But my friend pointed out a much nicer way to see this! Notice $\frac{dx}{dt} = \frac{2a}{3} t^{-1/3} \to 0$ as $t \to \infty$. Since the veclocity goes to zero, the kinetic energy goes to zero. So, by conservation of energy, this is the minimal escape curve (if you had any spare energy left at $x = \infty$, you wouldn't have slowed to velocity zero).
Edit3: In the end I found out how to get the solutions implicitly. See my answer here. 
 A: See this answer at Physics SE.
In short, this attractive inverse squares problem is somewhat ill-defined in 1 dimension.
If you look at your problem as limit case of Kepler problem with angular momentum $M\to0$, then you have the particle moving from its initial position to the singularity of the potential, and then bouncing off it (because the ellipse with one focus at singularity will degenerate into a line with one of its ends at singularity).
If, on the other hand, you look at the problem as initially 1-dimensional and the potential being the limit of $U=\frac{k}{\sqrt{x^2+\varepsilon^2}}$ as $\varepsilon\to0$, then your particle would go through the singularity, contrary to bouncing off it.
As these limits, having identical final potential, give different results, the original problem doesn't have a consistent solution on its own.
A: For $k<0$ it is the two body problem, which iirc is known to have only ellipses, parabolas and hyperbolas as solutions. 
In the case of a bounded orbit (ellipsis) the orbit passes through the origin. It does not "fall into a black hole", but rather through it. Of course if there were a body in the center there would be a crash, but for the ODE the center is not a singularity.
If you allow falling through the origin, then the movement is periodic and will reach a finite maximum distance periodically. (like a pendulum)
In the case of parabola and hyperbola the orbit is unbounded, so it will escape to infinity, depending on initial conditions maybe after having passed through the origin.
A: All the previous discussion only applies to the non bound states (hence non of the solutions are periodic!). The complicated logarithmic relation between t and x, derived in previous posts, applies to the case when we have a repulsive inverse square relation (k positive). It also applies to the attractive inverse square case (k negative) when the particle energy is positive. (change the sign of all the k's in the given expression to get the correct relation for this case). If k<0 then we can have bound states when the energy is negative E<0; then we get periodic behavior. (don't worry about negative energy this just means it takes work to remove the particle from its bound state to infinity which is the reference zero of energy).
For the 1_D bound state the particle energy is negative and conserved, 
E= -k/xa , where xa is the amplitude of the oscillation in the potential well. K is the "force constant" for the problem (k=e^2/4pi.epsilon for electrical and k= GMm for gravity as examples). For a particle of mass m the integral for t can be done explicitly (see earlier link) to relate time,t and position x for the motion. The answer for the attractive inverse square law is 
t = sqrt ( m.xa^3/2k) . { tan^-1 [sqrt(x/(xa-x)] - (1/xa) sqrt [x.(xa-x)]}
which is considerably simpler than the logarithmic expressions which occur in the positive energy cases.
In the bound state, when the particle passes through the origin the potential energy is -infinity and the kinetic energy is + infinity but the total energy is the constant and finite difference of these two contributions.
We can use the equation of motion to find the period, T, of oscillation in such a 1-d potential well T= 4t where t is time to go from x=0 to x = xa.
T= 2pi. sqrt(m.xa^3/2k) which is an example of kepler's third law which says that the period of oscillation squared is proportional to the amplitude cubed and is a consequence of the inverse square law.
A: The discussion on the thread "what went wrong -0ne dimensional inverse square law" has identified particular solutions of the 1-D problem for both attractive and repulsive potentials. These solutions were obtained analytically rather than by numerical integration. But the solutions obtained are not the general solutions to the problem as they only apply to positive values of the initial position, $x_o.$ and velocity, $v_o.$. I wanted to construct the general solution (for all $x_o,v_o.$) from the particular analytical solutions on that thread. We have three physically distinct cases:
Case (I) repulsive potential (k positive). The energy of the particle can only be positive( $E=|k|/\alpha.$). The time it takes to go from $x_o=\alpha, v_o=0  t=0.$ to some point $x ,v_x .$(both positive) is given by $$ \beta t_x = F_-(x) = \sqrt{x(x-\alpha)} +\frac{\alpha}{2}Ln|\frac{2x-\alpha + 2\sqrt{x(x-\alpha)}}{\alpha}| .$$ $\beta=\sqrt{2E/m}.$ 
If the particle starts at some position $x_o .$ ($\alpha<x_o.$) with some velocity $0< v_o.$ we can give the time, $t'_x.$ it will arrive at any $x, x_o<x .$ by calculating the total energy $E=\frac{m v_o^2}{2}+\frac{|k|}{|x_o|}.$ and noting that a particle with this energy departing from $x=\alpha.$ will arrive at $x_o.$ at $ \beta t_xo = F_-(x_o).$ and at x at $ \beta t_x = F_-(x).$. So the time from $x_o.$ to x is $ \beta t'_x= F_-(x) - F_-(x_o).$. If the velocity of the particle were reversed at x, it would take this same time to go back to $x_o.$. So we can use this write down the general solution for case (I): For any $x_o, v_o.$ and for $|x_o|<|x|.$ $$ \beta t'_x= -\frac{x_o.v_o}{|x_o.v_o|} F_-(|x_o|) + F_-(|x|).$$  The out and return times for $|\alpha|< |x| < |x_o|.$ are $$ \beta t'_x = F_-(|x_o|) - F_-(|x|).$$ and $$F_-(|x_o|) + F_-(|x|) .$$ 
Case(II) attractive potential, energy positive (k negative) $ E=\frac{m v_o^2}{2} -\frac{|k|}{|x_o|}.$ so $ \sqrt{\frac{2|k|}{m|x_o|}}<v_o.$. The time to go from $x_o=0.$ to x is given by $$ \beta t_x = F_+(x)=\sqrt{x(x+\alpha)} - \frac{\alpha}{2}Ln| \frac{2x+\alpha+2\sqrt{x(x+\alpha)}}{\alpha} |.$$ . So for $x_o,v_o.$ both positive or negative the time to go from $x_o.$ to x is $ \beta t'_x= F_+(|x|)-F_+(|x_o|).$ $|x_o|<|x|.$ For $x_o<0, 0<v_o.$ $$ \beta t'_x = F_+(|x_o|) - F_+(|x|).$$ when $x<0.$ and $$ \beta t'_x= F_+(|x_o|) + F_+(|x|).$$ when $0<x.$. The general expression for any $x_o,v_o.$ is $$ \beta t'_x=\frac{v_o}{|v_o|}(\frac{x}{|x|}F_+(|x|) - \frac{x_o}{|x_o|} F_+(|x_o|)) .$$

special case E=0 $v_o=\sqrt{\frac{2|k|}{m|x_o|}}.$ The particular solution under these conditions is $$ x(t)= \epsilon t^\frac{2}{3}.$$ or $$\sqrt{\frac{9|k|}{2m}} t= c t= x^\frac{3}{2}.$$ The general solution for $x_o.$ (which determines $|v_o|.$) is then $$ ct = \frac{v_o}{|v_o|}(\frac{x}{|x|}|x|^\frac{3}{2} - \frac{x_o}{|x_o|} |x_o|^\frac{3}{2}).$$ i.e if the $v_o.$ is initially towards the origin the particle accelerates to infinite velocity at the origin (offset by the -infinite potential energy there) then decelerates away from the origin until its velocity is zero at infinity. If $v_o.$ was away from the origin the particle decelerates until it stops at infinity.
Case(III) attractive potential Energy negative (k negative): i.e $v_o<\sqrt{\frac{2|k|}{m |x_o|}}.$ The particle oscillates with period T between limits $ |x|<|x_a|.$ where the amplitude $ x_a=\frac{-2|k||x_o|}{m v_o^2|x_o|-2|k|}.$ The time to go from x=0 to x is given by $$ \gamma t_x = G(x)= arctan(\sqrt{\frac{x}{(x_a-x)}}) - \frac{\sqrt{x(x_a-x)}}{x_a}.$$ where $\gamma=\sqrt{\frac{2|k|}{m x_a^3}}.$ For each x, there are two times (out and back) per oscillation. For initial conditions $x_o,v_o.$ both positive,and for $x_o< x < x_a.$  $$\gamma t'_x= 0 - G(|x_o|) + G(|x|).$$ also $$\gamma t'_x= \frac{\gamma T}{2} - G(|x_o|) - G(|x|).$$ and for $-x_a < x <x_o.$ $$\gamma t'_x= \frac{\gamma T}{2} - G(|x_o|) + G(|x|).$$ and $$\gamma T - G(|x_o|) - G(|x|) .$$  We can gather the solutions for all the other possible combinations of sign of initial conditions and noting $\gamma T=2 \pi.$ to give the general solution:$|x|<|x_a|.$ For the case where $\frac{(x-x_o)v_o}{|(x-x_o).v_o|}=+1.$  $$\gamma t'_x= 0 - \frac{x_ov_o}{|x_ov_o|} G(|x_o|) + G(|x|) .$$ also $$ \pi - \frac{x_ov_o}{|x_ov_o|} G(|x_o|) - G(|x|).$$  and for the case $ \frac{(x-x_o)v_o}{|(x-x_o)v_o|}=-1.$ $$\gamma t'_x= \pi - \frac{x_ov_o}{|x_ov_o|} G(|x_o|) + G(|x|).$$ also $$ 2\pi - \frac{x_ov_o}{|x_ov_o|} G(|x_o|) - G(|x|).$$ 
