$$ x=x(t):=C^{\infty}~\text{class function} $$
$$ \underbrace{\color{red}{{\mathrm{d}^2 x\over\mathrm{d}t^2}+\left({\mathrm{d}x\over\mathrm{d}t}\right)^2-4=0} }_{\text{I want to evaluate a general soln of this ODE}} $$
$$ x(0)={\mathrm{d}x\over\mathrm{d}t}(0)=0 $$
My tries:
NOTICED MISCALCULATION. I AM CORRECTING IT NOW
$$ \underbrace{{\mathrm{d}^2 x\over\mathrm{d}t^2}+\left({\mathrm{d}x\over\mathrm{d}t}\right)^2=4 }_{\text{Original ODE}} $$
$$ \underbrace{{\mathrm{d}^2 x\over\mathrm{d}t^2}+\left({\mathrm{d}x\over\mathrm{d}t}\right)^2=0 }_{\text{Prepared a new one}}\\ $$
I assume$~{\mathrm{d}x\over\mathrm{d}t}\neq0~$ for$~x\neq0$
$$\begin{align} {\mathrm{d}^2 x\over\mathrm{d}t^2}&=-\left({\mathrm{d}x\over\mathrm{d}t}\right)^2\\ \left({\mathrm{d}x\over\mathrm{d}t}\right)^{-1}{\mathrm{d}^2 x\over\mathrm{d}t^2}&=-\left({\mathrm{d}x\over\mathrm{d}t}\right)^1\\ \left({\mathrm{d}t\over\mathrm{d}x}\right){\mathrm{d}^2x\over\mathrm{d}t^2}&=-{\mathrm{d}x\over\mathrm{d}t}\\ \int\left(\left({\mathrm{d}t\over\mathrm{d}x}\right){\mathrm{d}^2x\over\mathrm{d}t^2}\right)\mathrm{d}t&=\int-{\mathrm{d}x\over\mathrm{d}t}~\mathrm{d}t\\ \int\left(\left({\mathrm{d}t\over\mathrm{d}x}\right){\mathrm{d}^2x\over\mathrm{d}t^2}\right)\mathrm{d}t&=-x+\text{const}\\ \left({\mathrm{d}x\over\mathrm{d}t}\right)\left({\mathrm{d}x\over\mathrm{d}t}\right) -\int\left(\left({\mathrm{d}t\over\mathrm{d}x}\right){\mathrm{d}^2x\over\mathrm{d}t^2}\right)\mathrm{d}t&=-x+\text{const} \\ \left({\mathrm{d}x\over\mathrm{d}t}\right)^2 -\left\{\left({\mathrm{d}x\over\mathrm{d}t}\right)^2-\int\left(\left({\mathrm{d}t\over\mathrm{d}x}\right){\mathrm{d}^2x\over\mathrm{d}t^2}\right)\mathrm{d}t\right\}&=-x+\text{const}\\ \int\left(\left({\mathrm{d}t\over\mathrm{d}x}\right){\mathrm{d}^2x\over\mathrm{d}t^2}\right)\mathrm{d}t&=-x+\text{const} \end{align}$$
I've been stucked in the closed loop.
Where I've made (a) mistake(s)?
And how can I evaluate the general solution?
$${\mathrm{d}^2 x\over\mathrm{d}t^2}+\left({\mathrm{d}x\over\mathrm{d}t}\right)^2-4=0$$ Let $u={\dfrac{\mathrm{d}x}{\mathrm{d}t}}$, you have to solve: $$ u'+u^2= 4 \quad\quad (*)$$ You can solve $(*)$ using separation of variables.
Don't forget to go back to ${\dfrac{\mathrm{d}x}{\mathrm{d}t}}$ integrating $u$ ;).