What went wrong? [One-dimensional-inverse-square-law] Intrigued by this question,
one-dimensional inverse square laws,
I started to try to find an answer and came up with what follows. However, I calculated the derivatives to double check myself, and this does not work. However, it seems straightforward enough that I do not see my mistake.
Question: Is there a closed form solution to all
$$ \ddot x = \frac{k}{x^2}  \quad (x(0)=x_0), \  \dot{x}(0) = v_0, \ k \in \mathbb{R}.$$
Here is my very naive two cents. Multiplying both sides by $\dot{x}$ and obtain,
$$ \dot{x} \ddot{x} =  \frac{k \dot{x}}{x^2}.$$
Integrating both sides,  we obtain
\begin{equation} \tag{1} \frac{ (\dot{x})^2}{2} = -\frac{k}{x} + C. \end{equation}
Here it seems natural to re-write this as,
\begin{equation} \tag{2} \dot{x} = \sqrt{2} \sqrt{C - \frac{k}{x}}. \end{equation}
I do not know if that is fully acceptable. However, if it is we then have via integration one more time, or rather letting WolframAlpha integrate one side,
$$x(t) = \sqrt{2} x \sqrt{C - \frac{k}{x}} - \frac{ k \log \left( 2 \sqrt{C} x \sqrt{C - \frac{k}{x}} + 2Cx - k \right)}{\sqrt{2C}} + \tilde{C}. $$
Note, that both $C$ and $\tilde{C}$ are determined by initial conditions. Using the given initial conditions and (1), we can solve for $C$, to find that $C = \frac{v_0^2}{2} + \frac{k}{x_0}.$ Similarly we could solve for $\tilde{C}$, but before I did that I discovered my solution was wrong.
If you substitute my "solution" back into the differential equation, you find (much to my dismay)
$$ \ddot{x} = \frac{k}{x^2 \sqrt{2c - \frac{k}{x}}}. $$
Insight on my  mistake and/or a proper way to solve this is greatly appreciated.

Lets write 
$$
\dot{x} = \sqrt{C-\frac{k}{x}} = \sqrt{C}\sqrt{1 - \frac{k}{Cx}}.
$$
where i have absorbed the factor 2 into the constants k and C.
We can solve as follows:
$$
\int \frac{1}{\sqrt{1 - \frac{k}{Cx}}}dx = \sqrt{C}t + \lambda_{1}
$$
If we use the transformation $u = x - \frac{k}{C}$, we transform the r.h.s as,
$$
\int \sqrt{1 + \frac{k}{Cu}}du = \sqrt{C}t + \lambda_{1}.
$$
Integrating by parts with,
$$
d\bar{u} = 1,\\
v = \sqrt{1 + \frac{k}{Cu}}.
$$
This leads to:
$$
\int \sqrt{1 + \frac{k}{Cu}}du = u\sqrt{1 + \frac{k}{Cu}} - \int u\frac{-\frac{k}{2Cu^{2}}}{\sqrt{1 + \frac{k}{Cu}}}du,\\
=u\sqrt{1 + \frac{k}{Cu}} + \frac{1}{2}\int \frac{1}{\sqrt{1 + \frac{k}{Cu}}}\frac{k}{Cu}du
$$
We can sort out the first term in terms of x already as
$$
u\sqrt{1 + \frac{k}{Cu}} = \sqrt{u}\sqrt{u + \frac{k}{C}} = \sqrt{x -\frac{k}{C}}\sqrt{x},\\
=x\sqrt{1 - \frac{k}{Cx}}
$$
Now the integral:
$$
\frac{1}{2}\int \frac{1}{\sqrt{1 + \frac{k}{Cu}}}\frac{k}{Cu}du
$$
using another transformation $w^{2} = 1 + \frac{k}{Cu} $ which has an inverse of $u = \frac{k/C}{w^{2}-1}$, we can transform the integral to,
$$
\frac{1}{2}\int \frac{w^{2} - 1}{w}\left(\frac{-2(k/C) w}{\left(w^{2}-1\right)^{2}}\right)dw = -\frac{k}{C}\int \frac{1}{w^{2}-1}dw
$$
which integrates to:
$$
-\frac{k}{2C} \mathrm{log}\left(\frac{w-1}{w+1}\right) = \frac{k}{2C} \mathrm{log}\left(\frac{w+1}{w-1}\right) = \frac{k}{2C} \mathrm{log}\left(\frac{(w+1)^{2}}{w^{2} - 1}\right).
$$
The log argument can be manipulated to yield:
$$
\frac{(w+1)^{2}}{w^{2} - 1} = \frac{\frac{k}{Cu} + 2 + 2w}{\frac{k}{Cu}} = 1 + \frac{2Cu}{k} - 2w\frac{Cu}{k},\\
=\frac{2Cx - k + 2wCu}{k} = \frac{2Cx - k - 2\sqrt{1 + \frac{k}{Cu}}Cu}{k},\\
=\frac{2Cx - k + 2C\sqrt{u + \frac{k}{C}}\sqrt{u}}{k} = \frac{2Cx - k + 2Cx\sqrt{1 - \frac{k}{Cx}}}{k}
$$
Tying everything together we find:
$$
x\sqrt{1 - \frac{k}{Cx}} +\frac{k}{2C} \mathrm{log}\left(\frac{2Cx - k + 2Cx\sqrt{1 - \frac{k}{Cx}}}{k}\right)\\
= x\sqrt{1 - \frac{k}{Cx}} +\frac{k}{2C} \mathrm{log}\left(2Cx - k + 2Cx\sqrt{1 - \frac{k}{Cx}}\right) +\frac{k}{2C}\mathrm{log}\left(\frac{1}{k}\right)\\
=\sqrt{C}t + \lambda_{1}
$$
The third term is a constant and can be absorbed by $\lambda_{1}$
$$
\frac{1}{\sqrt{C}}x\sqrt{C - \frac{k}{x}} +\frac{k}{2C} \mathrm{log}\left(2Cx - k + 2\sqrt{C}x\sqrt{C - \frac{k}{x}}\right) = \sqrt{C}t + \lambda_{1}
$$
multiplying the $\sqrt{C}$ we finally reach 
$$
\sqrt{2}x\sqrt{C - \frac{k}{x}} +\frac{k}{\sqrt{2C}} \mathrm{log}\left(2Cx - k + 2\sqrt{C}x\sqrt{C - \frac{k}{x}}\right) = \sqrt{2}Ct + \lambda_{2}
$$
I final not worth respect to getting back to the original equation, you have to do implicit differentiation and re-arrange for $\frac{dx}{dt}$, thats why you had a issues when you neglect the r.h.s of the equation i.e. the t term.
