$\displaystyle t = \frac{ \frac{\pi}{2} - \arcsin \Big( \sqrt{ \frac{x}{r} }\Big) + \sqrt{ \frac{x}{r} \ ( 1 - \frac{x}{r} ) } }{ \sqrt{ 2 \mu } } \, r^{3/2}$
This is an equation from Equations for a falling body for falling from height r to height x with a standard gravitational parameter μ, solving for time t. What I need help with is how to rewrite the equation to solve for x instead if I have time t, standard gravitational parameter μ and height r already.
I have been able to multiply both sides by the square root of 2μ and divide by r to the 1.5 power. Then I subtract $\pi/2$, but I am stuck with the square roots that have $x/r$ in them.
Let $y=\sqrt\frac{x}{r}=\sin\left(\frac{\phi}{2}\right)$
$$\begin{align}t &= \frac{ \frac{\pi}{2} - \sin^{-1} y + y\sqrt{ 1 - y^2 } }{ \sqrt{ 2 \mu } } \, r^{3/2}\\ \frac{t\sqrt{2\mu}}{r^{3/2}} -\frac{\pi}{2} &= - \sin^{-1} y + y\sqrt{ 1 - y^2 }\\ \frac{t\sqrt{2\mu}}{r^{3/2}} -\frac{\pi}{2} &= \frac{\sin\phi-\phi}{2}\\ \frac{2t\sqrt{2\mu}}{r^{3/2}} -\pi=g(t,r,\mu)&=\sin\phi-\phi \end{align}$$
If you could solve for $\phi$ you'd get $$x(\phi)=r\sin^2\left(\frac{\phi}{2}\right)$$
For $-\frac{\pi}{2}\le\phi\le \frac{\pi}{2}$, or $0\leq x\leq \frac{r}{2}$, a good approximation using the Taylor series becomes
$$g(t,r,\mu)\approx-\frac{\phi^3}{6}\implies x\approx r\sin^2\left(\sqrt[3]{\frac{3\pi r^{3/2}-6t\sqrt{2\mu}}{4r^{3/2}}}\right)\quad\text{if}\;0\le\frac{x}{r}\le\frac{1}{2}$$
Note that increasing the upper bound of $\phi$ to $\frac{3\pi}{4}$ which gives $\frac{x}{r} \leq \frac{2+\sqrt{2}}{4}=0.853\dots$, could still give a reasonable result depending on your application