# Solutions of the differential equation $\dot{x}^2-2x=1$

I am studying how to solve certain nonlinear differential equations and am currently trying to solve the equation $$\dot{x}^2-2x=1$$, where $$x$$ is a function of $$t$$, with initial condition $$x(1)=1$$. My method is as follows:

Solving for $$x$$ in this equation gives $$x=\frac{1}{2}(\dot x-1)$$. Let $$p=\dot x$$, then differentiating with respect to $$t$$ gives $$\frac{d}{dt}x=\dot x=\frac{d}{dt}\frac{1}{2}(\dot x-1)=\frac{1}{2}(2\ddot x\dot x)$$ by chain rule, so we get the first-order differential equation $$p=pp'$$. If $$p\equiv0$$ then we get the solution $$x(t)\equiv C$$. Otherwise, dividing by $$p$$ gives $$p'=1$$, so $$p=t+c_1$$ and $$x=\frac{t^2}{2}+c_1t+c_2$$.

Plugging back into the original equation: $$(t+c_1)^2-2(\frac{t^2}{2}+c_1t+c_2)=1$$ $$t^2+2c_1t+c_1^2-t^2-2c_1t-2c_2=1$$ $$c_1^2-2c_2=1$$ $$c_1^2=1-2c_2$$ $$c_1=\pm\sqrt{1-2c_2}$$

Now applying the initial condition $$x(1)=1$$:

$$1=\frac{1}{2}\pm\sqrt{1-2c_2}+c_2$$

Solving this equation for $$c_2$$ I get $$c_2=-\left(\sqrt5+\frac 5 2\right)$$ and $$c_2=\sqrt5-\frac 5 2$$. Therefore, the solution is

$$x(t)=\frac{t^2}{2}\pm \sqrt{1+2(\frac 5 2\pm\sqrt5)}-\frac{5}{2}\pm\sqrt5$$

But according to WolframAlpha the solutions are $$x(t)=\frac{1}{2}\big(t^2\pm2(1+\sqrt3)t\mp(2\sqrt3)+3\big)$$

Where am I going wrong in my approach? Did I make an algebraic mistake or is there something more deeply wrong with this method?

• If you meant what I think you did, and I would rather write as $\;x'-2x=1\;$ , with $\;x=x(t)\;$ a function of $\;t\;$, then this diff. eq. is linear . Did you mean perhaps something else? Apr 11 '19 at 18:53
• @DonAntonio The $x'$ term is squared, so it is not linear. This is why I used the dot notation (to make it more readable than $(x')^2$). Apr 11 '19 at 18:54
• I completely missed that $\;2\;$ in the exponent. Thanks Apr 11 '19 at 18:57

It should be $$c_1=\pm\sqrt{1+2c_2}$$.

(BTW, I would solve this from $$\dot{x}=\pm\sqrt{1+2x}$$ and then separate the variables.)