Evaluation of $~{\mathrm{d}^2 x\over\mathrm{d}t^2}+\left({\mathrm{d}x\over\mathrm{d}t}\right)^2-4=0$ $$
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?
 A: By guessing and looking at the equation, try a solution of the form $x'=a\tanh bt$:
$$ab\operatorname{sech}^2bt+a^2\tanh^2bt -4 =0$$
Choose $a=b=2$ and you get
$$4\operatorname{sech}^2 2t + 4\tanh^2 2t - 4 = 4 - 4 =0$$
Since $\tanh(0)=0$, our solution is
$$x = \int 2\tanh 2t \:dt = \boxed{\log(\cosh 2t)}$$
which satisfies $x(0)=0$.
A: Hint The substitution $x = \log u$ transforms the initial value problem to a second-order linear i.v.p.
(One way to find this substitution is to observe that the original equation is a Riccati equation in the variable $y := x'$, namely $y' + y^2 - 4 = 0.$ The standard method for solving such equations applies the substitution $y = \frac{u'}{u} = (\log u)'$ to transform the equation into a second-order linear equation.)

 The i.v.p. in $u$ is $$u'' - 4 u = 0, \qquad u(0) = 1, \qquad u'(0) = 0 .$$ The standard method for solving a second-order linear equation with constant coefficients gives the solution  $$u = \cosh 2 t .$$

A: $${\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$ ;).
