What method was used to solve this non-linear differential equation? Consider the following first-order non-linear differential equation:
$$\left(\frac{dx}{dt}\right)^2+1=\frac{a}{x}\,,$$
where $a\in \mathbb{R}_{>0}$. I have been reading a book where they provide the following solution, assuming that $x(t)$ has a local maximum at $t=0$, in the parametric form:
$$
\left\{ \begin{aligned}t\left(\eta\right) & =\frac{1}{2}x_{max}\left(\eta+\sin\eta\right)\,,\\
x\left(\eta\right) & =\frac{1}{2}x_{max}\left(1+\cos\eta\right)\,.
\end{aligned}
\right.
$$
My question is how was this solution found? I've been playing around with the equation, but I cannot find a way to solve it.
 A: Let's check backwards if that is even a solution.
$$
\frac{dx}{dt}=\frac{x'(η)}{t'(η)}=\frac{-\sinη}{1+\cosη}
$$
Thus
$$
\left(\frac{dx}{dt}\right)^2+1=\frac{\sin^2η}{(1+\cosη)^2}+1=\frac{1-\cosη}{1+\cosη}+1=\frac2{1+\cosη}
$$
while
$$
\frac{a}{x}=\frac{2a}{x_\max(1+\cosη)}
$$
so indeed this is a solution if $x_\max=a$.

How one may get to this: Considering the left side, the right side has to be equal or greater than 1, so $x$ is confined to the interval $(0,a]$. A smooth parametrization of that interval is given, among other possibilities, by $x=a\sin^2\phi$. Now the remaining task is to find the relation between $\phi$ and $t$,
$$
\frac{4a^2\sin^2\phi\cos^2\phi}{t'(\phi)^2}=\frac{1}{\sin^2\phi}-1=\frac{\cos^2\phi}{\sin^2\phi}
$$
so
$$
t'(\phi)=2a\sin^2\phi=a(1-\cos2\phi)\implies t(\phi)=\frac{a}{2}(2\phi-\sin(2\phi))+C
$$
Next it is a cosmetic improvement to express the resulting formulas in terms of $2\phi$ or $2\phi-\pi$.

Now for increased experience try the same starting from $x(s)=a\tanh^2(s)$.
